org.jscience.computing.game.awari
Class AwariPlayer

java.lang.Object
  extended by org.jscience.computing.game.TemplatePlayer
      extended by org.jscience.computing.game.awari.AwariPlayer
All Implemented Interfaces:
java.io.Serializable, Player

public class AwariPlayer
extends TemplatePlayer

AwariPlayer adds AI to the AwariGame

See Also:
AwariGame, Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class org.jscience.computing.game.TemplatePlayer
TemplatePlayer.MoveEvaluater, TemplatePlayer.Synchronizer
 
Field Summary
 
Fields inherited from class org.jscience.computing.game.TemplatePlayer
levelOverwrite, monitors, orderMoves, playerName, SEARCH_ALPHABETA, SEARCH_MINMAX, searchOption
 
Constructor Summary
AwariPlayer()
          Creates a new AwariPlayer object.
AwariPlayer(java.lang.String name)
          Creates a new AwariPlayer object.
 
Method Summary
 boolean canPlayGame(GamePlay game)
          DOCUMENT ME!
 double heuristic(GamePlay game, GameMove move, int[] role)
          DOCUMENT ME!
 void setRandomSeed(long seed)
          randomizes the heuristics with the given seed.
 
Methods inherited from class org.jscience.computing.game.TemplatePlayer
disableTracking, enableTracking, evaluate, evaluate, getLevelOverwrite, getMonitors, getOrderMoves, getPlayerName, getSearchOption, numberOfPositionsSearched, numberOfRequests, performanceRatio, pruneMove, selectMove, setLevelOverwrite, setOrderMoves, setPlayerName, setSearchOption, setTracking, statsAsString, toString, totalTimeTaken, trackingEnabled
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AwariPlayer

public AwariPlayer()
Creates a new AwariPlayer object.


AwariPlayer

public AwariPlayer(java.lang.String name)
Creates a new AwariPlayer object.

Parameters:
name - DOCUMENT ME!
Method Detail

setRandomSeed

public void setRandomSeed(long seed)
randomizes the heuristics with the given seed. By default, randomization is disabled; you can disable randomization through this method by using 0 as the seed parameter. Every other number will initialize the internal randomizer.

Parameters:
seed - DOCUMENT ME!

canPlayGame

public boolean canPlayGame(GamePlay game)
DOCUMENT ME!

Parameters:
game - DOCUMENT ME!
Returns:
DOCUMENT ME!

heuristic

public double heuristic(GamePlay game,
                        GameMove move,
                        int[] role)
DOCUMENT ME!

Parameters:
game - DOCUMENT ME!
move - DOCUMENT ME!
role - DOCUMENT ME!
Returns:
DOCUMENT ME!
See Also:
TemplatePlayer