Class ThreatBasedHeuristic

java.lang.Object
net.demilich.metastone.game.behaviour.heuristic.ThreatBasedHeuristic
All Implemented Interfaces:
Serializable, Heuristic

public class ThreatBasedHeuristic extends Object implements Heuristic, Serializable
A heuristic that considers a linear combination of game state entities to determine the strength of a game state.
See Also:
  • Constructor Details

    • ThreatBasedHeuristic

      public ThreatBasedHeuristic(FeatureVector vector)
  • Method Details

    • getScore

      public double getScore(GameContext context, int playerId)
      Description copied from interface: Heuristic
      A scoring function mapping from game state to a double representing the strength of that game state.
      Specified by:
      getScore in interface Heuristic
      Parameters:
      context - The game context. Use its GameContext.getGameState() to evaluate its game state, do not mutate it here.
      playerId - The player whose point of view should be used to calculate this score.
      Returns:
      A possibly negative score.