clarion.nacs
Class NACS

java.lang.Object
  extended byclarion.nacs.NACS

public class NACS
extends java.lang.Object


Field Summary
protected  AbsEM[] absEMs
          the AEM components.
protected  int[] acsActionDimNums
          the numbers of dimensions in ACS action.
protected  int acsNetNum
          the number of ACS network.
protected  int[] acsRewardDimNums
          the numbers of dimensions in ACS reward.
protected  int[] acsStateDimNums
          the numbers of dimensions in ACS state.
protected  int[] acsStepFeatNums
          the nubmers of dimensions in a step chunk.
protected  int activeAmnIdx
          the index on the active AMN.
protected  boolean aemOn
          flag for AEM is on or not.
protected  double aemTrainedByEmProb
          the probability of EM training AEM.
protected  boolean amnMultiFlag
          flag for allowing multiple active AMN or not.
protected  AMNet[] amns
          the AMN component.
protected  short[][] conditionDimInfo
          used to compose condition chunks.
protected  Feature[] curAction
          current action in format of an array of features.
protected  Feature[] curState
          current state in format of an array of features.
protected  boolean esChunkOn
          flag for experience-specific chunks is on or not.
protected  GKS gks
          the GKS component.
protected  Global global
          global settings.
protected  Feature[] nacsActiveInput
          current active input features to NACS.
protected  short[] nacsActiveInputDimInfo
          the active dim indices to ACS input or output.
protected  Feature[] nacsActiveOutput
          current active output features from NACS.
protected  short[] nacsActiveOutputDimInfo
          the active dim indices to ACS input or output.
protected  Feature[] nextState
          next state in format of an array of features.
protected  java.lang.Object[] results
          retrieval results in format of an array of GKSChunks.
protected  Feature[] reward
          current reinforcement in format of an array of features.
 
Constructor Summary
NACS()
           
NACS(Global g)
           
 
Method Summary
 AbsEMSample[] getAemSamples(int netIdx)
          Returns AEM samples.
 Chunk[][] getAllConclusions()
          Returns the all of the conclusions from the monitor buffer.
 AMNet[] getAmns()
          Returns the GKS component.
 EMAcsSample[] getEmAcsSamples(int netIdx, int trainType)
          Returns ACS samples in EM.
 EMNacsSample[] getEmNacsSamples(int netIdx)
          Returns NACS samples in EM.
 GKS getGks()
          Returns the GKS component.
 java.lang.Object[] getResults()
          Returns the retrieval results.
 int getRT()
          Returns the response time.
 boolean isRetrieved()
          check if the process of retrieval is done or not at this step.
 void observeState(Feature[] state)
          Observes and decompose current state.
 void performAction(short[][][] chosenActions)
          Performs NACS control action.
 void preTrainAmn(int amnIdx)
          pre-training a specific AMN.
 void setActiveAmn(int amnIdx)
          Sets the active AMN network.
 void setAmnCue(int idx, Feature[] input)
          Sets the cue as input to an AMN net.
 void setConditionDimInfo(short[][] info)
          Sets the dimension information of condition chunks.
 void setCurrentTime(long curTime)
          Sets current time.
 void setGksCue(Feature[] cue)
          Sets the cue as input to NACS.
 void setGksCue(Feature[] cue, int concIdx)
          Deprecated. Replaced by setGksCue( Feature[] cue ).
 java.lang.String testAem(int acsNetIdx)
           
 void update(short[][][][] chosenActions, Feature[] nState, double[] rewards)
          update NACS.
 
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.


gks

protected GKS gks
the GKS component.


amns

protected AMNet[] amns
the AMN component.


activeAmnIdx

protected int activeAmnIdx
the index on the active AMN.


acsNetNum

protected int acsNetNum
the number of ACS network.


acsStateDimNums

protected int[] acsStateDimNums
the numbers of dimensions in ACS state.


acsActionDimNums

protected int[] acsActionDimNums
the numbers of dimensions in ACS action.


acsRewardDimNums

protected int[] acsRewardDimNums
the numbers of dimensions in ACS reward.


acsStepFeatNums

protected int[] acsStepFeatNums
the nubmers of dimensions in a step chunk.


esChunkOn

protected boolean esChunkOn
flag for experience-specific chunks is on or not.


aemOn

protected boolean aemOn
flag for AEM is on or not.


amnMultiFlag

protected boolean amnMultiFlag
flag for allowing multiple active AMN or not.


aemTrainedByEmProb

protected double aemTrainedByEmProb
the probability of EM training AEM.


absEMs

protected AbsEM[] absEMs
the AEM components.


nacsActiveInputDimInfo

protected short[] nacsActiveInputDimInfo
the active dim indices to ACS input or output.


nacsActiveOutputDimInfo

protected short[] nacsActiveOutputDimInfo
the active dim indices to ACS input or output.


nacsActiveInput

protected Feature[] nacsActiveInput
current active input features to NACS.


nacsActiveOutput

protected Feature[] nacsActiveOutput
current active output features from NACS.


curState

protected Feature[] curState
current state in format of an array of features.


curAction

protected Feature[] curAction
current action in format of an array of features.


nextState

protected Feature[] nextState
next state in format of an array of features.


reward

protected Feature[] reward
current reinforcement in format of an array of features.


results

protected java.lang.Object[] results
retrieval results in format of an array of GKSChunks.


conditionDimInfo

protected short[][] conditionDimInfo
used to compose condition chunks.

Constructor Detail

NACS

public NACS()

NACS

public NACS(Global g)
Method Detail

isRetrieved

public boolean isRetrieved()
check if the process of retrieval is done or not at this step.


getResults

public java.lang.Object[] getResults()
Returns the retrieval results.

Returns:
the retrieval results.

getAllConclusions

public Chunk[][] getAllConclusions()
Returns the all of the conclusions from the monitor buffer.

Returns:
the all of the conclusions from the monitor buffer.

getAemSamples

public AbsEMSample[] getAemSamples(int netIdx)
Returns AEM samples.

Parameters:
netIdx - the index on an ACS net.
Returns:
AEM samples.

getEmAcsSamples

public EMAcsSample[] getEmAcsSamples(int netIdx,
                                     int trainType)
Returns ACS samples in EM.

Parameters:
netIdx - the index on an ACS net.
trainType - the train type: for ACS or AEM.
Returns:
ACS samples in EM.

getEmNacsSamples

public EMNacsSample[] getEmNacsSamples(int netIdx)
Returns NACS samples in EM.

Parameters:
netIdx - the index on an AMN net.
Returns:
NACS samples in EM.

getRT

public int getRT()
Returns the response time.


getGks

public GKS getGks()
Returns the GKS component.


getAmns

public AMNet[] getAmns()
Returns the GKS component.


setCurrentTime

public void setCurrentTime(long curTime)
Sets current time.


setGksCue

public void setGksCue(Feature[] cue,
                      int concIdx)
Deprecated. Replaced by setGksCue( Feature[] cue ).

Sets the cue as input to NACS.


setGksCue

public void setGksCue(Feature[] cue)
Sets the cue as input to NACS.

Parameters:
cue - the value to set.

setAmnCue

public void setAmnCue(int idx,
                      Feature[] input)
Sets the cue as input to an AMN net.

Parameters:
idx - index on an AMN network.
input - the value to set.

setActiveAmn

public void setActiveAmn(int amnIdx)
Sets the active AMN network.

Parameters:
amnIdx - the AMN index to set.

setConditionDimInfo

public void setConditionDimInfo(short[][] info)
Sets the dimension information of condition chunks.

Parameters:
info - the information to set.

preTrainAmn

public void preTrainAmn(int amnIdx)
pre-training a specific AMN.


observeState

public void observeState(Feature[] state)
Observes and decompose current state. need be refined further.


performAction

public void performAction(short[][][] chosenActions)
Performs NACS control action.


update

public void update(short[][][][] chosenActions,
                   Feature[] nState,
                   double[] rewards)
update NACS. need be refined further.

Parameters:
chosenActions - the chosen actions by ACS.
nState - the next state.
rewards - the currently received reinforcements.

testAem

public java.lang.String testAem(int acsNetIdx)