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
|
moveisComputer, otherMoved, ratioTimeLeft, setMaximumNumberOfNodes, setMaxTime, setPlayerNumber, startMove, timeUsedpublic MonteCarloClassicPlayer()
protected void initializeRatio()
initializeRatio in class AbstractMonteCarloPlayerprotected void addScore(GameState gs, int playerNumber)
addScore in class AbstractMonteCarloPlayerprotected double calculateScore(int playerNumber)
calculateScore in class AbstractMonteCarloPlayerprotected void initializeScore(int playerNumber)
initializeScore in class AbstractMonteCarloPlayerprotected void updateRatio(GameState gs, java.util.Set<Move> moves)
updateRatio in class AbstractMonteCarloPlayer