sandy.game.core
Class ComputerPlayer
java.lang.Object
|
+--sandy.game.core.Player
|
+--sandy.game.core.ComputerPlayer
- public class ComputerPlayer
- extends Player
This class represents a ComputerPlayer which uses a DecisionEngine for getting
the next best move. A computer player generates moves in the same thread and
hence implements the generateNextMove method. This is unlike the HumanPlayer
who never implements the above method but instead relies on the UI to set the
users next move.
|
Constructor Summary |
ComputerPlayer(GameBoard gameBoard,
int perspective,
int maxSearchDepth,
java.util.Vector policies)
The constructor. |
|
Method Summary |
protected void |
generateNextMove()
This function generates the next best move for the computer in the same
thread. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ComputerPlayer
public ComputerPlayer(GameBoard gameBoard,
int perspective,
int maxSearchDepth,
java.util.Vector policies)
- The constructor.
- Parameters:
gameBoard - The gameBoard which is being played on.perspective - The perspective of the computer player.maxSearchDepth - The maximum search depth.policies - A list of game specific evaluation policies
which will be registered with the decision engine.
generateNextMove
protected void generateNextMove()
- This function generates the next best move for the computer in the same
thread. This is done by delegating the decision making to the DecisionEngine
- Overrides:
generateNextMove in class Player