public abstract class Strategy
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected Heuristic |
heuristic
if the strategy needs a heuristic, it is stored here
|
Constructor and Description |
---|
Strategy()
default constructor uses zero heuristic
|
Modifier and Type | Method and Description |
---|---|
static java.lang.String[] |
availableStrategies(java.lang.String gameName)
list of all strategies that can be used with the specified game - place for improvement...?
|
abstract Player |
getPlayer(GameSpecification specs)
constructor method for the player of the respective strategy subclass
|
static Strategy |
getStrategy(java.lang.String name,
Heuristic h)
get a strategy instance of the specified name
|
abstract void |
learn(Game game)
learn a strategy for the specified game
|
static boolean |
learnable(java.lang.String strategyName)
determines if the specified strategy is learnable - place for improvement...
|
void |
setHeuristic(Heuristic heuristic)
set a heuristic that this strategy should be using
|
protected Heuristic heuristic
public abstract Player getPlayer(GameSpecification specs)
public abstract void learn(Game game)
public static java.lang.String[] availableStrategies(java.lang.String gameName)
public static boolean learnable(java.lang.String strategyName)
public void setHeuristic(Heuristic heuristic)