public class MonteCarloClassicPlayer extends AbstractMonteCarloPlayer
Player.boardType, Player.playerType
Constructor and Description |
---|
MonteCarloClassicPlayer()
construct a new classical monte carlo player
|
Modifier and Type | Method and Description |
---|---|
protected void |
addScore(GameState gs,
int playerNumber)
we add 1, if we won
|
protected double |
calculateScore(int playerNumber)
the number of trials won against the total number of games
|
protected void |
initializeRatio()
classical monte-carlo has always ration 1.0
|
protected void |
initializeScore(int playerNumber)
before the first trial, reset the number of winning/other trials
|
protected void |
updateRatio(GameState gs,
java.util.Set<Move> moves)
classical monte-carlo does not update the ratio
|
move
isComputer, otherMoved, ratioTimeLeft, setMaximumNumberOfNodes, setMaxTime, setPlayerNumber, startMove, timeUsed
public MonteCarloClassicPlayer()
protected void initializeRatio()
initializeRatio
in class AbstractMonteCarloPlayer
protected void addScore(GameState gs, int playerNumber)
addScore
in class AbstractMonteCarloPlayer
protected double calculateScore(int playerNumber)
calculateScore
in class AbstractMonteCarloPlayer
protected void initializeScore(int playerNumber)
initializeScore
in class AbstractMonteCarloPlayer
protected void updateRatio(GameState gs, java.util.Set<Move> moves)
updateRatio
in class AbstractMonteCarloPlayer