com.antelmann.game.checkers
Class CheckersPlayer
java.lang.Object
com.antelmann.game.TemplatePlayer
com.antelmann.game.checkers.CheckersPlayer
- All Implemented Interfaces:
- Player, Serializable
public class CheckersPlayer
- extends TemplatePlayer
AI for the CheckersGame
- Author:
- Holger Antelmann
- See Also:
- Serialized Form
|
Method Summary |
boolean |
canPlayGame(GamePlay game)
canPlayGame() returns true only if the Player provides
an applicable heuristic for the type of game given. |
double |
heuristic(GamePlay game,
GameMove move,
int[] role)
seems effective for the opening, but not sufficiently
discriminating in the end game |
void |
setRandomSeed(long seed)
if seed = 0, randomization is disabled |
String |
toString()
overridden to return some information about the player |
| Methods inherited from class com.antelmann.game.TemplatePlayer |
disableTracking, enableTracking, evaluate, evaluate, getlevelOverride, getMonitors, getOrderMoves, getPlayerName, getSearchOption, numberOfPositionsSearched, numberOfRequests, performanceRatio, pruneMove, selectMove, setlevelOverride, setOrderMoves, setPlayerName, setSearchOption, setTracking, statsAsString, totalTimeTaken, trackingEnabled |
CheckersPlayer
public CheckersPlayer()
CheckersPlayer
public CheckersPlayer(String name)
setRandomSeed
public void setRandomSeed(long seed)
- if seed = 0, randomization is disabled
canPlayGame
public boolean canPlayGame(GamePlay game)
- Description copied from interface:
Player
- canPlayGame() returns true only if the Player provides
an applicable heuristic for the type of game given.
This way, a player can control whether it can a game.
//Example:
if (game instanceof MyGameClass) return true; else return false;
// or:
if (game.getClass() == myFavoriteGame.getClass()) return true; else return false;
heuristic
public double heuristic(GamePlay game,
GameMove move,
int[] role)
- seems effective for the opening, but not sufficiently
discriminating in the end game
- See Also:
TemplatePlayer
toString
public String toString()
- Description copied from class:
TemplatePlayer
- overridden to return some information about the player
- Overrides:
toString in class TemplatePlayer
(c) 2001-2006 Holger Antelmann - all rights reserved (contact: info@antelmann.com)
see www.antelmann.com/developer for further details and available downloads