aima.games
Class Game

java.lang.Object
  extended by aima.games.Game
Direct Known Subclasses:
TicTacToe

public abstract class Game
extends java.lang.Object


Field Summary
protected  GameState initialState
           
protected  int level
           
protected  GameState presentState
           
 
Constructor Summary
Game()
           
 
Method Summary
protected abstract  int computeUtility(GameState state)
           
abstract  int getAlphaBetaValue(GameState state)
           
 int getLevel(GameState g)
           
abstract  int getMiniMaxValue(GameState state)
           
 java.util.ArrayList getMoves(GameState state)
           
 java.lang.String getPlayerToMove(GameState state)
           
 GameState getState()
           
abstract  java.util.ArrayList getSuccessorStates(GameState state)
           
 int getUtility(GameState h)
           
 boolean hasEnded()
           
 void makeAlphaBetaMove()
           
 void makeMiniMaxMove()
           
abstract  GameState makeMove(GameState state, java.lang.Object o)
           
 int maxValue(GameState state)
           
protected  int maxValue(GameState state, AlphaBeta ab)
           
 int minValue(GameState state)
           
 int minValue(GameState state, AlphaBeta ab)
           
protected abstract  boolean terminalTest(GameState state)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

initialState

protected GameState initialState

presentState

protected GameState presentState

level

protected int level
Constructor Detail

Game

public Game()
Method Detail

getLevel

public int getLevel(GameState g)

getMoves

public java.util.ArrayList getMoves(GameState state)

getPlayerToMove

public java.lang.String getPlayerToMove(GameState state)

getUtility

public int getUtility(GameState h)

getState

public GameState getState()

computeUtility

protected abstract int computeUtility(GameState state)

terminalTest

protected abstract boolean terminalTest(GameState state)

maxValue

public int maxValue(GameState state)

minValue

public int minValue(GameState state)

maxValue

protected int maxValue(GameState state,
                       AlphaBeta ab)

minValue

public int minValue(GameState state,
                    AlphaBeta ab)

makeMiniMaxMove

public void makeMiniMaxMove()

makeAlphaBetaMove

public void makeAlphaBetaMove()

getSuccessorStates

public abstract java.util.ArrayList getSuccessorStates(GameState state)

makeMove

public abstract GameState makeMove(GameState state,
                                   java.lang.Object o)

hasEnded

public boolean hasEnded()

getMiniMaxValue

public abstract int getMiniMaxValue(GameState state)

getAlphaBetaValue

public abstract int getAlphaBetaValue(GameState state)