glassfrog.players
Class RandomNoLimitPlayer

java.lang.Object
  extended by glassfrog.players.Player
      extended by glassfrog.players.RandomPlayer
          extended by glassfrog.players.RandomNoLimitPlayer
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<Player>

public class RandomNoLimitPlayer
extends RandomPlayer

The RandomNoLimit player class is a version of the RandomPlayer for NoLimit Texas Holdem The Player will perform a random action based on a seed, a random seed or a string of weights ("1,1,1") being the uniform weighted string for f,c,r. A raise value will be random number between the players min bet and their stacksize This extends the RandomPlayer class

Author:
jdavidso
See Also:
Serialized Form

Field Summary
private  int minBet
           
 
Fields inherited from class glassfrog.players.RandomPlayer
callWeight, foldWeight, raiseWeight, rng
 
Constructor Summary
RandomNoLimitPlayer(java.lang.String name, int buyIn)
          Constructor for a general purpose Random No Limit player (random seed, uniform actions)
RandomNoLimitPlayer(java.lang.String name, int buyIn, int seed)
          Constructor for a Random No Limit Player with a seed
RandomNoLimitPlayer(java.lang.String name, int buyIn, java.lang.String weights)
          Constructor for a Random No Limit Player with weighted values for the actions
 
Method Summary
 java.lang.String getAction()
          Using a wieghted sum and an random number, generate the next action for the bot to take.
 java.lang.String toString()
          Append RandomNoLimit identifier to the @Player toString method
 void update(java.lang.String gamestate)
          Update the players information based on the gamestate String.
 
Methods inherited from class glassfrog.players.RandomPlayer
shutdown
 
Methods inherited from class glassfrog.players.Player
addToScore, bet, call, compareTo, fold, 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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

minBet

private int minBet
Constructor Detail

RandomNoLimitPlayer

public RandomNoLimitPlayer(java.lang.String name,
                           int buyIn,
                           int seed)
Constructor for a Random No Limit Player with a seed

Parameters:
name - String representing the player name
buyIn - int representing the buy in amount
seed - an int to seed the rng

RandomNoLimitPlayer

public RandomNoLimitPlayer(java.lang.String name,
                           int buyIn,
                           java.lang.String weights)
Constructor for a Random No Limit Player with weighted values for the actions

Parameters:
name - String representing the player name
buyIn - int representing the buy in amount
weights - A String representing the f,c,r weights ("1,1,1") being uniform

RandomNoLimitPlayer

public RandomNoLimitPlayer(java.lang.String name,
                           int buyIn)
Constructor for a general purpose Random No Limit player (random seed, uniform actions)

Parameters:
name - String representing the player name
buyIn - int representing the buy in amount
Method Detail

getAction

public java.lang.String getAction()
Using a wieghted sum and an random number, generate the next action for the bot to take. If the action is a raise, then get a random bet amount between the min bet and the stacksize

Specified by:
getAction in class Player
Returns:
The action to send to the dealer

update

public void update(java.lang.String gamestate)
Update the players information based on the gamestate String. In this player, the min bet is calculated from the last raise made, the last blind made or just return 1;

Overrides:
update in class RandomPlayer
Parameters:
gamestate - The AAAI formated gamestate String

toString

public java.lang.String toString()
Append RandomNoLimit identifier to the @Player toString method

Overrides:
toString in class Player
Returns:
"RandomNoLimit"+the @Player toString method