org.pokersource.enum
Class Enumerate
java.lang.Object
org.pokersource.enum.Enumerate
public class Enumerate
extends java.lang.Object
Algorithms for enumerating or sampling the outcomes of a poker hand
matchup.
static void | PotEquity(int gameType, int nsamples, long[] pockets, long board, long dead, double[] ev) - Compute all-in pot equity of each player's hand, either by complete
enumeration of outcomes or by monte carlo sampling.
|
static void | PotEquity(int gameType, int nsamples, long[] pockets, long board, long dead, double[] ev, int[][][] orderKeys, int[][] orderVals) - Compute all-in pot equity of each player's hand, either by complete
enumeration of outcomes or by monte carlo sampling.
|
static void | main(String[] args) - A simple test of Enumerate methods.
|
GAME_5DRAW
public static int GAME_5DRAW
GAME_5DRAW8
public static int GAME_5DRAW8
GAME_5DRAWNSQ
public static int GAME_5DRAWNSQ
GAME_7STUD
public static int GAME_7STUD
GAME_7STUD8
public static int GAME_7STUD8
GAME_7STUDNSQ
public static int GAME_7STUDNSQ
GAME_HOLDEM
public static int GAME_HOLDEM
GAME_HOLDEM8
public static int GAME_HOLDEM8
GAME_LOWBALL
public static int GAME_LOWBALL
GAME_LOWBALL27
public static int GAME_LOWBALL27
GAME_OMAHA
public static int GAME_OMAHA
GAME_OMAHA8
public static int GAME_OMAHA8
GAME_RAZZ
public static int GAME_RAZZ
PotEquity
public static void PotEquity(int gameType,
int nsamples,
long[] pockets,
long board,
long dead,
double[] ev)
Compute all-in pot equity of each player's hand, either by complete
enumeration of outcomes or by monte carlo sampling.
gameType
- specifies game (Enumerate.GAME_HOLDEM, etc)nsamples
- number of monte carlo samples; if 0, full enumerationpockets
- pockets[i] is bitmask of player i's cardsboard
- board is bitmask of board cardsdead
- dead is bitmask of dead cardsev
- output: ev[i] is pot equity of player i
PotEquity
public static void PotEquity(int gameType,
int nsamples,
long[] pockets,
long board,
long dead,
double[] ev,
int[][][] orderKeys,
int[][] orderVals)
Compute all-in pot equity of each player's hand, either by complete
enumeration of outcomes or by monte carlo sampling.
gameType
- specifies game (Enumerate.GAME_HOLDEM, etc)nsamples
- number of monte carlo samples; if 0, full enumerationpockets
- pockets[i] is bitmask of player i's cardsboard
- board is bitmask of board cardsdead
- dead is bitmask of dead cardsev
- output: ev[i] is pot equity of player iorderKeys
- output: orderKeys[0][j] corresponds to a particular
relative ordering of the players' hands at showdown, such that
orderKeys[0][j][k] is the relative rank of player k's hand, where rank=0
means best, rank=nplayers-1 means worst, and rank=nplayers indicates a
non-qualifying hand. For high-low games, orderKeys[0][j][k+nplayers]
gives corresponding information for the low hand. Before calling
the method, allocate orderKeys as a new int[1][][].orderVals
- output: orderVals[0][j] the number of outcomes
corresponding to the relative rank ordering in orderKeys[0][j]. Before
calling the method, allocate orderVals as a new int[1][].
main
public static void main(String[] args)
A simple test of Enumerate methods.
Compare to "pokenum -h ks kh ad td 9c 8c -- kd jd th / As 2h".
and "pokenum -O -h ks kh ad td 9c 8c -- kd jd th / As 2h".
PokerSource Home Page - Learn how you can contribute!