Poker Site Manual
The evaluate and draw functions. Making the robot think.
Evaluate assigns an 11 digit number to an array of 2 or 5 or 6 or 7 cards. The number represents the value of the cards as a poker hand. As shown by the examples in the table below, 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 and 9=straight flush, and the trailing 10 digits consist of a concatination 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, and 12=2.

1 24 23 15 13 12 no pair ace, king, 5, 3, 2
2 15 22 21 19 00 a pair of 5s with a queen jack 9.
3 17 16 24 00 00 two pair, a pair of 7s and 6s with an ace.
4 18 17 13 00 00 trip 8s with a 7 3.
5 20 00 00 00 00 a ten high straight.
6 21 00 00 00 00 a jack high flush.
7 17 14 00 00 00 a full house, 7s full of 4s.
8 19 12 00 00 00 quad 9s with a 2.
9 23 00 00 00 00 a king high straight flush.


Draw evaluates the drawing strength of an array of 3, 4, or 5 cards.
For 3 cards it returns these values:
$straight
	1 2 consecutive cards, or a 1 gap and a 2 gap;	
	2 a 2 gap or two single gaps;	
	3 a single gap;
	4 3 consecutive cards. 
$flush		
	1 two cards of the same suit;			
	2 three cards of the same suit.
$paired	
	1 a pair;					
	2 trips.
$sf
	1 2 consecutive sf cards, or a 1 gap and a 2 gap;
	2 sf with a 2 gap or two single gaps; 	
	3 with a single gap 
	4 3 consecutive sf cards.
For 4 cards it returns these values:
$straight
	1 2 conseutive cards, or a 1 gap and a 2 gap;	
	2 a two gap or two single gaps;	
	3 a single gap in a 3 straight;
	4 3 consecutive cards;
	5 a single gap in the bottom of a 4 straight;
	6 a single gap in the middle of a 4 straight;
	7 a single gap in the top of a 4 straight;
	8 4 consecutive cards.
$flush
	1 two cards of the same suit;
	2 three cards of the same suit;
	3 four cards of the same suit.
$paired=	
	1 a pair;		
	2 two pair;	
	3 trips;			
	4 quads.	
$sf
	1 2 consecutive sf cards, or a 1 gap and a 2 gap;
	2 straight flush with a 2 gap or two single gaps; 	
	3 with a single gap in 3 cards;
	4 3 consecutive sf cards.
	5 a single gap in the bottom of a 4 straight;
	6 a single gap in the middle of a 4 straight;
	7 a single gap in the top of a 4 straight;
	8 4 sf consecutive cards.

For 5 cards it returns these values:
$straight
	1 a two gap or two single gaps;	
	2 a single gap in a 3 straight;
	3 3 consecutive cards
	4 4 a single gap in the bottom of a 4 straight;
	5 a single gap in the middle of a 4 straight;
	6 a single gap in the top of a 4 straight;
	7 4 consecutive cards;
	8 5 consecutive cards.
$flush
	1 two cards of the same suit;
	2 three cards of the same suit;
	3 four cards of the same suit;
	4 five cards of the same suit.
$paired	
	1 a pair;		
	2 two pair;	
	3 trips;
	4 full house;		
	4 quads.
$sf
	1 straight flush with a 2 gap or two single gaps; 	
	2 with a single gap in 3 cards;
	3 3 consecutive sf cards.
	4 a single gap in the bottom of a 4 straight;
	4 a single gap in the middle of a 4 straight;
	4 a single gap in the top of a 4 straight;
	7 4 sf consecutive cards.
	8 the sf.

In each case $high is the rank of the highest card associated with the cards.


These are the strategy variables the robot uses to determine when to fold, call bet, or raise and how much: when player deals: before the flop: $dpf[1] $dpf[2] $dpfr[1] $dpfr[2] $dpfr[3] $dpfr[4] $dpfr[5];
on the flop: $df[1] $df[2] $dfb[1] $dfb[2] $dfb[3] $dfb[4] $dfr[1] $dfr[2];
on the turn: $dt[1] $dt[2] $dtb[1] $dtb[2] $dtb[3] $dtb[4] $dtr[1] $dtr[2];
on the river: $dr[1] $dr[2] $drb[1] $drb[2] $drb[3] $drb[4] $drr[1] $drr[2]
and when bot deals: before the flop: $pf[1] $pf[2] $pf[3] $pfr[1] $pfr[2] $pfr[3] $pfr[4];
on the flop: $fc[1] $fc[2] $fb[1] $fb[2] $fr[1] $fr[2];
on the turn: $tc[1] $tc[2] $tb[1] $tb[2] $tr[1] $tr[2];
on the river: $rc[1] $rc[2] $rb[1] $rb[2] $rr[1] $rr[2]

Those strategy variables vary depending on the information returned by the draw function. They are set as follows:

  $pf[1]=11716000000;
  $pf[2]=12322000000;
  $pf[3]=12420000000; 
 $pfr[1]=11918000000; 
 $pfr[2]=12019000000;
 $pfr[3]=10000000000;
 $pfr[4]=12320000000;

  $fc[1]=20000000000; 
  $fc[2]=22000000000;
  $fb[1]=12417000000; 
  $fb[2]=20000000000;
  $fr[1]=30000000000; 
  $fr[2]=10000000000;

  $tc[1]=30000000000; 
  $tc[2]=40000000000;
  $tb[1]=20000000000; 
  $tb[2]=30000000000;
  $tr[1]=40000000000; 
  $tr[2]=10000000000; 

  $rc[1]=40000000000;
  $rc[2]=50000000000;
  $rb[1]=30000000000;
  $rb[2]=40000000000;
  $rr[1]=40000000000;
  $rr[2]=10000000000;

 $dpf[1]=21600000000;
 $dpf[2]=22000000000; 
$dpfr[1]=12119000000;
$dpfr[2]=22100000000;
$dpfr[3]=10000000000;
$dpfr[4]=10000000000;
$dpfr[5]=22000000000;

  $df[1]=21800000000;
  $df[2]=22400000000; 
 $dfb[1]=20000000000;
 $dfb[2]=31700000000;
 $dfb[3]=10000000000;
 $dfb[4]=10000000000; 
 $dfr[1]=22400000000; 
 $dfr[2]=22400000000; 

  $dt[1]=30000000000; 
  $dt[2]=40000000000; 
 $dtb[1]=20000000000; 
 $dtb[2]=40000000000; 
 $dtb[3]=10000000000; 
 $dtb[4]=10000000000; 
 $dtr[1]=30000000000; 
 $dtr[2]=40000000000; 

  $dr[1]=40000000000; 
  $dr[2]=50000000000; 
 $drb[1]=22000000000; 
 $drb[2]=40000000000;
 $drb[3]=10000000000;
 $drb[4]=10000000000;
 $drr[1]=30000000000;
 $drr[2]=40000000000;