clarion.common
Class GeneralNet

java.lang.Object
  extended byclarion.common.GeneralNet
Direct Known Subclasses:
AcsNet

public class GeneralNet
extends java.lang.Object


Field Summary
protected  double[] c3s
          used for variable mode.
protected  double[] c4s
          used for variable mode.
protected  int chosenComp
          current chosen component.
protected  short[][][] chosenFullAction
          current chosen action, the first dim: NORMAL or NACS-CONTROL action.
protected  int combMode1
          the mode of integrating outputs from different componnents: fixed or variable.
protected  int combMode2
          the mode of integrating outputs from different componnents: stochastic or percentage.
protected  int COMP_NUM
          number of knowledge types.
protected  VCGSet[][][] compVcgSets
          arrays of VCGSet to store the active values in each dimension from each net component such as IDN, RER, IRL and FR.
protected  VCGSet[][] controlVcgSets
          arrays of VCGSet to store the active values in each NACS-CONTROL action dimension from each net component such as IDN, RER, IRL and FR.
protected  CorrectionComb ctComb
          correction Combination.
protected  int exInputNum
          the unit numbers of total input, external input, goal structure input and working memory input.
protected  double[] exState
          current states.
protected  int fullOutputDimNum
          the numbers of dimensions of input and output.
protected  int fullOutputNum
          the numbers of dimensions of input and output.
protected  Global global
          gloabl settings.
protected  int gsInputNum
          the unit numbers of total input, external input, goal structure input and working memory input.
protected  double[] gsState
          current states.
protected  int inputNum
          the unit numbers of total input, external input, goal structure input and working memory input.
protected  boolean[] netCompFlags
          flags to indicate knowledge type is used or not.
protected  GeneralNetComp[] netComps
          the knowledge components composing this network.
protected  int netIdx
          the network indice in ACS or MCS.
protected  VCGSet[][] normalVcgSets
          arrays of VCGSet to store the active values in each NORMAL action dimension from each net component such as IDN, RER, IRL and FR.
protected  double[][][] outputActivations
          the action strengths supported from all of the components.
protected  double reinforcement
          current reinforcement.
protected  Feature[] sensoryInput
          current sensory input.
protected  double[] state
          current states.
protected  StochasticComb stochComb
          Stochastic Combination.
protected  int subsysType
          subsystem: ACS or MCS.
protected  double[] succRates
          success rate of each component, for variable mode.
protected  TaskClarion taskClarion
          the user-defined CLARION settings.
protected  int wmInputNum
          the unit numbers of total input, external input, goal structure input and working memory input.
protected  double[] wmState
          current states.
protected  WeightSumComb wsComb
          Weight Sum Combination.
 
Constructor Summary
GeneralNet(int subsysType)
           
 
Method Summary
protected  void correctionCombine()
          the correction combination method should be overrided by user's code.
 void decideAction(int compIdx)
          Decides action by specific knowledge type.
protected  void deliverAction()
          deliver currently chosen action to each component.
 void fillInVcgSets(int fillType)
          fill in the VCGSets for action decision making.
 void formState()
          compose current state given external, GS and WM states.
 short[][][] getChosenFullAction()
          returns the chosen action.
 void getExState(double[] arr)
          returns the external state.
 java.lang.String[] getFixRules()
          returns the Fixed rule set in this network in terms of its representation.
 void getGsState(double[] arr)
          returns the goal structure state.
 java.lang.String[] getIrlRules()
          returns the IRL rule set in this network in terms of its representation.
 double getNM(int idx)
          returns the number of negative match.
 double getPM(int idx)
          returns the number of positive match.
 java.lang.String[] getRerRules()
          returns the RER rule set in this network in terms of its representation.
 int getRT()
          returns the response time in case of no NACS RT involved.
 int getRT(int nacsRT)
          returns the response time in case of NACS RT involved.
 void getWmState(double[] arr)
          returns the working memory state.
 void reasoning()
          reasoning for determining an action to perform given current input.
 void setCurDesiredOutput(Feature[] desiredOutput)
          set current desired output.
 void setCurrentTime(long curTime)
          set current time.
 void setGsState(double[] arr)
          set current goal structure state.
 void setReinforcement(double reward)
          set reinforcement.
 void setSensoryInput(Feature[] sensoryInput)
          set current sensory input.
 void setStates(Chunk chunk)
          divide the chunk into EX, GS and WM states if exists.
 void setWmState(double[] arr)
          set current working memory state.
protected  void stochCombine()
          stochastic combination method.
 void update(double reward)
          update the network, needs overriding.
protected  void weightSumCombine()
          weight sum combination method.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

global

protected Global global
gloabl settings.


taskClarion

protected TaskClarion taskClarion
the user-defined CLARION settings.


subsysType

protected int subsysType
subsystem: ACS or MCS.


netIdx

protected int netIdx
the network indice in ACS or MCS.


COMP_NUM

protected int COMP_NUM
number of knowledge types.


chosenComp

protected int chosenComp
current chosen component.


chosenFullAction

protected short[][][] chosenFullAction
current chosen action, the first dim: NORMAL or NACS-CONTROL action. the second dim: all of the action dimensions, ( # of bottom output dims ). the third indicates the active values inside that dimension. the actual action is a dim-value pairs.


fullOutputDimNum

protected int fullOutputDimNum
the numbers of dimensions of input and output.


fullOutputNum

protected int fullOutputNum
the numbers of dimensions of input and output.


inputNum

protected int inputNum
the unit numbers of total input, external input, goal structure input and working memory input.


exInputNum

protected int exInputNum
the unit numbers of total input, external input, goal structure input and working memory input.


gsInputNum

protected int gsInputNum
the unit numbers of total input, external input, goal structure input and working memory input.


wmInputNum

protected int wmInputNum
the unit numbers of total input, external input, goal structure input and working memory input.


state

protected double[] state
current states. state = EX + GS + WM.


exState

protected double[] exState
current states. state = EX + GS + WM.


gsState

protected double[] gsState
current states. state = EX + GS + WM.


wmState

protected double[] wmState
current states. state = EX + GS + WM.


sensoryInput

protected Feature[] sensoryInput
current sensory input.


netCompFlags

protected boolean[] netCompFlags
flags to indicate knowledge type is used or not.


netComps

protected GeneralNetComp[] netComps
the knowledge components composing this network.


outputActivations

protected double[][][] outputActivations
the action strengths supported from all of the components. the first dim: network components. the second dim: ACTION_NORMAL OR ACTION_CONTROL. the third dim: the activations. full length of the outputs (bottom output length).


compVcgSets

protected VCGSet[][][] compVcgSets
arrays of VCGSet to store the active values in each dimension from each net component such as IDN, RER, IRL and FR. the first dim: network components. the second dim: ACTION_NORMAL OR ACTION_CONTROL. the third dim: VCGSet for each dim. full # of the output dims (# of bottom output dims).


normalVcgSets

protected VCGSet[][] normalVcgSets
arrays of VCGSet to store the active values in each NORMAL action dimension from each net component such as IDN, RER, IRL and FR. the first dim: network components. the second dim: VCGSet for each dim. full # of the output dims (# of bottom output dims).


controlVcgSets

protected VCGSet[][] controlVcgSets
arrays of VCGSet to store the active values in each NACS-CONTROL action dimension from each net component such as IDN, RER, IRL and FR. the first dim: network components. the second dim: VCGSet for each dim. full # of the output dims (# of bottom output dims).


reinforcement

protected double reinforcement
current reinforcement.


combMode1

protected int combMode1
the mode of integrating outputs from different componnents: fixed or variable.


combMode2

protected int combMode2
the mode of integrating outputs from different componnents: stochastic or percentage.


succRates

protected double[] succRates
success rate of each component, for variable mode.


c3s

protected double[] c3s
used for variable mode.


c4s

protected double[] c4s
used for variable mode.


stochComb

protected StochasticComb stochComb
Stochastic Combination.


wsComb

protected WeightSumComb wsComb
Weight Sum Combination.


ctComb

protected CorrectionComb ctComb
correction Combination.

Constructor Detail

GeneralNet

public GeneralNet(int subsysType)
Method Detail

getExState

public void getExState(double[] arr)
returns the external state.

Parameters:
arr - the array to store the external state.

getGsState

public void getGsState(double[] arr)
returns the goal structure state.

Parameters:
arr - the array to store the goal structure state.

getWmState

public void getWmState(double[] arr)
returns the working memory state.

Parameters:
arr - the array to store the working memory state.

getRerRules

public java.lang.String[] getRerRules()
returns the RER rule set in this network in terms of its representation.

Returns:
the RER rule set.

getIrlRules

public java.lang.String[] getIrlRules()
returns the IRL rule set in this network in terms of its representation.

Returns:
the IRL rule set.

getFixRules

public java.lang.String[] getFixRules()
returns the Fixed rule set in this network in terms of its representation.

Returns:
the Fixed rule set.

getChosenFullAction

public short[][][] getChosenFullAction()
returns the chosen action.

Returns:
the chosen action.

getPM

public double getPM(int idx)
returns the number of positive match.

Returns:
the number of positive match.

getNM

public double getNM(int idx)
returns the number of negative match.

Returns:
the number of negative match.

getRT

public int getRT()
returns the response time in case of no NACS RT involved.

Returns:
the response time.

getRT

public int getRT(int nacsRT)
returns the response time in case of NACS RT involved.

Returns:
the response time.

setStates

public void setStates(Chunk chunk)
divide the chunk into EX, GS and WM states if exists. maybe revised further.

Parameters:
chunk - the chunk to decompose.

setSensoryInput

public void setSensoryInput(Feature[] sensoryInput)
set current sensory input.

Parameters:
sensoryInput - the senory input to set.

setGsState

public void setGsState(double[] arr)
set current goal structure state.

Parameters:
arr - the goal structure state to set.

setWmState

public void setWmState(double[] arr)
set current working memory state.

Parameters:
arr - the working memory state to set.

setCurDesiredOutput

public void setCurDesiredOutput(Feature[] desiredOutput)
set current desired output.

Parameters:
desiredOutput - the desired output to set.

setCurrentTime

public void setCurrentTime(long curTime)
set current time.

Parameters:
curTime - the time to set.

setReinforcement

public void setReinforcement(double reward)
set reinforcement.


formState

public void formState()
compose current state given external, GS and WM states. needs overriding.


decideAction

public void decideAction(int compIdx)
Decides action by specific knowledge type. this means stochastic combination used.

Parameters:
compIdx - the specific knowledge type.

reasoning

public void reasoning()
reasoning for determining an action to perform given current input.


update

public void update(double reward)
update the network, needs overriding.


fillInVcgSets

public void fillInVcgSets(int fillType)
fill in the VCGSets for action decision making.


deliverAction

protected void deliverAction()
deliver currently chosen action to each component.


stochCombine

protected void stochCombine()
stochastic combination method.


weightSumCombine

protected void weightSumCombine()
weight sum combination method.


correctionCombine

protected void correctionCombine()
the correction combination method should be overrided by user's code.