While I did end up with the 'PURE joker poker play book', it is not as large as you think: it only contains 178633 entry's.

You correctly assessed that order does not matter, but also the suit does not matter in many occasions. For example: the two following hands are identical, except for the suits:

1. Ace of hearts, Two of clubs, Five of clubs, Six of clubs, King of spades
2. Ace of clubs, Two of spades, Five of spades, Six of spades, King of hearts


It is easily seen that the optimal strategy for both hands will be the same.

For each of those 178633 really different hands, I did try all 32 strategy's. There is 1 strategy that keeps all cards, five the keep four cards, ten that keep three cards, ten that keep two cards, five that keep one card and one that keeps no cards at all. The total number of calculations for those 32 strategy's combined then is:

1 + 5.48 + 10.48.47/2 + 10.48.47.46/6 + 5.48.47.46.45/24 + 1.48.47.46.45.44/120 = 2869685

This brings the total number of calculations down to 5.13 x 10^11, which is certainly doable if the 'calculation' is simply a table lookup as you suggest.

In fact, my program was not that smart, as I did not take into account that order did not matter in drawing the new cards (oops, thanks for pointing this out). I did add a few more optimizations though, and I estimate my initial run did about 7 x 10^12 lookups and the second run (I made a slight error in the scoring function, so I had to run it again) contained a few more optimizations, reducing it to about 3 x 10^12.

Both runs combined took about 120 hours on an Athlon XP 1800+ with 512 MB RAM. Combining all optimizations (including the one you suggested, that order for the new cards does not matter) would bring the 5.13 x 10^11 down to about 7 x 10^10... which would be about an hour on that machine. So I wasted quite a bit ;)


Edwin




---
You are currently subscribed to e-gold-list as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]

Use e-gold's Secure Randomized Keyboard (SRK) when accessing your e-gold account(s) via the web and shopping cart interfaces to help thwart keystroke loggers and common viruses.

Reply via email to