s3games.ai

## Class MoreStonesHeuristic

- java.lang.Object
- - s3games.ai.Heuristic
  - - s3games.ai.MoreStonesHeuristic

-     public class MoreStonesHeuristic
      extends Heuristic

  a heuristic class that counts the number of elements of both players on the board. the more elements, the better value

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `MoreStonesHeuristic(GameSpecification specs)` constructor needs the game specification

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `double` | `heuristic(GameState gameState, int forPlayer)` returns a value -1..1 depending on the ratio of the player's and opponent's elements on the relevant locations on the board

    - ### Methods inherited from class s3games.ai.Heuristic

      `availableHeuristics, getHeuristic`

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

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

- - ### Constructor Detail

    - #### MoreStonesHeuristic

          public MoreStonesHeuristic(GameSpecification specs)

      constructor needs the game specification

  - ### Method Detail

    - #### heuristic

          public double heuristic(GameState gameState,
                         int forPlayer)

      returns a value -1..1 depending on the ratio of the player's and opponent's elements on the relevant locations on the board
      Specified by:
        `heuristic` in class `Heuristic`
      Parameters:
        `gameState` - current game state
        `forPlayer` - current player
      Returns:
        estimated value of the current game state