Package b2p.search.aima
Interface IGame
-
- All Known Implementing Classes:
TablutGame
public interface IGame
Defines a standard interface for a game.- Author:
- Alessandro Buldini, Alessandro Pomponio, Federico Zanini
- See Also:
- Aima Java
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.util.List<IAction>
getActions(IState state)
Returns all the possible actions a player can do at this stage of the gameit.unibo.ai.didattica.competition.tablut.domain.State.Turn
getPlayer(IState state)
Returns the player who has to play at this stage of the gameIState
getResult(IState state, IAction action)
Returns the state of the game after performing the input actionint
getUtility(IState state, it.unibo.ai.didattica.competition.tablut.domain.State.Turn player)
Returns the heuristic value for the given state and playerboolean
isTerminal(IState state)
Returns a boolean whether the current state is a terminal one
-
-
-
Method Detail
-
getPlayer
it.unibo.ai.didattica.competition.tablut.domain.State.Turn getPlayer(IState state)
Returns the player who has to play at this stage of the game- Parameters:
state
- represents the current state of the game- Returns:
- the player who has to move
- See Also:
IState
-
getActions
java.util.List<IAction> getActions(IState state)
Returns all the possible actions a player can do at this stage of the game- Parameters:
state
- represents the current state of the game- Returns:
- a list containing all possible actions
- See Also:
IState
-
getResult
IState getResult(IState state, IAction action)
Returns the state of the game after performing the input action
-
isTerminal
boolean isTerminal(IState state)
Returns a boolean whether the current state is a terminal one- Parameters:
state
- IState to be evaluated- Returns:
true
if the current state is a terminal one- See Also:
IState
-
getUtility
int getUtility(IState state, it.unibo.ai.didattica.competition.tablut.domain.State.Turn player)
Returns the heuristic value for the given state and player- Parameters:
state
- state of the game that needs to be evaluatedplayer
- player for which the heuristic function should be evaluated- Returns:
- the heuristic value of the input state
- See Also:
IState
,State.Turn
-
-