poker
Class HandPotential

java.lang.Object
  extended by poker.HandPotential

public class HandPotential
extends java.lang.Object

Hand Potential.
Hand Potential is the calculation of the probability that a hand that is currently behind will be ahead as more board cards are dealt. Negative Potential (NPOT) is the probability that given that we are currently ahead, future cards will put is behind. Contains the Hand Potential Calculations as described in:
Dealing with Imperfect Information in Poker.
Denis Papp, M.Sc. thesis, 1998.
As well as Darse Billings' crude potential function.

Version:
1.1.0
Author:
Aaron Davidson

Constructor Summary
HandPotential()
           
 
Method Summary
static double CrudePotential1(Card c1, Card c2, Hand board)
          A crude but fast approximation of PPOT.
 double getLastNPot()
          obtain the PPot calculated during the last call to npot.
 double getLastPPot()
          obtain the PPot calculated during the last call to ppot.
 double ppot_raw(Card c1, Card c2, Hand bd, boolean full)
          Calculate the raw (unweighted) PPot and NPot of a hand.
 double ppot(Card c1, Card c2, Hand bd, com.biotools.poker.model.WeightTable w, boolean full)
          Calculate the PPot and NPot of a hand.
 int rankHandCached(int i, int j, int k, Hand bd, int[] cache)
           
 int rankHandCached(int i, int j, int k, int l, Hand bd, int[] cache)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HandPotential

public HandPotential()
Method Detail

getLastPPot

public double getLastPPot()
obtain the PPot calculated during the last call to ppot.

Returns:
the last calculated ppot.

getLastNPot

public double getLastNPot()
obtain the PPot calculated during the last call to npot.

Returns:
the last calculated npot.

ppot

public double ppot(Card c1,
                   Card c2,
                   Hand bd,
                   com.biotools.poker.model.WeightTable w,
                   boolean full)
Calculate the PPot and NPot of a hand. (Papp 1998, 5.3)

Parameters:
c1 - the first hole card
c2 - the second hole card
bd - the board cards
w - the weight table to use
full - if true, a full 2-card look ahead will be done (slow)
Returns:
the ppot (also sets npot variable accessible with getLastNPot())

CrudePotential1

public static double CrudePotential1(Card c1,
                                     Card c2,
                                     Hand board)
A crude but fast approximation of PPOT.

Parameters:
c1 - the first hole card
c2 - the second hole card
board - the board cards

rankHandCached

public int rankHandCached(int i,
                          int j,
                          int k,
                          Hand bd,
                          int[] cache)

rankHandCached

public int rankHandCached(int i,
                          int j,
                          int k,
                          int l,
                          Hand bd,
                          int[] cache)

ppot_raw

public double ppot_raw(Card c1,
                       Card c2,
                       Hand bd,
                       boolean full)
Calculate the raw (unweighted) PPot and NPot of a hand. (Papp 1998, 5.3)

Parameters:
c1 - the first hole card
c2 - the second hole card
bd - the board cards
full - if true, a full 2-card look ahead will be done (slow)
Returns:
the ppot (also sets npot variable accessible with getLastNPot())