s3games.player

## Class MonteCarloClassicPlayer

- java.lang.Object
- - s3games.player.Player
  - - s3games.player.AbstractMonteCarloPlayer
    - - s3games.player.MonteCarloClassicPlayer

-     public class MonteCarloClassicPlayer
      extends AbstractMonteCarloPlayer

  This is the default version of monte carlo player, it only looks at the number of won trials compared to the number of all trials

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class s3games.player.Player

      `Player.boardType, Player.playerType`

  - ### Field Summary

    - ### Fields inherited from class s3games.player.Player

      `maxNodes, number`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `MonteCarloClassicPlayer()` construct a new classical monte carlo player

  - ### Method Summary

    Methods
    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

    - ### Methods inherited from class s3games.player.AbstractMonteCarloPlayer

      `move`

    - ### Methods inherited from class s3games.player.Player

      `isComputer, otherMoved, ratioTimeLeft, setMaximumNumberOfNodes, setMaxTime, setPlayerNumber, startMove, timeUsed`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### MonteCarloClassicPlayer

          public MonteCarloClassicPlayer()

      construct a new classical monte carlo player

  - ### Method Detail

    - #### initializeRatio

          protected void initializeRatio()

      classical monte-carlo has always ration 1.0
      Specified by:
        `initializeRatio` in class `AbstractMonteCarloPlayer`

    - #### addScore

          protected void addScore(GameState gs,
                      int playerNumber)

      we add 1, if we won
      Specified by:
        `addScore` in class `AbstractMonteCarloPlayer`

    - #### calculateScore

          protected double calculateScore(int playerNumber)

      the number of trials won against the total number of games
      Specified by:
        `calculateScore` in class `AbstractMonteCarloPlayer`

    - #### initializeScore

          protected void initializeScore(int playerNumber)

      before the first trial, reset the number of winning/other trials
      Specified by:
        `initializeScore` in class `AbstractMonteCarloPlayer`

    - #### updateRatio

          protected void updateRatio(GameState gs,
                         java.util.Set<Move> moves)

      classical monte-carlo does not update the ratio
      Specified by:
        `updateRatio` in class `AbstractMonteCarloPlayer`