net.pakl.rl
Class ActionSet

java.lang.Object
  extended by net.pakl.rl.ActionSet
Direct Known Subclasses:
ReadingPolicy

public class ActionSet
extends java.lang.Object

A ActionSet maps States to possible Actions and is used by an Agent in considering its possible next moves.


Constructor Summary
ActionSet()
           
 
Method Summary
 void allowAction(State state, Action newAction)
          This method allows you to program in a possible action given a state.
 java.util.List getAllPossibleActions(State state)
          This method returns a list of all possible actions an agent could take given a State.
 Action getRandomAllowedAction(State state)
           
 void removeAction(State state, Action oldAction)
          This method allows you to deprogram an action from being possible
 java.lang.String toText()
          Returns a textual representation of this ActionSet
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ActionSet

public ActionSet()
Method Detail

getAllPossibleActions

public java.util.List getAllPossibleActions(State state)
This method returns a list of all possible actions an agent could take given a State. If there are no actions, this function returns an empty list (rather than returning a null).


allowAction

public void allowAction(State state,
                        Action newAction)
This method allows you to program in a possible action given a state.


removeAction

public void removeAction(State state,
                         Action oldAction)
This method allows you to deprogram an action from being possible


getRandomAllowedAction

public Action getRandomAllowedAction(State state)

toText

public java.lang.String toText()
Returns a textual representation of this ActionSet