com.antelmann.game.chess
Class ChessPlayer
java.lang.Object
com.antelmann.game.TemplatePlayer
com.antelmann.game.chess.ChessPlayer
- All Implemented Interfaces:
- Player, Serializable
public class ChessPlayer
- extends TemplatePlayer
provides AI for a ChessGame - unfortunately, it's still a dumb player
- 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. |
int |
getPieceValue(com.antelmann.game.chess.ChessPiece piece)
|
double |
heuristic(GamePlay game,
GameMove move,
int[] role)
this heuristic still needs some major work; it only looks at piece
value at this point |
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 |
ChessPlayer
public ChessPlayer()
ChessPlayer
public ChessPlayer(String name)
ChessPlayer
public ChessPlayer(String name,
int searchOption,
boolean enableTracking)
ChessPlayer
public ChessPlayer(String name,
int searchOption,
boolean enableTracking,
long randomSeed)
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;
setRandomSeed
public void setRandomSeed(long seed)
- if seed = 0, randomization is disabled
heuristic
public double heuristic(GamePlay game,
GameMove move,
int[] role)
- this heuristic still needs some major work; it only looks at piece
value at this point
- See Also:
TemplatePlayer
getPieceValue
public int getPieceValue(com.antelmann.game.chess.ChessPiece piece)
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