public abstract class Heuristic
extends java.lang.Object
Constructor and Description |
---|
Heuristic() |
Modifier and Type | Method and Description |
---|---|
static java.lang.String[] |
availableHeuristics(java.lang.String gameName)
lists all the heuristics available in the system
|
static Heuristic |
getHeuristic(java.lang.String name,
GameSpecification specs)
constructor method that creates a heuristic of the specified type
|
abstract double |
heuristic(GameState gameState,
int forPlayer)
a heuristic receives the current state and player number - from whose viewpoint the game situation is to be evaluated.
|
public abstract double heuristic(GameState gameState, int forPlayer)
gameState
- current game stateforPlayer
- current playerpublic static java.lang.String[] availableHeuristics(java.lang.String gameName)
public static Heuristic getHeuristic(java.lang.String name, GameSpecification specs)
name
- heuristic namespecs
- game specification that is passed to the heuristic constructor if it is needed