edu.columbia.cs.coms4701.search.adversarial
Interface GameProblem<K extends AgentAction,S extends GameState>


public interface GameProblem<K extends AgentAction,S extends GameState>

A search problem appropriate for formally describing a game.

Parameterized on the specific type of AgentAction and GameState used in the game.

Version:
0.1

User: aaron Date: Sep 24, 2006 Time: 2:58:34 PM

Author:
aaron@cs
See Also:
"Russell & Norvig p162"

Method Summary
 S getInitialState()
          Returns the initial state of the game board, and identifies which player will move.
 boolean isTerminalState(S state)
          The terminal test, which determines when the game is over.
 java.util.Map<K,S> successorsFromState(S theState)
          Returns a map identifying legal moves and the resulting state of each move.
 java.util.ArrayList<java.lang.Double> utilityForState(S terminalState)
          Utility function returning a numeric rating for for each player, given a terminal state.
 

Method Detail

getInitialState

S getInitialState()
Returns the initial state of the game board, and identifies which player will move.

Returns:
an initial GameState

successorsFromState

java.util.Map<K,S> successorsFromState(S theState)
Returns a map identifying legal moves and the resulting state of each move.

Parameters:
theState - the state in which the action is performed
Returns:
the resulting state

isTerminalState

boolean isTerminalState(S state)
The terminal test, which determines when the game is over.

Parameters:
state -
Returns:
true if the state is a terminal state.

utilityForState

java.util.ArrayList<java.lang.Double> utilityForState(S terminalState)
Utility function returning a numeric rating for for each player, given a terminal state. Most games are zero-sum, i.e. the sum of utility functions for each player is zero.

Parameters:
terminalState -
Returns:
a numeric value for terminal states.