Two Plus Two Newer Archives  

Go Back   Two Plus Two Newer Archives > Internet Gambling > Software
FAQ Community Calendar Today's Posts Search

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #11  
Old 12-27-2006, 03:40 AM
mykey1961 mykey1961 is offline
Senior Member
 
Join Date: Oct 2005
Posts: 249
Default Re: 7 Card Hand Evaluators

[ QUOTE ]
[ QUOTE ]
If someone could figure out a way to assign a unique index value between 1 and 133784560 for 7 unordered cards, you could dump everything into a 133 MB lookup table.


[/ QUOTE ]
Single byte for hand's strength is not enough, so the table must be 266 MB at least.

Andrzej Nironen

[/ QUOTE ]

Actually it can be done in under 133 MB...


I've got an array of approx 30 million integers.

One way of accessing a hand ranking is:


Rank := Eval[Eval[Eval[Eval[Eval[Eval[Eval[c1]+c2]+c3]+c4]+c5]+c6]+c7];

The general idea is there are:

1 card hands. 52x52
2 card hands. 1326x52
3 card hands. 22100x52
4 card hands. 84448x52
5 card hands. 152607x52
6 card hands. 352443x52

For each N card hand, there are 52 vectors to the appropriate N+1 card hand.

For 6 card hands, instead of vectors to the 7 card hand, the array holds the Hand Ranking of the 7 card hand.
Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 10:03 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.