|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectclarion.acs.net.auxiliary.TLRule
clarion.acs.net.RerRule
Field Summary | |
protected boolean |
actionMatchFlag
action matched flag. |
protected int |
BASIC_MATCH
1. |
protected boolean |
basicCondMatchFlag
basic condition matched flag. |
protected boolean |
basicMatchFlag
basic condition & conclusion matched flag. |
protected double |
c1
used for calculating IG. |
protected double |
c2
used for calculating IG. |
protected short[] |
condValNums
condition values in each dim. |
protected boolean |
extractFlag
if extraction criterion is met or not. |
protected boolean |
geneCondMatchFlag
general condition matched flag. |
protected boolean |
geneFlag
if generalization criterion is met or not. |
protected boolean |
geneMatchFlag
general condition & conclusion matched flag. |
protected int |
GENERAL_MATCH
1. |
protected int |
genSpecMode
general-to-specific or specific-to-general. |
protected boolean |
MATCH_ALL_FLAG
if a match-all rule. |
protected int |
NM
used for statistics. |
protected int |
PM
used for statistics. |
protected int[][] |
potentialLocs
location of the max matching rate in the array of statistics. |
protected int |
RATE
used for statistics. |
protected boolean |
specFlag
if specialization criterion is met or not. |
protected float[][][][] |
statistics
statistics for storing the PM, NM and success rates. |
protected int |
WITH
used for PM, NM statistics. |
protected int |
WITHOUT
used for PM, NM statistics. |
Fields inherited from class clarion.acs.net.auxiliary.TLRule |
attributes, blaOption, conditions, CONTROL_OUTPUT_DIM_NUM, CONTROL_OUTPUT_NUM, controlOutputDVs, controlOutputOffsets, DIFF_DIM_IDX, DISCOUNT, global, INPUT_DIM_NUM, INPUT_NUM, inputConditions, inputDVs, inputOffsets, netIdx, OUTPUT_DIM_NUM, OUTPUT_NUM, outputDVs, outputOffsets, partialMatchFlag, ruleCost, ruleSupport, ruleType, setIdx, subsysIdx, suggestedAction, taskClarion |
Constructor Summary | |
RerRule(int subsysIdx,
int netIdx,
Global global)
constructor. |
|
RerRule(int subsysIdx,
int netIdx,
Global global,
short[] state,
short[][][] action,
boolean mFlag)
constructor. |
Method Summary | |
void |
addCondition(int idx1,
int idx2)
Adds a value of one dimension to the rule condiiton. |
boolean |
canGeneralized()
Returns if this rule can be generalized. |
boolean |
canSpecialized()
Returns if this rule can be specialized. |
protected java.lang.Object |
clone()
methods from class Object |
boolean |
decideAction(short[] state,
short[] exState,
short[] gsState,
short[] wmState)
Decides the action and and calculates the rule support. |
void |
delCondition(int idx1,
int idx2)
Deletes a value of one dimension to the rule condiiton. |
void |
discountStatistics()
discount the rule statistics after each trial. |
boolean |
equals(java.lang.Object obj)
methods from class Object |
double[] |
getMatchRate()
Returns the PM, NM matches of the rule. |
int[] |
getMaxIGLoc(int mode)
Returns the location of the max matching rate in the statistics array. |
double[] |
getMaxMatches(int idx1,
int idx2,
int mode)
Returns a match rate of a minor variation of the rule condition. |
int |
hashCode()
methods from class Object |
boolean |
isBasicConditionMatched()
Returns if the basic condition match is met. |
boolean |
isBasicMatched()
Returns if the basic match is met. |
boolean |
isExtracted()
Returns if extraction criterion is met. |
boolean |
isGenerailized()
Returns if generailizion criterion is met. |
boolean |
isGeneralConditionMatched()
Returns if the general condition match is met. |
boolean |
isGeneralMatched()
Returns if the general match is met. |
boolean |
isSpecialized()
Returns if speciailizion criterion is met. |
void |
matchAction(short[][][] action)
Checks if the specific action matches the conclusion of the rule. |
void |
resetStatistics()
Resets statistics. |
int[] |
searchMaxIGLoc(int mode)
Search the location of the max matching rate in the array statistics. |
void |
setCondValNums(short[] arr)
Sets the numbers of values in the condiiton dimensions. |
void |
setGenerailizedFlag(boolean flag)
Sets the generailization flag. |
void |
setPotentialLocs(int[][] arr)
Sets the locations of the max matching rate in the array of statistics. |
void |
setSpecializedFlag(boolean flag)
Sets the speciailization flag. |
void |
setStatistics(float[][][][] stats)
Sets the statistics. |
java.lang.String |
toString()
methods from class Object |
void |
update(boolean successFlag,
int curTime)
Updates this rule with flag indicating current step is successful or not. |
void |
updateMatchAll(boolean successFlag)
Updates the match-all rule. |
void |
updateStatistics(boolean successFlag,
int matchMode)
Updates the rule statistics whenever a match exists. |
Methods inherited from class clarion.acs.net.auxiliary.TLRule |
aging, calcBLA, calcRT, calcTLDT, convertToInputConditions, cover, getAction, getActionChunk, getAge, getCondition, getCondition, getNM, getPM, getResponseTime, getRuleSupport, getUtility, isActionMatched, isConditionMatched, setAge, setAttributes, setCondition, setNM, setPM, update |
Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
protected final int BASIC_MATCH
protected final int GENERAL_MATCH
protected final int WITH
protected final int WITHOUT
protected final int PM
protected final int NM
protected final int RATE
protected int genSpecMode
protected short[] condValNums
protected int[][] potentialLocs
protected boolean MATCH_ALL_FLAG
protected boolean extractFlag
protected boolean geneFlag
protected boolean specFlag
protected boolean basicCondMatchFlag
protected boolean basicMatchFlag
protected boolean geneCondMatchFlag
protected boolean geneMatchFlag
protected boolean actionMatchFlag
protected double c1
protected double c2
protected float[][][][] statistics
Constructor Detail |
public RerRule(int subsysIdx, int netIdx, Global global)
netIdx
- the network index.global
- the associated global settings.public RerRule(int subsysIdx, int netIdx, Global global, short[] state, short[][][] action, boolean mFlag)
netIdx
- the network index.global
- the associated global settings.state
- current state.action
- current action.mFlag
- match-all flag.Method Detail |
public boolean isBasicConditionMatched()
public boolean isGeneralConditionMatched()
public boolean isBasicMatched()
public boolean isGeneralMatched()
public boolean isExtracted()
public boolean isGenerailized()
public boolean isSpecialized()
public int[] getMaxIGLoc(int mode)
public double[] getMatchRate()
public double[] getMaxMatches(int idx1, int idx2, int mode)
mode
- = 0: generailization, = 1: specification.
public void setCondValNums(short[] arr)
arr
- the array used to set the numbers.public void setPotentialLocs(int[][] arr)
arr
- the array used to set the locations.public void setStatistics(float[][][][] stats)
stats
- the array used to set the statistics.public void setGenerailizedFlag(boolean flag)
flag
- the flag used to set the generailization flag.public void setSpecializedFlag(boolean flag)
flag
- the flag used to set the speciailization flag.public void resetStatistics()
resetStatistics
in class TLRule
public int[] searchMaxIGLoc(int mode)
mode
- 0: generalization, mode 1: specialization.
public void addCondition(int idx1, int idx2)
idx1
- the index to one dimension.idx2
- the index to one value in that dimension.public void delCondition(int idx1, int idx2)
idx1
- the index to one dimension.idx2
- the index to one value in that dimension.public boolean canGeneralized()
public boolean canSpecialized()
public void matchAction(short[][][] action)
public boolean decideAction(short[] state, short[] exState, short[] gsState, short[] wmState)
decideAction
in class TLRule
state
- curent state.exState
- external state.gsState
- goal structure state.wmState
- working memory state.
public void update(boolean successFlag, int curTime)
successFlag
- indicate current step is successful or not.curTime
- current time.public void updateMatchAll(boolean successFlag)
public void updateStatistics(boolean successFlag, int matchMode)
successFlag
- indicate current step is successful or not.public void discountStatistics()
discountStatistics
in class TLRule
public java.lang.String toString()
public int hashCode()
public boolean equals(java.lang.Object obj)
protected java.lang.Object clone()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |