![]() |
|
#11
|
|||
|
|||
|
[ 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. |
|
|