|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectclarion.common.GeneralNetComp
clarion.acs.net.AcsNetComp
clarion.acs.net.IDN
Field Summary | |
protected Chunk[] |
blResults
constant used for MCS's minotoring conclusions. |
protected int |
c24
constant used for MCS's minotoring conclusions. |
protected int |
currentTime
current time used for computing BLA. |
protected Feature[] |
desiredOutput
current desired output. |
protected int |
learnOption
learning option: q-learning, simplified q, BP, fix or by MCS. |
protected BPNet |
net
variables for the net. |
protected short[] |
outputLocations
used to locate each type of output in the overall outputs. |
protected short[] |
outputNums
the # of each type of output: EX, WM, GS, NACS-CONTROL if any. |
protected double[] |
overallOutput
used to store the desired output converted from chosen action. |
protected boolean |
positivity
used for updating PM and NM. |
protected double |
qValue1
Q(x,a)s and maxQ(y,b)s (with multiple dims). |
protected double[][][] |
qValue1s
Q(x,a)s and maxQ(y,b)s (with multiple dims). |
protected double |
qValue2
Q(x,a)s and maxQ(y,b)s (with multiple dims). |
protected double[][][] |
qValue2s
Q(x,a)s and maxQ(y,b)s (with multiple dims). |
protected double[] |
state
current state including EX, GS, WM. |
protected VCGSet[][] |
vcgSets
VCGSets for action-deciion making. |
Fields inherited from class clarion.acs.net.AcsNetComp |
acsAction, CONTROL_OUTPUT_DIM_NUM, CONTROL_OUTPUT_NUM, controlOutputDVs, controlOutputOffsets, FULL_CONTROL_OUTPUT_DIM_NUM, FULL_CONTROL_OUTPUT_NUM, fullControlOutputDVs, fullControlOutputOffsets, fullSuggestedAction, netType, outputFormatDimNums, outputFormatDimValNums |
Fields inherited from class clarion.common.GeneralNetComp |
actionDecider, chosenAction, FULL_OUTPUT_DIM_NUM, FULL_OUTPUT_NUM, fullOutputDVs, fullOutputOffsets, global, INPUT_DIM_NUM, INPUT_NUM, inputDVs, inputOffsets, netIdx, OUTPUT_DIM_NUM, OUTPUT_NUM, outputActivations, outputDVs, outputOffsets, responseTime, subsysIdx, suggestedAction, taskClarion, temperature |
Constructor Summary | |
IDN(int subsysIdx,
int inputNum,
int nIdx,
Global g)
constructor for initializing this IDN with inputNum, network index and the associated Global object. |
Method Summary | |
void |
calcRT(int BLAT)
Calculates the response time given BLAT. |
short[][][] |
decideAction()
decide action with its full format. |
Chunk[] |
getAllConclusions()
Returns all conclusions by this IDN in terms of chunks. |
double |
getNM()
Returns the number of negative matches. |
void |
getOutput(double[] output)
Returns the outputs. |
double[][] |
getOutputActivations()
Returns all the activated actions' activations with its full-bottom format. |
void |
getOutputActivations(double[][] arr)
Returns all the activated actions' activations. |
double |
getPM()
Returns the number of positive matches. |
boolean |
getPositivity(int ruleType,
double threshold)
Returns true if the specified rule is positive false, otherwise. |
int |
getResponseTime(int BLAT)
Returns the response time given Bottom Level Activation Time. |
double |
getSuccRate()
Returns the success rate. |
void |
reasoning()
the reasoning routine. |
void |
setChosenAction(short[][][] fullAction)
Sets the chosen action. |
void |
setCurDesiredOutput(Feature[] desiredOutput)
Sets current desired output. |
void |
setCurrentTime(int curTime)
Sets current time. |
void |
setState(Chunk chunk)
Sets the state chunk as input to this IDN. |
void |
setStates(double[] state,
double[] exState,
double[] gsState,
double[] wmState)
Sets the states. |
void |
update(boolean posFlag)
Updates with flag indicating current step is successful or not. |
void |
update(double reward)
update this IDN with currently received reward. |
void |
update(double reward,
Chunk[] nextStates,
double[] stateDistribution)
update for offline training using AEM. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected int learnOption
protected BPNet net
protected double[] state
protected Feature[] desiredOutput
protected VCGSet[][] vcgSets
protected short[] outputNums
protected double[] overallOutput
protected short[] outputLocations
protected double qValue1
protected double qValue2
protected double[][][] qValue1s
protected double[][][] qValue2s
protected boolean positivity
protected int currentTime
protected int c24
protected Chunk[] blResults
Constructor Detail |
public IDN(int subsysIdx, int inputNum, int nIdx, Global g)
Method Detail |
public double[][] getOutputActivations()
getOutputActivations
in class GeneralNetComp
public void getOutputActivations(double[][] arr)
getOutputActivations
in class GeneralNetComp
arr
- the array to store the activations.
public void getOutput(double[] output)
public double getSuccRate()
public double getPM()
getPM
in class GeneralNetComp
public double getNM()
getNM
in class GeneralNetComp
public Chunk[] getAllConclusions()
getAllConclusions
in class AcsNetComp
public int getResponseTime(int BLAT)
getResponseTime
in class GeneralNetComp
BLAT
- Bottom Level Activation Time.
public boolean getPositivity(int ruleType, double threshold)
ruleType
- rule type such as RER, IRL or FR.
public void setStates(double[] state, double[] exState, double[] gsState, double[] wmState)
setStates
in class GeneralNetComp
exState
- external state.gsState
- goal structure state.wmState
- working memory state.state
- the value to set current state.public void setState(Chunk chunk)
chunk
- the state chunk as input to this IDN.public void setChosenAction(short[][][] fullAction)
setChosenAction
in class GeneralNetComp
fullAction
- the full action to fill in the chosen action.public void setCurDesiredOutput(Feature[] desiredOutput)
desiredOutput
- the desired output to set.public void setCurrentTime(int curTime)
setCurrentTime
in class GeneralNetComp
curTime
- current time to set.public void reasoning()
reasoning
in class GeneralNetComp
public short[][][] decideAction()
decideAction
in class GeneralNetComp
public void update(double reward)
update
in class GeneralNetComp
reward
- reinforement received by current step.public void update(double reward, Chunk[] nextStates, double[] stateDistribution)
public void update(boolean posFlag)
update
in class GeneralNetComp
posFlag
- indicates current step is successful or not.public void calcRT(int BLAT)
calcRT
in class GeneralNetComp
BLAT
- Bottom Level Activation Time.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |