tasksimulators.newsimu.AGL
Class TaskClarionAGL

java.lang.Object
  extended byclarion.system.TaskClarion
      extended bytasksimulators.newsimu.AGL.TaskClarionAGL

public class TaskClarionAGL
extends TaskClarion


Field Summary
 
Fields inherited from class clarion.system.TaskClarion
ACS, ACS_CL, ACS_GAUGE, ACS_IN_DIM, ACS_IN_VAL, ACS_LEARN, ACS_OUT_DIM, ACS_OUT_VAL, ACS_PARAM, ACS_PERFORM, ACS_REASON, ACS_SAMPLE_NUM, AMN_PASS, ASSOC_APP, ASSOC_WGT_C, ASSOC_WGT_R, AT_TL, BL_RT, BUR, CHUNK_RETR, DATA_TYPE, DRIVE, DRV_REP, DT_TL, ELIG, EX_CHUNK, EX_RULE, FR_ACT, FR_CON, FR_UTL, FR_WGT_C, FR_WGT_R, global, GOAL, GOAL_DIM, GOAL_SETTING, IRL_IG, IRL_PARAM, IRL_POS, IRL_UTL, IRL_WGT_C, IRL_WGT_R, MCS, MCS_SAMPLE_NUM, NACS, NACS_GAUGE, NACS_IN_DIM, NACS_IN_VAL, NACS_LEARN, NACS_OUT_DIM, NACS_OUT_VAL, NACS_PARAM, NACS_PERFORM, NACS_REASON, NACS_SAMPLE_NUM, OVER_RT, PT_TL, REIN, REIN_FUNC, RER_IG, RER_POS, RER_UTL, RER_WGT_C, RER_WGT_R, RT, RT_SAMPLE_NUM, SIM, SUB_SYS_NUM, TDG, TL_RT
 
Constructor Summary
TaskClarionAGL()
           
 
Method Summary
 void combineByBottomUpRectification()
          Performs the Bottom-Up Rectification combination.
 void combineByTopDownGuidance()
          Performs the Top-down Guidance combination.
 double decideFrAction(int groupIdx, int netIdx, int setIdx, Feature[] sensoryInput, GoalChunk gsItem, Chunk[] wmItems, short[][][] suggestedAction)
          Decides action by a Fixed Rule.
 short[][][] getFrAction(int groupIdx, int netIdx, int ruleIdx)
          Returns FR actions.
 short[][] getFrCondition(int groupIdx, int netIdx, int ruleIdx)
          Returns a FR condition.
 java.lang.Object[] getNacsResults()
          Gets the NACS retrieval results.
 double getReinforcement(int netIdx, Feature[] input, Chunk[] wmItems, GoalChunk goalItem, short[][][] action, Feature[] newInput, Chunk[] newWmItems, GoalChunk newGoalItem)
          Returns the reinforcement of the specified ACS network.
 void performEncodeExternalKnowledge(short[][] action)
          Perform the process of encoding external knowledge.
 void performNacsAssimilation(short[][] action)
          Performs the process of assimilation in NACS.
 void resetNacsResults()
          Reset the NACS result buffer.
 void resetTotSearchNum()
          Reset the search number in the searching process.
 void setAmns()
          Set the AMN networks.
 void setBeginFeatures(Feature[][] features)
          Sets the features as begin tag of reasoning.
 void setGks()
          Set the GKS.
 void setLearningType(int type)
          Set the learning type.
 void setTestSample(Feature[] curNacsInput)
          Sets the sample for testing NACS.
 void setTrainSample(Feature[] curNacsInput)
          Sets the sample for training NACS.
 
Methods inherited from class clarion.system.TaskClarion
getAamDataPattern, getAmnPassTime, getAssocAppTime, getAssocDimWeights, getAssocWeights, getAT_TL, getBLOverallRT, getChunkRetrTime, getDT_TL, getEligibility, getExplanation, getExternalNacsChunks, getExternalNacsRules, getFrPositivity, getFrUtility, getFrWeights, getGoalDimDVs, getGoals, getIrlIG, getIrlPositivity, getIrlRule, getIrlUtility, getIrlWeights, getOverallRT, getPT_TL, getRerIG, getRerPositivity, getRerUtility, getRerWeights, getSample, getSimilarity, getTLOverallRT, setGlobal
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TaskClarionAGL

public TaskClarionAGL()
Method Detail

getNacsResults

public java.lang.Object[] getNacsResults()
Gets the NACS retrieval results.

Overrides:
getNacsResults in class TaskClarion
Returns:
the results.

resetNacsResults

public void resetNacsResults()
Reset the NACS result buffer.


setGks

public void setGks()
Set the GKS.


setAmns

public void setAmns()
Set the AMN networks.


setLearningType

public void setLearningType(int type)
Set the learning type.


resetTotSearchNum

public void resetTotSearchNum()
Reset the search number in the searching process.


setTrainSample

public void setTrainSample(Feature[] curNacsInput)
Sets the sample for training NACS.

Parameters:
curNacsInput - the sample for training.

setTestSample

public void setTestSample(Feature[] curNacsInput)
Sets the sample for testing NACS.

Parameters:
curNacsInput - the sample for testing.

setBeginFeatures

public void setBeginFeatures(Feature[][] features)
Sets the features as begin tag of reasoning.

Parameters:
features - the features to set as begin tags.

getReinforcement

public double getReinforcement(int netIdx,
                               Feature[] input,
                               Chunk[] wmItems,
                               GoalChunk goalItem,
                               short[][][] action,
                               Feature[] newInput,
                               Chunk[] newWmItems,
                               GoalChunk newGoalItem)
Returns the reinforcement of the specified ACS network.

Overrides:
getReinforcement in class TaskClarion
Parameters:
netIdx - the network NO.
input - current input,
action - current action.
newInput - new input resulting from firing the action.
Returns:
the reinforcement of the specified ACS network.

getFrCondition

public short[][] getFrCondition(int groupIdx,
                                int netIdx,
                                int ruleIdx)
Returns a FR condition. The returned value is in the format of 2-dimenisonal array. The first dimension indexes an dimenison and the second indexes one deimensional value. The value in each slot of the returned array: 1, if the dimensional value is in the condition, 0, otherwise.

Overrides:
getFrCondition in class TaskClarion
Parameters:
groupIdx - agent group index.
netIdx - ACS network index.
ruleIdx - rule index.
Returns:
a FR condition.

getFrAction

public short[][][] getFrAction(int groupIdx,
                               int netIdx,
                               int ruleIdx)
Returns FR actions. The returned value is in the format of 2-dimenisonal array. The first dimension indexes an action dimension and the second dimension stores the active values in that dimension. Suppose the output has 4 dimensions and each dimension has four values. one sample of action : short[][] action = { {0,1}, {0}, {2,3}, {0}};

Overrides:
getFrAction in class TaskClarion
Parameters:
groupIdx - learniing group the agent is in.
netIdx - the net index.
ruleIdx - the rule index.
Returns:
the action of the specific fixed rule.

decideFrAction

public double decideFrAction(int groupIdx,
                             int netIdx,
                             int setIdx,
                             Feature[] sensoryInput,
                             GoalChunk gsItem,
                             Chunk[] wmItems,
                             short[][][] suggestedAction)
Decides action by a Fixed Rule. It is used for the action (of a Fixed Rule) which is variable and depends on current input (EX + GS + WM). Fills in the suggestedAction under current input and returns the rule support for current input.

Overrides:
decideFrAction in class TaskClarion
Parameters:
groupIdx - learniing group the agent is in.
netIdx - the net index.
setIdx - the rule set index.
sensoryInput - current sensory input.
gsItem - the top goal item.
wmItems - current WM content.
Returns:
the reinforcement.

performEncodeExternalKnowledge

public void performEncodeExternalKnowledge(short[][] action)
Perform the process of encoding external knowledge.

Overrides:
performEncodeExternalKnowledge in class TaskClarion
Parameters:
action - current action.

performNacsAssimilation

public void performNacsAssimilation(short[][] action)
Performs the process of assimilation in NACS.

Overrides:
performNacsAssimilation in class TaskClarion

combineByBottomUpRectification

public void combineByBottomUpRectification()
Performs the Bottom-Up Rectification combination.

Overrides:
combineByBottomUpRectification in class TaskClarion

combineByTopDownGuidance

public void combineByTopDownGuidance()
Performs the Top-down Guidance combination.

Overrides:
combineByTopDownGuidance in class TaskClarion