net.sourceforge.cilib.games.agent.state.traversal
Class StateTraversalStrategy

java.lang.Object
  extended by net.sourceforge.cilib.games.agent.state.traversal.StateTraversalStrategy
All Implemented Interfaces:
Serializable, Cloneable
Direct Known Subclasses:
MinMaxAlphaBetaTraversalStrategy

public abstract class StateTraversalStrategy
extends Object
implements Cloneable

Author:
leo This strategy determines how the state space for a game is traversed when the StateEvaluationAgent needs to make a decision.
See Also:
Serialized Form

Field Summary
protected  StateEvaluator evaluator
           
protected  int maxDepth
           
 
Constructor Summary
StateTraversalStrategy()
           
StateTraversalStrategy(StateTraversalStrategy other)
           
 
Method Summary
abstract  StateTraversalStrategy getClone()
          Create a cloned copy of the current object and return it.
 StateEvaluator getEvaluator()
           
 int getMaxDepth()
           
abstract  GameState selectState(Game<GameState> game, int playerID)
          Select a GameState from the given game objects list of possible states for the specified player.
 void setEvaluator(StateEvaluator evaluator)
           
 void setMaxDepth(int maxDepth)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

evaluator

protected StateEvaluator evaluator

maxDepth

protected int maxDepth
Constructor Detail

StateTraversalStrategy

public StateTraversalStrategy()

StateTraversalStrategy

public StateTraversalStrategy(StateTraversalStrategy other)
Method Detail

selectState

public abstract GameState selectState(Game<GameState> game,
                                      int playerID)
Select a GameState from the given game objects list of possible states for the specified player.

Parameters:
game - the game at the state when the decision should be made
playerID - the ID of the player that needs to make a decision
Returns:
The selected GameState

getClone

public abstract StateTraversalStrategy getClone()
Create a cloned copy of the current object and return it. In general the created copy will be a deep copy of the provided instance. As a result this operation an be quite expensive if used incorrectly.

Specified by:
getClone in interface Cloneable
Returns:
An exact clone of the current object instance.
See Also:
Object.clone()

setEvaluator

public void setEvaluator(StateEvaluator evaluator)

getEvaluator

public StateEvaluator getEvaluator()

getMaxDepth

public int getMaxDepth()

setMaxDepth

public void setMaxDepth(int maxDepth)


Copyright © 2009 CIRG. All Rights Reserved.