stimulusdelayreward
Class ExperimentState

java.lang.Object
  |
  +--lnsc.page.AbstractState
        |
        +--stimulusdelayreward.ExperimentState
All Implemented Interfaces:
java.lang.Cloneable, State
Direct Known Subclasses:
ExperimentControlState, ExperimentTestState

public class ExperimentState
extends AbstractState

Experiment is a sequence of trial and inter-trial. A trial begin by the presentation of the stimuli and terminates on juice delivery (reward). An inter-trial begins after the juice delivery. (A trial is one time-step longuer tha its delay (for reward delivery).) Trial details: - At t = 0 -> Present stimulus - At t in [1, trial_delay-1] (in setps) -> No signal - At t = trial_delay (in steps) -> Present reward - At t = trial_delay+1 -> == inter-trial at t=0 Inter-trial details - At t in [0, intertrial_delay-1] -> No signal - At t = intertrial_delay -> == trial at t=0 The class getStates uses a combination of clone and doAction. This class does not provided list of actions, since it is not obervable. This is not observable, and thus returns an equivalent observable state.


Field Summary
static int CS_ONLY
           
static java.lang.String CURRENT_DELAY
           
static java.lang.String CURRENT_STEP
           
static java.lang.String CURRENT_TRIAL
           
static java.lang.String CURRENT_TRIALTYPE
           
static int FIX_CSUS
           
static java.lang.String IS_IN_TRIAL
           
static int ITI
          m_TrialType constants
static int LONG_CSUS
           
static int MISS
           
static int PI_FIX_CSUS
           
static int PI_LONG_CSUS
           
static int PI_SHORT_CSUS
           
static java.lang.String REWARD
           
static int SHORT_CSUS
           
static java.lang.String STEP
           
static java.lang.String STIMULUS
           
static int US_ONLY
           
 
Constructor Summary
ExperimentState(int fixedDelay)
          First constructor to initialize an experiment (a run) that will begin with an inter-trial at t=0.
 
Method Summary
 void doAction(Action a)
          Do an action.
 Action[] getActions()
          Returns the list of available action 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.
 DataSet toDataSet()
          Similar to the toString method, but return state content in the form of a DataSet.
 
Methods inherited from class lnsc.page.AbstractState
areActionsFixed, clone, getActionCount, getActionsEnumerator, getProbability, getValue, isCloneable, isDeterministic, isFinal, isObservable, isValid, supportsDo, supportsUndo, toString, undoAction
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

CS_ONLY

public static final int CS_ONLY
See Also:
Constant Field Values

CURRENT_DELAY

public static final java.lang.String CURRENT_DELAY
See Also:
Constant Field Values

CURRENT_STEP

public static final java.lang.String CURRENT_STEP
See Also:
Constant Field Values

CURRENT_TRIAL

public static final java.lang.String CURRENT_TRIAL
See Also:
Constant Field Values

CURRENT_TRIALTYPE

public static final java.lang.String CURRENT_TRIALTYPE
See Also:
Constant Field Values

FIX_CSUS

public static final int FIX_CSUS
See Also:
Constant Field Values

IS_IN_TRIAL

public static final java.lang.String IS_IN_TRIAL
See Also:
Constant Field Values

ITI

public static final int ITI
m_TrialType constants

See Also:
Constant Field Values

LONG_CSUS

public static final int LONG_CSUS
See Also:
Constant Field Values

MISS

public static final int MISS
See Also:
Constant Field Values

PI_FIX_CSUS

public static final int PI_FIX_CSUS
See Also:
Constant Field Values

PI_LONG_CSUS

public static final int PI_LONG_CSUS
See Also:
Constant Field Values

PI_SHORT_CSUS

public static final int PI_SHORT_CSUS
See Also:
Constant Field Values

REWARD

public static final java.lang.String REWARD
See Also:
Constant Field Values

SHORT_CSUS

public static final int SHORT_CSUS
See Also:
Constant Field Values

STEP

public static final java.lang.String STEP
See Also:
Constant Field Values

STIMULUS

public static final java.lang.String STIMULUS
See Also:
Constant Field Values

US_ONLY

public static final int US_ONLY
See Also:
Constant Field Values
Constructor Detail

ExperimentState

public ExperimentState(int fixedDelay)
First constructor to initialize an experiment (a run) that will begin with an inter-trial at t=0.

Parameters:
fixedDelay - Delay between US onset and CS onset in ms.
Method Detail

doAction

public void doAction(Action a)
Description copied from interface: State
Do an action.

Specified by:
doAction in interface State
Overrides:
doAction in class AbstractState

getActions

public Action[] getActions()
Description copied from interface: State
Returns the list of available action from the current state.

Returns:
The list of available action.

getNextStates

public State[] getNextStates(Action a)
Description copied from interface: State
Returns the list state following the current state under a given action.

Parameters:
a - The action to apply.
Returns:
The list of available action.

getObservableStates

public State[] getObservableStates()
Description copied from interface: State
Returns the list state of observable states for the agents.

Specified by:
getObservableStates in interface State
Overrides:
getObservableStates in class AbstractState
Returns:
The list of observable states.

toDataSet

public DataSet toDataSet()
Description copied from interface: State
Similar to the toString method, but return state content in the form of a DataSet. Can be null.

Specified by:
toDataSet in interface State
Overrides:
toDataSet in class AbstractState
Returns:
A DataSet containing a description of the State.