|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectclarion.acs.net.auxiliary.TLRule
Field Summary | |
protected RuleAttributes |
attributes
the rule attributes. |
protected int |
blaOption
BLA option: constant or variable. |
protected short[][] |
conditions
the rule condition |
protected int |
CONTROL_OUTPUT_DIM_NUM
the # of NACS-control dims. |
protected int |
CONTROL_OUTPUT_NUM
the length of NACS-control outputs. |
protected short[] |
controlOutputDVs
the dim-val info of NACS-control outputs. |
protected short[] |
controlOutputOffsets
the start offsets of each NACS-control dim in an one-dimenisonal array. |
protected int |
DIFF_DIM_IDX
the index to the dimension with difference, used for general match. |
protected static double |
DISCOUNT
used for udpating statistics. |
protected Global |
global
global settings. |
protected int |
INPUT_DIM_NUM
the number of input dimensions. |
protected int |
INPUT_NUM
the number of input units. |
protected short[][] |
inputConditions
input state in the format of dim-vals (First dimension: each input dimension, Second dimension: the active values in one input dimension). |
protected short[] |
inputDVs
the numbers of values in the input dimensions. |
protected short[] |
inputOffsets
the start location of each input dimension in the overall input with a format of one dimensional array. |
protected int |
netIdx
the net index. |
protected int |
OUTPUT_DIM_NUM
the number of output dimensions. |
protected int |
OUTPUT_NUM
the number of output units. |
protected short[] |
outputDVs
the numbers of values in the output dimensions. |
protected short[] |
outputOffsets
the start location of each input dimension in the overall output with a format of one dimensional array. |
protected boolean |
partialMatchFlag
flag for partial match is on or not. |
protected double |
ruleCost
the rule cost. |
protected double |
ruleSupport
rule support. |
protected int |
ruleType
the rule type. |
protected int |
setIdx
the rule subset index. |
protected int |
subsysIdx
the subsystem index: ACS or MCS. |
protected short[][][] |
suggestedAction
the suggested action by this rule. |
protected TaskClarion |
taskClarion
the task-specific CLARION settings. |
Constructor Summary | |
TLRule(int subsysIdx,
int netIdx,
int ruleType,
int setIdx,
Global global)
constructor. |
Method Summary | |
void |
aging()
Increases the rule age. |
void |
calcBLA(int curTime)
Calculates the rule BLA. |
void |
calcRT(int TLAT)
Calculates the response time. |
void |
calcTLDT(double chunkBLA)
Calculates the top level decision time . |
void |
convertToInputConditions(short[] state)
Converts current state into the format of dim-vals (dimensions and their active values). |
int |
cover(TLRule rule)
Checks if this rule covers other rule by both condition and action. |
boolean |
decideAction(short[] state,
short[] exState,
short[] gsState,
short[] wmState)
Decides the action. |
void |
discountStatistics()
Discounts statistics. |
short[][][] |
getAction()
Returns the rule suggested action. |
Chunk |
getActionChunk()
Returns the rule suggested action in terms of a chunk. |
int |
getAge()
Returns the rule age since last use. |
short[][] |
getCondition()
Returns the rule condition. |
short[] |
getCondition(int dimIdx)
Returns the condition in a specific dimension. |
double |
getNM()
Returns the number of negative matches. |
double |
getPM()
Returns the number of positive matches. |
int |
getResponseTime()
Returns the response time. |
double |
getRuleSupport()
Returns the rule support. |
double |
getUtility()
Returns the rule utility. |
boolean |
isActionMatched(short[][][] action)
Returns if the performed action matches the suggested action by this rule. |
int |
isConditionMatched(short[] input)
Returns the number of dimensions current state mismatch the rule condition and calculate the rule support. |
void |
resetStatistics()
Resets statistics. |
void |
setAge(int age)
Sets the rule age. |
void |
setAttributes(RuleAttributes feat)
Sets the rule attributes. |
void |
setCondition(short[][] cond)
Sets the rule conditon. |
void |
setNM(float nm)
Sets the number of negative matches. |
void |
setPM(float pm)
Sets the number of positive matches. |
void |
update(boolean actionMatchFlag,
boolean successFlag,
int curTime)
Updates routine. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected static final double DISCOUNT
protected Global global
protected TaskClarion taskClarion
protected int subsysIdx
protected int netIdx
protected int ruleType
protected int setIdx
protected int INPUT_NUM
protected int OUTPUT_NUM
protected int INPUT_DIM_NUM
protected int OUTPUT_DIM_NUM
protected short[] inputDVs
protected short[] outputDVs
protected short[] inputOffsets
protected short[] outputOffsets
protected int CONTROL_OUTPUT_NUM
protected int CONTROL_OUTPUT_DIM_NUM
protected short[] controlOutputDVs
protected short[] controlOutputOffsets
protected short[][] conditions
protected short[][][] suggestedAction
protected short[][] inputConditions
protected int DIFF_DIM_IDX
protected boolean partialMatchFlag
protected double ruleSupport
protected int blaOption
protected double ruleCost
protected RuleAttributes attributes
Constructor Detail |
public TLRule(int subsysIdx, int netIdx, int ruleType, int setIdx, Global global)
netIdx
- network index.ruleType
- rule type.setIdx
- rule subset index.Method Detail |
public int isConditionMatched(short[] input)
input
- current input.
public boolean isActionMatched(short[][][] action)
public boolean decideAction(short[] state, short[] exState, short[] gsState, short[] wmState)
state
- curent state.exState
- external state.gsState
- goal structure state.wmState
- working memory state.
public short[][] getCondition()
public short[] getCondition(int dimIdx)
public short[][][] getAction()
public Chunk getActionChunk()
public int getAge()
public double getPM()
public double getNM()
public int getResponseTime()
public double getRuleSupport()
public double getUtility()
public void setCondition(short[][] cond)
cond
- the condition to set.public void setAge(int age)
age
- the age to set.public void setPM(float pm)
pm
- the number of positive matches to set.public void setNM(float nm)
nm
- the number of negative matches to set.public void setAttributes(RuleAttributes feat)
feat
- the rule attributes to set.public void aging()
public void discountStatistics()
public void resetStatistics()
public void calcBLA(int curTime)
curTime
- current time.public void calcTLDT(double chunkBLA)
chunkBLA
- the relevant chunk BLA.public void calcRT(int TLAT)
TLAT
- the top level actuation time.public void update(boolean actionMatchFlag, boolean successFlag, int curTime)
actionMatchFlag
- flag indicating action is matched or not.successFlag
- flag indicating current step is successfule or not.curTime
- current time.public void convertToInputConditions(short[] state)
state
- current state.public int cover(TLRule rule)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |