Welcome to Deadbeef.com
Articles and tips on software from authored by Jeremy Bettis.

Search

XML Feed RSS

What is RSS?

Who's Online?

  • Guest Users: 8

Yet Another Double Fanucci Calculator (YADFC) improved

10/28/09

Permalink 11:34:50 pm, by Jeremy Email , 252 words, 316 views   English (US)
Categories: Software, Java

Yet Another Double Fanucci Calculator (YADFC) improved

I'm embarrassed to admit it, but I have become quite attached to a web based game called Legends of Zork. It is slow, repetitive, and requires little skill. In other words it is just my game playing speed.

One of the puzzles in the game is to arrange your Double Fanucci cards to get the most points so that you can win more encounters. I found a very nice Java based calculator called Yet Another Double Fanucci Calculator. It works like a charm, but is it a bit slow, and the genetic algorithm doesn't always find an optimal solution.

I have profiled the program, and improved it in several ways.

  • I made the calculation run in the background with a cancel button. This way, if the calculation takes a long time, and you change your mind, you can cancel it and do something else.
  • I added a recursive calculator also. It always finds an optimal solution, but sometimes takes longer than the genetic algorithm.
  • I sped up the genetic algorithm.
  • I replaced several of the classes with optimized versions that take less memory, and run faster.
  • Hands are precalculated and saved to a file. So the second time you calculate your cards, the software only needs to consider any new cards you have added.

Download a runnable jar: yadfc-v2.3-deadbeef.jar
Checkout the source code from svn: http://svn.deadbeef.com/double-fanucci/trunk

I'll keep this page up to date as new versions are released, post any issues to the comments here.

Comments, Pingbacks:

Comment from: Joe [Visitor] Email
forgive me beeing a noob, but how do you run this program?
PermalinkPermalink 03/15/10 @ 08:21

Leave a comment:

Your email address will not be displayed on this site.
Your URL will be displayed.

Allowed XHTML tags: <p, ul, ol, li, dl, dt, dd, address, blockquote, ins, del, span, bdo, br, em, strong, dfn, code, samp, kdb, var, cite, abbr, acronym, q, sub, sup, tt, i, b, big, small>
(Line breaks become <br />)
(Set cookies for name, email and url)
(Allow users to contact you through a message form (your email will NOT be displayed.))

March 2010
Sun Mon Tue Wed Thu Fri Sat
 << <   > >>
  1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30 31    

Categories

powered by
b2evolution