Interface Heuristic
- All Known Implementing Classes:
ThreatBasedHeuristic
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
A heuristic is a function that takes a game state and returns a score from the given player's point of view.
-
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.
-
Method Details
-
getScore
A scoring function mapping from game state to a double representing the strength of that game state.- 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.
-