clarion.nacs
Class GKS

java.lang.Object
  extended byclarion.nacs.GKS

public class GKS
extends java.lang.Object


Constructor Summary
GKS(Global g)
           
 
Method Summary
 void bottomUp(int amnIdx, Feature[] amnResult)
          the process of bottom-up activation.
 void calcChosenChunkBLA()
          compute the BLA of the chosen chunk.
 void checkEM()
          check EM if activations of some chunks are lower than the threshold.
 void fillInEmForAssimilation()
          Fills in the EM with the chunks and associative rules in GKS for assimilating the explicit knowledge.
 boolean formResults(int retrievalMode, int retrievalChunkType)
          combine the result from both GKS and AMN.
 Chunk[] getAllMonitorConclusions()
          Returns the all results for monitor buffer.
 Chunk[] getBottomLevelMonitorConclusions()
          Returns the bottom level results for monitor buffer.
 GKSChunk getChunk(int idx)
          Returns a specific chunk in GKS.
 int getChunkIdx(Feature[] features)
          Returns an index on a chunk with the specific features in GKS.
 int getChunkIdx(java.lang.String label)
          Returns an index on a chunk with the specific label in GKS.
 GKSChunk[] getCombinedResults()
          Returns the conbined retrieval results.
 short[][] getConditions(int conclusion)
           
 EMAcsSample[] getEmAcsSamples(int netIdx, int trainType)
          Returns the ACS samples in EM.
 EMNacsSample[] getEmNacsSamples(int netIdx)
          Returns the NACS samples in EM.
 int getRT()
          Returns the response time.
 Chunk[] getTopLevelMonitorConclusions()
          Returns the top level results for monitor buffer.
 int insertChunk(GKSChunk chunk)
          insert a specific chunk into GKS.
 int insertChunk(int idnIdx, int amnIdx, int type, java.lang.String label, Feature[] features)
          insert a specific chunk into GKS.
 void insertRule(short[] condition, short conclusion)
          insert an associative with the condition and conclusion.
 boolean reasoning()
          the reasoning process of GKS decrbied in CLARION model.
 void reinit()
          reinitialization routine.
 void removeChunk(int chunkIdx)
          remove a chunk with the specific index.
 void resetRT()
          reset the response time.
 void resetStrengths()
           
 java.util.Vector searchConclusions(short[] conditions)
          search all of the conclusions with the specific condition in terms of indices of the chunks.
 boolean searchConditions(short[] conditions, short conclusion)
           
 void setChunkStrength(int idx, double strength)
          Sets strength for the specificed chunk.
 void setCurrentTime(long time)
          Sets the response time.
 void setGksIterNum(int num)
          Sets the # of iterations of GKS reasoning.
 void setGksReasoningMethod(int method)
          Sets the GKS reasoning methods.
 void setRetrievalCue(Feature[] content)
          Sets the cue for retrieval.
 void setRetrievalCue(Feature[] content, int concIdx)
          Deprecated. Replaced by setRetrievalCue( Feature[] content ).
 java.lang.String toString()
          methods from class Object
 void update()
          update GKS.
 void updateEM(int subsys, int idx)
          add chunk with the specific type and index into EM.
 void updateEM(int subsys, int netIdx, Feature[] condition, Feature[] conclusion)
          add associative rules with the specific condition and conclusion in terms of features into EM.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

GKS

public GKS(Global g)
Method Detail

reinit

public void reinit()
reinitialization routine.


resetStrengths

public void resetStrengths()

resetRT

public void resetRT()
reset the response time.


getCombinedResults

public GKSChunk[] getCombinedResults()
Returns the conbined retrieval results.

Returns:
the conbined retrieval results.

getTopLevelMonitorConclusions

public Chunk[] getTopLevelMonitorConclusions()
Returns the top level results for monitor buffer.

Returns:
the top level results for monitor buffer.

getBottomLevelMonitorConclusions

public Chunk[] getBottomLevelMonitorConclusions()
Returns the bottom level results for monitor buffer.

Returns:
the bottom level results for monitor buffer.

getAllMonitorConclusions

public Chunk[] getAllMonitorConclusions()
Returns the all results for monitor buffer.

Returns:
the all results for monitor buffer.

getEmAcsSamples

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

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

getEmNacsSamples

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

Parameters:
netIdx - index on network.
Returns:
the NACS samples in EM.

getChunk

public GKSChunk getChunk(int idx)
Returns a specific chunk in GKS.

Parameters:
idx - the index on a specific chunk in GKS.
Returns:
a specific chunk in GKS.

getChunkIdx

public int getChunkIdx(java.lang.String label)
Returns an index on a chunk with the specific label in GKS.

Parameters:
label - the chunk label.
Returns:
an index on a specific chunk.

getChunkIdx

public int getChunkIdx(Feature[] features)
Returns an index on a chunk with the specific features in GKS.

Parameters:
features - the chunk features.
Returns:
an index on a specific chunk.

getConditions

public short[][] getConditions(int conclusion)

getRT

public int getRT()
Returns the response time.

Returns:
the response time.

setRetrievalCue

public void setRetrievalCue(Feature[] content)
Sets the cue for retrieval.

Parameters:
content - the cue features.

setRetrievalCue

public void setRetrievalCue(Feature[] content,
                            int concIdx)
Deprecated. Replaced by setRetrievalCue( Feature[] content ).

Sets the cue for retrieval.

Parameters:
content - the cue features.
concIdx - the index on conclusion dimension in the cue.

setCurrentTime

public void setCurrentTime(long time)
Sets the response time.

Parameters:
time - the value to set.

setChunkStrength

public void setChunkStrength(int idx,
                             double strength)
Sets strength for the specificed chunk.

Parameters:
idx - the chunk index.
strength - the strength to set.

setGksIterNum

public void setGksIterNum(int num)
Sets the # of iterations of GKS reasoning.

Parameters:
num - the number to set.

setGksReasoningMethod

public void setGksReasoningMethod(int method)
Sets the GKS reasoning methods.

Parameters:
method - the method to set.

insertChunk

public int insertChunk(GKSChunk chunk)
insert a specific chunk into GKS.

Parameters:
chunk - the chunk to insert.

insertChunk

public int insertChunk(int idnIdx,
                       int amnIdx,
                       int type,
                       java.lang.String label,
                       Feature[] features)
insert a specific chunk into GKS.

Parameters:
idnIdx - the index on an IDN.
amnIdx - the index on an AMN.
type - chunk type.
label - chunk label.
features - the chunk features.

removeChunk

public void removeChunk(int chunkIdx)
remove a chunk with the specific index.

Parameters:
chunkIdx - the index on the chunk.

insertRule

public void insertRule(short[] condition,
                       short conclusion)
insert an associative with the condition and conclusion.

Parameters:
condition - the condition of the rule in terms of the indices of chunks.
conclusion - the conclusion of the rule in terms of the index of the chunk.

reasoning

public boolean reasoning()
the reasoning process of GKS decrbied in CLARION model.


bottomUp

public void bottomUp(int amnIdx,
                     Feature[] amnResult)
the process of bottom-up activation.

Parameters:
amnIdx - the index on an AMN.
amnResult - the retrieval result from the AMN.

formResults

public boolean formResults(int retrievalMode,
                           int retrievalChunkType)
combine the result from both GKS and AMN.

Parameters:
retrievalMode - the retrieval mode: retrieval all chunks or only one chunk.

searchConditions

public boolean searchConditions(short[] conditions,
                                short conclusion)

searchConclusions

public java.util.Vector searchConclusions(short[] conditions)
search all of the conclusions with the specific condition in terms of indices of the chunks.


update

public void update()
update GKS.


updateEM

public void updateEM(int subsys,
                     int idx)
add chunk with the specific type and index into EM.

Parameters:
subsys - the chunk comes from.
idx - the index on the chunk.

updateEM

public void updateEM(int subsys,
                     int netIdx,
                     Feature[] condition,
                     Feature[] conclusion)
add associative rules with the specific condition and conclusion in terms of features into EM.

Parameters:
subsys - ACS or NACS.
netIdx - index to an network.
condition - the condition features.
conclusion - the conclusion features.

toString

public java.lang.String toString()
methods from class Object


calcChosenChunkBLA

public void calcChosenChunkBLA()
compute the BLA of the chosen chunk.


fillInEmForAssimilation

public void fillInEmForAssimilation()
Fills in the EM with the chunks and associative rules in GKS for assimilating the explicit knowledge.


checkEM

public void checkEM()
check EM if activations of some chunks are lower than the threshold.