Holger's
Java API

com.antelmann.game.checkers
Class CheckersPlayer

java.lang.Object
  extended by com.antelmann.game.TemplatePlayer
      extended by 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

Nested Class Summary
 
Nested classes/interfaces inherited from class com.antelmann.game.TemplatePlayer
TemplatePlayer.MoveEvaluater, TemplatePlayer.Synchronizer
 
Field Summary
 
Fields inherited from class com.antelmann.game.TemplatePlayer
levelOverride, monitors, orderMoves, playerName, SEARCH_ALPHABETA, SEARCH_MINMAX, searchOption
 
Constructor Summary
CheckersPlayer()
           
CheckersPlayer(String name)
           
 
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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CheckersPlayer

public CheckersPlayer()

CheckersPlayer

public CheckersPlayer(String name)
Method Detail

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