knockabout
Class SearcherPlayer

java.lang.Object
  extended byknockabout.Player
      extended byknockabout.SearcherPlayer

public class SearcherPlayer
extends Player

A player that uses a search algorithm to choose a knockabout move


Field Summary
 
Fields inherited from class knockabout.Player
BLACK, DRAW, NOCOLOR, YELLOW
 
Constructor Summary
SearcherPlayer()
           
 
Method Summary
 Move chooseMove(Board board)
          Estimate the best move using its search algorithm given a knockabout board position.
 SearchAlgorithm getSearchAlgorithm()
           
static void main(java.lang.String[] args)
          Small test case a minmax search algo
 void setSearchAlgorithm(SearchAlgorithm algorithm)
          Set the search algorithm used by this instance
 
Methods inherited from class knockabout.Player
getMyColor, getMyName, opponentColor, setMyColor, setMyName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SearcherPlayer

public SearcherPlayer()
Method Detail

chooseMove

public Move chooseMove(Board board)
Estimate the best move using its search algorithm given a knockabout board position. Also prints usefull stats

Specified by:
chooseMove in class Player
Parameters:
board - Knockabout position
Returns:
The Move that is recommended by the search algo

getSearchAlgorithm

public SearchAlgorithm getSearchAlgorithm()
Returns:

setSearchAlgorithm

public void setSearchAlgorithm(SearchAlgorithm algorithm)
Set the search algorithm used by this instance

Parameters:
algorithm - A search implementation

main

public static void main(java.lang.String[] args)
Small test case a minmax search algo

Parameters:
args -