Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.adorphuye.othello.player
Class AIPlayer  view AIPlayer download AIPlayer.java

java.lang.Object
  extended bycom.adorphuye.othello.player.Player
      extended bycom.adorphuye.othello.player.AIPlayer
All Implemented Interfaces:
com.adorphuye.othello.gui.board.BoardListener, java.util.EventListener

public class AIPlayer
extends Player
implements com.adorphuye.othello.gui.board.BoardListener


Field Summary
private  int maxlevel
           
private  int[] out
           
private static int[][] positionalValues
           
private  boolean shouldMove
           
(package private)  int[][] weight
           
 
Fields inherited from class com.adorphuye.othello.player.Player
DEFAULT_DEPTH, MAX_DEPTH, MIN_DEPTH
 
Constructor Summary
AIPlayer(com.adorphuye.othello.gui.board.BoardDataModel mod, int num)
           
 
Method Summary
 java.awt.Point bestmove(int ob)
           
 void boardChanged(com.adorphuye.othello.gui.board.BoardEvent evt)
           
 void play()
           
private  int prognosis(com.adorphuye.othello.gui.board.BoardDataModel workarea, int alpha, int beta, int level)
           
 void reset()
           
 void setDepth(int l)
           
 void setweight(int[][] w)
          set the weight vector this player should use.
private  int simplescore()
           
 java.lang.String toString()
          Convert this Object to a human-readable String.
private  int worth(java.awt.Point location)
           
 
Methods inherited from class com.adorphuye.othello.player.Player
getIndex, getModel, getSide, setIndex, setModel
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

maxlevel

private int maxlevel

weight

int[][] weight

shouldMove

private boolean shouldMove

out

private int[] out

positionalValues

private static final int[][] positionalValues
Constructor Detail

AIPlayer

public AIPlayer(com.adorphuye.othello.gui.board.BoardDataModel mod,
                int num)
Method Detail

toString

public java.lang.String toString()
Description copied from class: java.lang.Object
Convert this Object to a human-readable String. There are no limits placed on how long this String should be or what it should contain. We suggest you make it as intuitive as possible to be able to place it into System.out.println() 55 and such.

It is typical, but not required, to ensure that this method never completes abruptly with a java.lang.RuntimeException.

This method will be called when performing string concatenation with this object. If the result is null, string concatenation will instead use "null".

The default implementation returns getClass().getName() + "@" + Integer.toHexString(hashCode()).

Overrides:
toString in class Player

setDepth

public void setDepth(int l)

setweight

public void setweight(int[][] w)
set the weight vector this player should use.


play

public void play()
Specified by:
play in class Player

bestmove

public java.awt.Point bestmove(int ob)

prognosis

private int prognosis(com.adorphuye.othello.gui.board.BoardDataModel workarea,
                      int alpha,
                      int beta,
                      int level)

worth

private int worth(java.awt.Point location)

simplescore

private int simplescore()

boardChanged

public void boardChanged(com.adorphuye.othello.gui.board.BoardEvent evt)
Specified by:
boardChanged in interface com.adorphuye.othello.gui.board.BoardListener
Overrides:
boardChanged in class Player

reset

public void reset()
Specified by:
reset in class Player