Class ThreatBasedHeuristic
java.lang.Object
net.demilich.metastone.game.behaviour.heuristic.ThreatBasedHeuristic
- All Implemented Interfaces:
Serializable
,Heuristic
A heuristic that considers a linear combination of game state entities to determine the strength of a game state.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondouble
getScore
(GameContext context, int playerId) A scoring function mapping from game state to a double representing the strength of that game state.
-
Constructor Details
-
ThreatBasedHeuristic
-
-
Method Details
-
getScore
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 interfaceHeuristic
- Parameters:
context
- The game context. Use itsGameContext.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.
-