|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--lnsc.page.AbstractState | +--lnsc.page.AbstractStateWithGen
Optional basis for class implementing State
interface. Derived
classes constructor must fill the protected variables. Add necessary state
information and properties. This implementation uses ActionGenerator
and StateGenerator
to respond to State.getActions()
and
State.getNextStates(lnsc.page.Action)
(and for State#getActionsEnumerator) calls. When
states are not observable, it uses a (@link StateGenerator} with
null
action to generate the observable states for the agents.
It does not support local Do or Undo operation (within an instance do
operation) nor clone operation (by default). State and Action generators
properties should be passed to to local variable (isDeterministic,
areActionsFixed, ActionCount), oservable state generator should be should
be deterministic (return a single state).
Constructor Summary | |
AbstractStateWithGen()
|
Method Summary | |
Action[] |
getActions()
Returns the list of available action from the current state. |
java.util.Enumeration |
getActionsEnumerator()
Returns an iterator that list the available actions from the current state. |
State[] |
getNextStates(Action a)
Returns the list state following the current state under a given action. |
State[] |
getObservableStates()
Returns the list state of observable states for the agents. |
Methods inherited from class lnsc.page.AbstractState |
areActionsFixed, clone, doAction, getActionCount, getProbability, getValue, isCloneable, isDeterministic, isFinal, isObservable, isValid, supportsDo, supportsUndo, toDataSet, toString, undoAction |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public AbstractStateWithGen()
Method Detail |
public Action[] getActions()
State
public java.util.Enumeration getActionsEnumerator()
State
getActionsEnumerator
in interface State
getActionsEnumerator
in class AbstractState
public State[] getNextStates(Action a)
State
a
- The action to apply.
public State[] getObservableStates()
State
getObservableStates
in interface State
getObservableStates
in class AbstractState
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |