public class GreedyMCPlayer extends java.lang.Object implements PokerSquaresPlayer
Constructor and Description |
---|
GreedyMCPlayer()
Create a Greedy Monte Carlo player that simulates greedy play to depth 2.
|
GreedyMCPlayer(int depthLimit)
Create a Greedy Monte Carlo player that simulates greedy play to a given depth limit.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getName()
getName - gets the uniquely identifying name of the Poker Squares player.
|
int[] |
getPlay(Card card,
long millisRemaining)
getPlay - gets the current play position for a given card within the allotted number of milliseconds.
|
void |
init()
init - initializes the player before each game
|
static void |
main(java.lang.String[] args)
Demonstrate GreedyMCPlay with Ameritish point system.
|
void |
makePlay(Card card,
int row,
int col) |
void |
setPointSystem(PokerSquaresPointSystem system,
long millis)
setScoreSystem - provides the player with the point system that will be used in subsequent games
until a new point system is specified by the same method.
|
void |
undoPlay() |
public GreedyMCPlayer()
public GreedyMCPlayer(int depthLimit)
depthLimit
- depth limit for random greedy simulated playpublic void init()
PokerSquaresPlayer
init
in interface PokerSquaresPlayer
public int[] getPlay(Card card, long millisRemaining)
PokerSquaresPlayer
getPlay
in interface PokerSquaresPlayer
card
- - card just drawn.millisRemaining
- - remaining milliseconds for play in the rest of the player's game.public void makePlay(Card card, int row, int col)
public void undoPlay()
public void setPointSystem(PokerSquaresPointSystem system, long millis)
PokerSquaresPlayer
millis
. After the given number of milliseconds, or after the player returns
from this method, the player should be ready to play. It is permissible to perform such computation
on a separate thread, but the player should be able to play immediately after the return from this
method or after the allotted time, whichever comes first.setPointSystem
in interface PokerSquaresPlayer
system
- - new score systemmillis
- - number of milliseconds allotted for player processing of the new point systempublic java.lang.String getName()
PokerSquaresPlayer
getName
in interface PokerSquaresPlayer
public static void main(java.lang.String[] args)
args
- (not used)