That's awesome, Ray. I'm experiencing awe. ;-)
Can we squeeze this some more by *first* thinking about the fastest
possible hash index functions, and then making it work for cards?
(Is there something faster than bit shifts and XOR)?
I'm thinking it might be advantageous to represent cards keeping the
rank and suit separated (4+2 bits), rather than having to unravel the
6-bit representation for integers 0-51. Now the unordered rank pattern
can be determined quickly with bit operations, (28 bits = 268 million
table entries), and the suit pattern determines the flush exceptions.
- Darse.
On 4-Jan-07, at 8:37 AM, Ray wrote:
> Actually in under 10 cycles per hand... ;-)
>
> High Card = 23294460
> Pair = 58627800
> Two Pair = 31433400
> Three of a Kind = 6461620
> Straight = 6180020
> Flush = 4047644
> Full House = 3473184
> Four of a Kind = 224848
> Straight Flush = 41584
> Total Hands = 133784560
>
> Validation seconds = 0.5780
> Total HighPrecision Clocks = 1141158660
> HighPrecision clocks per lookup = 8.529823
>
> BTW, I love what you are doing for the Poker Programs yourself Darse
> (Poki
> and Research)...
>
> Ray...
>
> -----Original Message-----
> From:
pokersource@yahoogroups.com [mailto:
pokersource@yahoogroups.com]
> On
> Behalf Of Darse Billings
> Sent: Thursday, January 04, 2007 9:23 AM
> To:
pokersource@yahoogroups.com
> Subject: Re: [pokersource] 2+2 thread on super fast evaluators
>
>
> Quite some time ago, "Cactus Kev" created a webpage about his fast
> 5-card
> hand eval:
>
>
http://www.suffecool.net/poker/evaluator.html
> <
http://www.suffecool.net/poker/evaluator.html>
>
> It exploits the equivalence classes of poker hands, where there are
> only
> 7462 distinct hand values. His indexing function is primitive, but the
> potential for very fast table-based evaluators is clear. The
> bottleneck is
> now in computing the hash index, and the 2+2 thread offers some clever
> tricks to do that in under 50 cycles per hand.
>
> - Darse.
>
> On 3-Jan-07, at 8:28 PM, Michael Maurer wrote:
>
>> There is a fascinating thread on 2+2 about building the next
>> generation of poker hand evaluators. Several posters have reported
>> 7-card hand eval rates well over 100M hands per second. The approaches
>> use "a lot" of memory, but nothing you would notice on your desktop
>> box.
>>
>> The thread is here:
>>
http://forumserver.twoplustwo.com/showflat.php?Number=8648777&fpart=al
>> l
>> <
http://forumserver.twoplustwo.com/showflat.php?Number=8648777&fpart=a
>> ll>
>>
>> -Michael M
>>
>>
>>
>>
>>
>> Yahoo! Groups Links
>>
>>
>>
>
>
>
>
>
>
>
>
> Yahoo! Groups Links
>
>
>