Search the web
Sign In
New User? Sign Up
pokersource · Poker Source
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Want your group to be featured on the Yahoo! Groups website? Add a group photo to Flickr.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
2+2 thread on super fast evaluators   Message List  
Reply | Forward Message #330 of 355 |
Re: [pokersource] 2+2 thread on super fast evaluators


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




Thu Jan 4, 2007 4:23 pm

rayzor04
Offline Offline
Send Email Send Email

Forward
Message #330 of 355 |
Expand Messages Author Sort by Date

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...
Michael Maurer
mjmaurer
Online Now Send Email
Jan 4, 2007
3:44 am

Quite some time ago, "Cactus Kev" created a webpage about his fast 5-card hand eval: http://www.suffecool.net/poker/evaluator.html It exploits the equivalence...
Darse Billings
rayzor04
Offline Send Email
Jan 4, 2007
2:28 pm

Actually in under 10 cycles per hand... ;-) High Card = 23294460 Pair = 58627800 Two Pair = 31433400 Three of a Kind = 6461620 Straight = 6180020 Flush =...
Ray
ramonwotton
Offline Send Email
Jan 4, 2007
3:45 pm

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...
Darse Billings
rayzor04
Offline Send Email
Jan 4, 2007
4:30 pm

... Specifically: 2c 001000 2d 001001 2h 001010 2s 001011 3c 001100 3d 001101 3h 001110 3s 001111 4c 010000 4d 010001 4h 010010 4s 010011 5c...
Darse Billings
rayzor04
Offline Send Email
Jan 4, 2007
6:04 pm

... If you're going to do a table lookup, is there some significant advantage from the binary representation over, say, index = card0+52*(card1 + 52*(card2 ......
Jeffrey Siegal
jsiegal
Offline Send Email
Jan 4, 2007
7:24 pm

Having suggested the bit-friendly representation, I'm now working on making it obsolete. :) If we roll-up the cards 6 bits at a time and compose a 4-card...
Darse Billings
rayzor04
Offline Send Email
Jan 4, 2007
8:16 pm

Actually, I wrote some C++ code to do exactly this - I actually worked out a minimal perfect hash for the representations. Basically, an evaluation is a sort...
Jim Laird
sn0rt2001
Offline Send Email
Feb 16, 2007
5:20 pm

I did almost the same thing about 12 years ago when CPU cycles and RAM were more expensive. I created a table that returned a two values, one if the hand was...
Ken Anderson
ken_anderson...
Offline Send Email
Jan 4, 2007
6:17 pm

Most people on this list won't need any further explanation of Mike White (mykey1961?) and Ray Wotten's approach. But in case it helps at all, here's a post I...
Darse Billings
rayzor04
Offline Send Email
Jan 9, 2007
8:05 pm
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help