clarion.common
Class GeneralNetComp

java.lang.Object
  extended byclarion.common.GeneralNetComp
Direct Known Subclasses:
AcsNetComp

public abstract class GeneralNetComp
extends java.lang.Object


Field Summary
protected  StochasticDecider actionDecider
           
protected  short[][][] chosenAction
          the finally chosen action by integrating all of the NetComps.
protected  int currentTime
           
protected  int FULL_OUTPUT_DIM_NUM
          # OF All of output dims.
protected  int FULL_OUTPUT_NUM
          full length of the output in terms of all of output dims.
protected  short[] fullOutputDVs
          D-V info of bottom (IDN) outputs.
protected  short[] fullOutputOffsets
          start position of each (bottom) output dim in one dimensional aray.
protected  Global global
          global settings.
protected  int INPUT_DIM_NUM
          # of input dims.
protected  int INPUT_NUM
          length of the input.
protected  short[] inputDVs
          # of values in each input dim.
protected  short[] inputOffsets
          the start position of each dim in the input array.
protected  int netIdx
          the network index.
protected  int OUTPUT_DIM_NUM
           
protected  int OUTPUT_NUM
          length of the output in terms of dims relevant to this net comp.
protected  double[][] outputActivations
          output activations used for weight-sum combination.
protected  short[] outputDVs
          # of values in each output dim.
protected  short[] outputOffsets
          the start position of each dim in the output array.
protected  int responseTime
           
protected  int subsysIdx
          the subsystem index: ACS or MCS.
protected  short[][][] suggestedAction
          current suggested action by this network component.
protected  TaskClarion taskClarion
          task-specific CLARION settings.
protected  double temperature
          variables for action decision making.
 
Constructor Summary
GeneralNetComp()
           
 
Method Summary
abstract  void calcRT(int AT)
          calculate the response time given by action time.
abstract  short[][][] decideAction()
          decide an action and returns the decided action.
abstract  double getNM()
          returns the number of positive matches.
abstract  double[][] getOutputActivations()
          returns the output activations including both NORMAL and CONTROL actions if any.
abstract  void getOutputActivations(double[][] activations)
          returns the output activations including both NORMAL and CONTROL actions if any.
abstract  double getPM()
          returns the number of positive matches.
abstract  int getResponseTime(int AT)
          returns the response time given action time.
abstract  void reasoning()
          the reasoning routine defined in this component.
abstract  void setChosenAction(short[][][] chosenFullAction)
          set the chosen action.
abstract  void setCurrentTime(int curTime)
          set the current time.
abstract  void setStates(double[] state, double[] exState, double[] gsState, double[] wmState)
          set the states.
abstract  void update(boolean posFlag)
          the update routine defined in this component.
abstract  void update(double reward)
          the update routine defined in this component.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

global

protected Global global
global settings.


taskClarion

protected TaskClarion taskClarion
task-specific CLARION settings.


subsysIdx

protected int subsysIdx
the subsystem index: ACS or MCS.


netIdx

protected int netIdx
the network index.


INPUT_NUM

protected int INPUT_NUM
length of the input.


OUTPUT_NUM

protected int OUTPUT_NUM
length of the output in terms of dims relevant to this net comp.


FULL_OUTPUT_NUM

protected int FULL_OUTPUT_NUM
full length of the output in terms of all of output dims. That is, bottom-full length.


INPUT_DIM_NUM

protected int INPUT_DIM_NUM
# of input dims.


OUTPUT_DIM_NUM

protected int OUTPUT_DIM_NUM

FULL_OUTPUT_DIM_NUM

protected int FULL_OUTPUT_DIM_NUM
# OF All of output dims. That is, bottom-full #.


inputDVs

protected short[] inputDVs
# of values in each input dim.


outputDVs

protected short[] outputDVs
# of values in each output dim.


inputOffsets

protected short[] inputOffsets
the start position of each dim in the input array.


outputOffsets

protected short[] outputOffsets
the start position of each dim in the output array.


fullOutputDVs

protected short[] fullOutputDVs
D-V info of bottom (IDN) outputs.


fullOutputOffsets

protected short[] fullOutputOffsets
start position of each (bottom) output dim in one dimensional aray.


outputActivations

protected double[][] outputActivations
output activations used for weight-sum combination. the first dim: ACTION_NORMAL OR ACTION_CONTROL action. the second dim: the activations of dim-vals of the dims relevent to this net comp.


chosenAction

protected short[][][] chosenAction
the finally chosen action by integrating all of the NetComps. the first dim: ACTION_NORMAL or ACTION_CONTROL. the second dim: the relevant output dims specified by this net comp. Here, the output dims is just a subset of the full output dims. the third dim: the active values in one dim.


suggestedAction

protected short[][][] suggestedAction
current suggested action by this network component. the first dim: ACTION_NORMAL or ACTION_CONTROL. the second dim: the relevant output dims specified by this net comp. Here, the output dims is just a subset of the full output dims. the third dim: the active values in one dim.


currentTime

protected int currentTime

responseTime

protected int responseTime

temperature

protected double temperature
variables for action decision making.


actionDecider

protected StochasticDecider actionDecider
Constructor Detail

GeneralNetComp

public GeneralNetComp()
Method Detail

getPM

public abstract double getPM()
returns the number of positive matches.

Returns:
the number of positive matches.

getNM

public abstract double getNM()
returns the number of positive matches.

Returns:
the number of positive matches.

getOutputActivations

public abstract double[][] getOutputActivations()
returns the output activations including both NORMAL and CONTROL actions if any.

Returns:
the output activations.

getOutputActivations

public abstract void getOutputActivations(double[][] activations)
returns the output activations including both NORMAL and CONTROL actions if any.

Returns:
activations the array to store the output activations.

decideAction

public abstract short[][][] decideAction()
decide an action and returns the decided action.

Returns:
the decided action.

getResponseTime

public abstract int getResponseTime(int AT)
returns the response time given action time.

Returns:
the response time.

setChosenAction

public abstract void setChosenAction(short[][][] chosenFullAction)
set the chosen action.

Parameters:
chosenFullAction - the full action to fill in the chosen action.

setStates

public abstract void setStates(double[] state,
                               double[] exState,
                               double[] gsState,
                               double[] wmState)
set the states.

Parameters:
state - the value to set current state.
exState - the value to set external state.
gsState - the value to set goal structure state.
wmState - the value to set working memory state.

setCurrentTime

public abstract void setCurrentTime(int curTime)
set the current time.

Parameters:
curTime - the time to set.

reasoning

public abstract void reasoning()
the reasoning routine defined in this component.


update

public abstract void update(boolean posFlag)
the update routine defined in this component.

Parameters:
posFlag - indicates current step is successful or not.

update

public abstract void update(double reward)
the update routine defined in this component.

Parameters:
reward - reinforement received by current step.

calcRT

public abstract void calcRT(int AT)
calculate the response time given by action time.