|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcore.Player
ai.OptimizingAlphaBetaPlayer
public class OptimizingAlphaBetaPlayer
An ai player that uses alpha-beta pruning for some heuristic.
state : game state // the current state of the came according to
the ai| Constructor Summary | |
|---|---|
OptimizingAlphaBetaPlayer(Color c,
Heuristic h)
Creates a new OptimizingAlphaBetaPlayer player of the given color |
|
OptimizingAlphaBetaPlayer(Color c,
Heuristic h,
int num_threads,
PrintStream output,
Map<Position,Piece> powerupDiffs)
Creates a new OptimizingAlphaBetaPlayer player of the given color |
|
| Method Summary | |
|---|---|
Move |
askForMove(Move opponentsMove)
Gets the next move of the player, given the opponents move. |
Move |
askForMove(Move opponentsMove,
long myTime,
long opponentsTime)
|
void |
run()
Start a new threadSearch on the current state. |
void |
update(Game game)
Has the player make a series of moves. |
| Methods inherited from class core.Player |
|---|
getColor, getMove, getPersistentState |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public OptimizingAlphaBetaPlayer(Color c,
Heuristic h)
c - color of the playerh - Static evaluator to use.
public OptimizingAlphaBetaPlayer(Color c,
Heuristic h,
int num_threads,
PrintStream output,
Map<Position,Piece> powerupDiffs)
c - color of the playerh - Static evaluator to use.num_threads - Maximum number of threads to use at a timeoutput - Place to spew debugging output.powerupDiffs - Positions of powerups.| Method Detail |
|---|
public Move askForMove(Move opponentsMove)
Player
askForMove in class PlayeropponentsMove - the opponents movePlayer
public Move askForMove(Move opponentsMove,
long myTime,
long opponentsTime)
askForMove in class PlayerPlayerpublic void run()
run in interface Runnablepublic void update(Game game)
update in class Playergame - the new game
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||