Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## glassfrog.players
Class RandomPlayer

    java.lang.Object
      glassfrog.players.Player
          glassfrog.players.RandomPlayer

All Implemented Interfaces:
  java.io.Serializable, java.lang.Comparable<Player>

Direct Known Subclasses:
  RandomLimitPlayer, RandomNoLimitPlayer

    public abstract class RandomPlayer

extends Player

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

Author:
  jdavidso
See Also:
  Serialized Form

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

### seed

    private transient int seed

### rng

    protected transient java.util.Random rng

  A Random to generate actions

### foldWeight

    protected transient int foldWeight

  Wieght of the fold action in the random distribution

### callWeight

    protected transient int callWeight

  Wieght of the call action in the random distribution

### raiseWeight

    protected transient int raiseWeight

  Wieght of the raise action in the random distribution

Constructor Detail

### RandomPlayer

    public RandomPlayer(java.lang.String name,
                        int buyIn,
                        int seed)

  A constructor for Random Player that takes a seed to seed the action RNG with

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

### RandomPlayer

    public RandomPlayer(java.lang.String name,
                        int buyIn,
                        java.lang.String weights)

  A constructor for Random Plauer that takes a string for the action weights

  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

### RandomPlayer

    public RandomPlayer(java.lang.String name,
                        int buyIn)

  A generic Random Player that has a random seed and uniform action weights

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

Method Detail

### calculateWeights

    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

  Parameters:
    `weightString` - A comma delimited string representing action weights

### update

    public void update(java.lang.String gamestate)

  Do nothing on update

  Specified by:
    `update` in class `Player`
  Parameters:
    `gamestate` - the gamestate string

### shutdown

    public void shutdown()

  Do nothing on shutdown.

  Specified by:
    `shutdown` in class `Player`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD