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: 19

Archives for: June 2010

06/14/10

Permalink 10:00:00 am, by Jeremy Email , 295 words, 1261 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.3B-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.

Update 6/14/2010

  • I added the ability to precalculate from the menu.
  • Fixed some bugs that were making the precalculated hands not read back from the file.
  • Fixed some bugs that prevented the recursive calc from working when you had a small number of cards.

June 2010
Sun Mon Tue Wed Thu Fri Sat
 << < Current> >>
    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      

Categories

powered by
b2evolution