|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectgames.strategy.common.player.ai.GameState<Play>
Play - class capable of representing a game playpublic abstract class GameState<Play>
Abstract class representing game state, for use by AI game algorithms.
| Constructor Summary | |
|---|---|
GameState()
|
|
| Method Summary | |
|---|---|
abstract boolean |
cutoffTest()
Test to see if the current state represents a pseudu-terminal state. |
abstract boolean |
gameIsOver()
Test to see if the current state represents an endgame state. |
abstract Play |
getMove()
Get the play which resulted in this state. |
abstract GameState<Play> |
getSuccessor(Play play)
Get the state which will result from performing the specified play. |
abstract float |
getUtility()
Get the utility (or heuristic evaluation score) for this state. |
abstract java.util.Collection<GameState<Play>> |
successors()
Get the collection of all states which can be reached from this state by performing a legal play. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public GameState()
| Method Detail |
|---|
public abstract GameState<Play> getSuccessor(Play play)
play - a legal game play
public abstract Play getMove()
public abstract java.util.Collection<GameState<Play>> successors()
Collection of successor statespublic abstract float getUtility()
public abstract boolean gameIsOver()
true this state represents an endgame state, false otherwise.public abstract boolean cutoffTest()
If this method returns true,
then successors() must return a non-empty Collection.
Likewise, if this method returns false,
then successors() must return an empty Collection.
All endgame states are pseudo-terminal states. Additionally, any state which the AI search algorithm should not search beyond are pseudo-terminal states.
true this state represents a pseudo-terminal state, false otherwise.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||