|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectglassfrog.players.Player
glassfrog.players.RandomPlayer
public abstract class RandomPlayer
An Abstract class used to define some specific properties about Random Players such as thier RNG and thier fold call and raise weights. This class is extended from the Player class
Field Summary | |
---|---|
protected int |
callWeight
Wieght of the call action in the random distribution |
protected int |
foldWeight
Wieght of the fold action in the random distribution |
protected int |
raiseWeight
Wieght of the raise action in the random distribution |
protected java.util.Random |
rng
A Random to generate actions |
private int |
seed
|
Constructor Summary | |
---|---|
RandomPlayer(java.lang.String name,
int buyIn)
A generic Random Player that has a random seed and uniform action weights |
|
RandomPlayer(java.lang.String name,
int buyIn,
int seed)
A constructor for Random Player that takes a seed to seed the action RNG with |
|
RandomPlayer(java.lang.String name,
int buyIn,
java.lang.String weights)
A constructor for Random Plauer that takes a string for the action weights |
Method Summary | |
---|---|
private void |
calculateWeights(java.lang.String weightString)
This method assumes the weightString is correct with 3 weights, each comma delimited and corrisponding to f,c,r actions |
void |
shutdown()
Do nothing on shutdown. |
void |
update(java.lang.String gamestate)
Do nothing on update |
Methods inherited from class glassfrog.players.Player |
---|
addToScore, bet, call, compareTo, fold, getAction, getBuyIn, getCardString, getCurrentBet, getHandRank, getHandString, getName, getPosition, getScore, getSeat, getStack, getTotalCommitedToPot, initTimeout, isAAAIPlayer, isActed, isAllIn, isFolded, isGuiPlayer, isSocketPlayer, payout, postBlind, resetHand, resetPlayer, resetRound, resetStack, setBuyIn, setCardString, setHandRank, setHandString, setName, setPosition, setScore, setSeat, setStack, subtractTotalCommitedToPot, toShortString, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private transient int seed
protected transient java.util.Random rng
protected transient int foldWeight
protected transient int callWeight
protected transient int raiseWeight
Constructor Detail |
---|
public RandomPlayer(java.lang.String name, int buyIn, int seed)
name
- String representing the player namebuyIn
- int representing the buy in amountseed
- an int to seed the rngpublic RandomPlayer(java.lang.String name, int buyIn, java.lang.String weights)
name
- String representing the player namebuyIn
- int representing the buy in amountweights
- A String representing the f,c,r weights ("1,1,1") being uniformpublic RandomPlayer(java.lang.String name, int buyIn)
name
- String representing the player namebuyIn
- int representing the buy in amountMethod Detail |
---|
private void calculateWeights(java.lang.String weightString)
weightString
- A comma delimited string representing action weightspublic void update(java.lang.String gamestate)
update
in class Player
gamestate
- the gamestate stringpublic void shutdown()
shutdown
in class Player
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |