org.eclipse.palamedes.gdl.core.model
Interface IReasoner

All Known Implementing Classes:
ReasonerAdapter, ReasonerAdapter, ReasonerAdapter

public interface IReasoner

Classes that implement the IReasoner interface are responsible for retrieving the legal moves and the next states. If you want to use an own reasoner this is the Interface you have to code against.


Method Summary
 IFluent createFluent(java.lang.String fluentStr)
          This method should return a valid FluentAdapter for this reasoner.
 IMove createMove(java.lang.String moveStr)
          This method should return a valid MoveAdapter for this reasoner.
 int getGoalValue(java.lang.String roleName, IGameState nextState)
          Returns a value between 0 - 100 if a goal value exists; otherwise -1.
 IMove[] getLegalMoves(java.lang.String roleName, IGameState currentNode)
          Returns the legal moves for a specified role.
 IGameState getNextState(IGameState currentState, IMove[] moves)
          Returns the next state for a given parent state and specified moves.
 

Method Detail

getLegalMoves

IMove[] getLegalMoves(java.lang.String roleName,
                      IGameState currentNode)
                      throws java.lang.InterruptedException
Returns the legal moves for a specified role.

Throws:
java.lang.InterruptedException

getNextState

IGameState getNextState(IGameState currentState,
                        IMove[] moves)
                        throws java.lang.InterruptedException
Returns the next state for a given parent state and specified moves.

Throws:
java.lang.InterruptedException

getGoalValue

int getGoalValue(java.lang.String roleName,
                 IGameState nextState)
                 throws java.lang.InterruptedException
Returns a value between 0 - 100 if a goal value exists; otherwise -1.

Throws:
java.lang.InterruptedException

createFluent

IFluent createFluent(java.lang.String fluentStr)
This method should return a valid FluentAdapter for this reasoner.


createMove

IMove createMove(java.lang.String moveStr)
This method should return a valid MoveAdapter for this reasoner. String should contain "(does )"