Package net.royalur.agent.utility
Class UtilityFunction
java.lang.Object
net.royalur.agent.utility.UtilityFunction
- Direct Known Subclasses:
PiecesAdvancedUtilityFn
A function that is used to score game states.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionfloat
scoreGame
(FastSimpleGame game) Scores the state of the game numerically, where a positive value represents that the current player is advantaged, and a negative value represents that the waiting player is advantaged.abstract float
Scores the state of the game numerically, where a positive value represents that light is advantaged, and a negative value represents that dark is advantaged.
-
Constructor Details
-
UtilityFunction
public UtilityFunction()
-
-
Method Details
-
scoreGameStateForLight
Scores the state of the game numerically, where a positive value represents that light is advantaged, and a negative value represents that dark is advantaged.- Parameters:
game
- The game to evaluate.- Returns:
- A utility value for light in the given state.
-
scoreGame
Scores the state of the game numerically, where a positive value represents that the current player is advantaged, and a negative value represents that the waiting player is advantaged.- Parameters:
game
- The game to evaluate.- Returns:
- A utility value for the current player of the game.
-