knockabout.search
Interface SearchAlgorithm

All Known Implementing Classes:
AlphaBetaSearchAlgorithm, DCMinMaxSearchAlgorithm, ItMinMaxSearchAlgorithm, MCSearchAlgorithm, MinMaxSearchAlgorithm

public interface SearchAlgorithm

Interface to be implemented by search algorithm used by SearcherPlayer


Method Summary
 int getAverageBranchingFactor()
          Average branching factor
 float getBestMoveUtility()
           
 Heuristic getHeuristic()
           
 GameState getInitialState()
           
 int getMaxDepth()
           
 int getNumberOfExploredNodes()
          Number of min nodes + number of max nodes explored
 Move search()
          Evaluate the best move to do
 void setHeuristic(Heuristic heuristic)
          The heuristic function to evaluate the utility of non terminal nodes
 void setInitialState(GameState initialState)
          The initial state of the game
 

Method Detail

getInitialState

public GameState getInitialState()
Returns:

setInitialState

public void setInitialState(GameState initialState)
The initial state of the game

Parameters:
initialState -

search

public Move search()
Evaluate the best move to do

Returns:

getBestMoveUtility

public float getBestMoveUtility()
Returns:
The utility of the move returned by the last call of search()

getNumberOfExploredNodes

public int getNumberOfExploredNodes()
Number of min nodes + number of max nodes explored

Returns:

getAverageBranchingFactor

public int getAverageBranchingFactor()
Average branching factor


getMaxDepth

public int getMaxDepth()
Returns:
Max depth attained

getHeuristic

public Heuristic getHeuristic()
Returns:

setHeuristic

public void setHeuristic(Heuristic heuristic)
The heuristic function to evaluate the utility of non terminal nodes

Parameters:
heuristic -