org.eclipse.palamedes.gdl.core.resolver.jocular
Class ReasonerAdapter

java.lang.Object
  extended by org.eclipse.palamedes.gdl.core.resolver.jocular.ReasonerAdapter
All Implemented Interfaces:
IReasoner

public final class ReasonerAdapter
extends java.lang.Object
implements IReasoner


Constructor Summary
ReasonerAdapter(java.lang.String gameDescription)
           
 
Method Summary
 IFluent createFluent(java.lang.String gdlString)
          This method should return a valid FluentAdapter for this reasoner.
 IMove createMove(java.lang.String gdlString)
          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.
 org.eclipse.palamedes.gdl.core.resolver.jocular.ReasonerAdapter.StateAdapter getInitialState()
           
 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.
 java.lang.String[] getRoleNames()
           
 java.lang.String getSourceGDL()
           
 boolean isTerminal(stanfordlogic.prover.ProofContext state)
           
protected  stanfordlogic.prover.Fact makeQuery(java.lang.String... args)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ReasonerAdapter

public ReasonerAdapter(java.lang.String gameDescription)
Method Detail

makeQuery

protected stanfordlogic.prover.Fact makeQuery(java.lang.String... args)

isTerminal

public boolean isTerminal(stanfordlogic.prover.ProofContext state)

getGoalValue

public int getGoalValue(java.lang.String roleName,
                        IGameState nextState)
                 throws java.lang.InterruptedException
Description copied from interface: IReasoner
Returns a value between 0 - 100 if a goal value exists; otherwise -1.

Specified by:
getGoalValue in interface IReasoner
Throws:
java.lang.InterruptedException

getLegalMoves

public IMove[] getLegalMoves(java.lang.String roleName,
                             IGameState currentNode)
                      throws java.lang.InterruptedException
Description copied from interface: IReasoner
Returns the legal moves for a specified role.

Specified by:
getLegalMoves in interface IReasoner
Throws:
java.lang.InterruptedException

getNextState

public IGameState getNextState(IGameState currentState,
                               IMove[] moves)
                        throws java.lang.InterruptedException
Description copied from interface: IReasoner
Returns the next state for a given parent state and specified moves.

Specified by:
getNextState in interface IReasoner
Throws:
java.lang.InterruptedException

getRoleNames

public java.lang.String[] getRoleNames()

getInitialState

public org.eclipse.palamedes.gdl.core.resolver.jocular.ReasonerAdapter.StateAdapter getInitialState()

getSourceGDL

public java.lang.String getSourceGDL()

createFluent

public IFluent createFluent(java.lang.String gdlString)
Description copied from interface: IReasoner
This method should return a valid FluentAdapter for this reasoner.

Specified by:
createFluent in interface IReasoner

createMove

public IMove createMove(java.lang.String gdlString)
Description copied from interface: IReasoner
This method should return a valid MoveAdapter for this reasoner. String should contain "(does )"

Specified by:
createMove in interface IReasoner