|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--poker.ai.ProbTriple
The Probabiltiy Triple Generator. Stores a probability distribution for three parts for fold, call and raise.
Constructor Summary | |
ProbTriple()
Default constructor. |
|
ProbTriple(double f,
double c,
double r)
Construct with the values given. |
Method Summary | |
void |
add(ProbTriple pt)
Add the values of one triple into this one. |
void |
dotProduct(ProbTriple pt)
Add the values of one triple into this one. |
double |
getCall()
|
double |
getFold()
|
double |
getRaise()
|
double |
getValue(int action)
Get the probability for an action |
void |
normalize()
Normalize the values in the triple to sum to 1.0 |
int |
select()
Randomly select an action from the triple. |
int |
select(double spin)
Select an action from the triple using the given spinner. |
int |
select(double spin,
boolean useMax)
Select an action from the triple distribution. |
int |
selectMax()
Select the maximum value. |
int |
selectMax(double spin)
Select the maximum value. |
void |
set(double f,
double c,
double r)
Set the values given. |
void |
setCall(double c)
|
void |
setFold(double f)
|
void |
setRaise(double r)
|
java.lang.String |
toString()
|
boolean |
valid()
|
void |
weight(double val)
Multiply all entries by a constant. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public ProbTriple()
public ProbTriple(double f, double c, double r)
f
- fold probc
- call probr
- raise probMethod Detail |
public void set(double f, double c, double r)
f
- fold probc
- call probr
- raise probpublic double getFold()
public double getCall()
public double getRaise()
public double getValue(int action)
action
- FOLD/CALL/RAISEpublic void normalize()
public boolean valid()
public void add(ProbTriple pt)
public void dotProduct(ProbTriple pt)
public void weight(double val)
val
- to multiply the values.public void setFold(double f)
public void setCall(double c)
public void setRaise(double r)
public int select(double spin, boolean useMax)
spin
- a random value indexing into the triple.useMax
- take one of the maximum values in the triple.public int select(double spin)
spin
- A random number between 0 and 1public int selectMax(double spin)
spin
- A random number between 0 and 1public int selectMax()
public int select()
public java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |