antichess.ai
Class MinimaxAI<M extends Move,B extends Board<M>>
java.lang.Object
antichess.ai.MinimaxAI<M,B>
- All Implemented Interfaces:
- GameAI<M,B>
- Direct Known Subclasses:
- AntichessAI
public class MinimaxAI<M extends Move,B extends Board<M>>
- extends Object
- implements GameAI<M,B>
MinimaxAI
is a GameAI
that implements
the minimax game search algorithm
Method Summary |
M |
findMove(B board,
long timeLeft,
long opponentTimeLeft)
Return a move computed by the AI for the given board, with the
given amount of time remaining, in milliseconds. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MinimaxAI
public MinimaxAI(BoardEvaluator<B> eval)
- Effects:
- construct a new
MinimaxAI
with the given
board evaluation function.
findMove
public M findMove(B board,
long timeLeft,
long opponentTimeLeft)
- Description copied from interface:
GameAI
Return a move computed by the AI for the given board, with the
given amount of time remaining, in milliseconds.
A time of 0 for either time means that player is untimed.
- Specified by:
findMove
in interface GameAI<M extends Move,B extends Board<M>>
timeLeft
- : The time left on the current player's clockopponentTimeLeft
- : The time remaining on the other player's clock- See Also:
GameAI.findMove(B, long, long)