s3games.player

## Class MonteCarloRatioPlayer2

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

-     public class MonteCarloRatioPlayer2
      extends AbstractMonteCarloPlayer

  Monte carlo player where trials have differnt weight - depending on the depth of the trial - the deeper the trial (the more moves needed), the lower its contribution to the overall scores

- - ### 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
    `MonteCarloRatioPlayer2()` construct this type of monte-carlo player

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected void` | `addScore(GameState gs, int i)` add the current trial to the overall scores
    `protected double` | `calculateScore(int i)` calculate the resulting scores after all trials completed
    `protected void` | `initializeRatio()` initialize the ratio at the beginning of each trial
    `protected void` | `initializeScore(int i)` initialize the scores before all trials are started
    `protected void` | `updateRatio(GameState gs, java.util.Set<Move> moves)` update the current trial ratio every time a move is made

    - ### 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

    - #### MonteCarloRatioPlayer2

          public MonteCarloRatioPlayer2()

      construct this type of monte-carlo player

  - ### Method Detail

    - #### initializeRatio

          protected void initializeRatio()

      initialize the ratio at the beginning of each trial
      Specified by:
        `initializeRatio` in class `AbstractMonteCarloPlayer`

    - #### updateRatio

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

      update the current trial ratio every time a move is made
      Specified by:
        `updateRatio` in class `AbstractMonteCarloPlayer`

    - #### initializeScore

          protected void initializeScore(int i)

      initialize the scores before all trials are started
      Specified by:
        `initializeScore` in class `AbstractMonteCarloPlayer`

    - #### addScore

          protected void addScore(GameState gs,
                      int i)

      add the current trial to the overall scores
      Specified by:
        `addScore` in class `AbstractMonteCarloPlayer`

    - #### calculateScore

          protected double calculateScore(int i)

      calculate the resulting scores after all trials completed
      Specified by:
        `calculateScore` in class `AbstractMonteCarloPlayer`