Thursday, December 13, 2007

How a program ranks a hand.

Assignment of an 11 digit number
A program can reduce any possible hand to an 11 digit number. This includes an array of 2 or 5 or 6 or 7 cards. The number represents the value of the cards as a poker hand and is used by the bot to make decisions.

The first digit
The first digit denotes the rank of the hand, to wit:

1. nopair
2. pair
3. 2 pair
4. trips
5. straight
6. flush
7. full house
8. quads
9. straight flush


The trailing digits
The trailing 10 digits consist of a concatenation of up to five two digit numbers which denote the strength of the hand within the rank where
24=ace
23=king
22=queen
21=jack
20=10
19=9
18=8
17=7
16=6
15=5
14=4
13=3
12=2

No comments: