clarion.acs
Class ACS

java.lang.Object
  extended byclarion.acs.ACS

public class ACS
extends java.lang.Object


Field Summary
protected  int actionTypeNum
          # of different acitons: GS, WM, orvaried EX.
protected  int activeNetNum
          the number of active networks.
protected  short[][] activeNetworks
          the active networks.
protected  boolean aemOn
          AEM is on or not.
protected  double aemTrainAcsProb
          the probability of using AEM to train the ACS.
protected  short[][][][] chosenActions
          current chosen actions from each active network.
protected  int chosenType
          knowledge types: BL, RER, IRL, FR.
protected  int corExtMode
          coordinating multiple external action net.
protected  Feature[][] desiredOutput
          desired outputs.
protected  EligibilityCheck eligCheck
          eligibility check of the external networks.
protected  short[][][][] eligCondions
          eligible conditions of the external networks.
protected  boolean emOn
          EM is on or not.
protected  double emTrainAcsProb
          the probability of using EM to train the ACS.
protected  int exNetIdx
          index to external network, WM network or goal structure network.
protected  int exNetNum
          the number of external networks.
protected  Global global
          global settings.
protected  int gsNetIdx
          index to external network, WM network or goal structure network.
protected  int gsOption
          goal structure option.
protected  int netNum
          the number of networks.
protected  AcsNet[] nets
          the ACS networks.
protected  double[][] netStates
          current states of each network.
protected  GKSChunk[] retrievalResults
          retrieval results from NACS.
protected  Feature[] sensoryInput
          current sensory input.
protected  TaskClarion taskClarion
          task-specific clarion settings.
protected  int wmNetIdx
          index to external network, WM network or goal structure network.
protected  boolean wmOnFlag
          WM is on or not.
 
Constructor Summary
ACS(Global g)
          construcutor.
 
Method Summary
 Chunk[][][] getAllConclusions()
          Returns the conclusions from all of the active networks in terms of chunks.
 short[][][][] getChosenActions()
          Returns the chosen actions by all networks.
 java.lang.String[] getFixRules(int netIdx)
          Returns the FR rules of the specific network in terms of strings.
 int getGsLength()
          Returns the length of goal input.
 java.lang.String[] getIrlRules(int netIdx)
          Returns the IRL rules of the specific network in terms of strings.
 java.lang.String[] getRerRules(int netIdx)
          Returns the RER rules of the specific network in terms of strings.
 int getRT()
          Returns the response time without NACS involved.
 int getRT(int nacsRT)
          Returns the response time with NACS involved.
 int getSensoryLength()
          Returns the length of sensory input.
 int getWmLength()
          Returns the length of WM input.
 boolean isEligibleExNet(int netIdx)
           
 void observeState(Feature[] sInput)
          observe new sensory input, new GS and WM states if exists and deliver them to each active network and form new state including the three types of inputs if exists.
 void performGsAction()
          Performs GS action.
 void performWmAction()
          Performs WM action.
 void reasoning()
          Reasoning process in ACS.
 void setCurDesiredOutput(Feature[][] output)
          Sets the desired output.
 void setCurrentTime(long curTime)
          Sets the current time.
 void setRetrievalResult(GKSChunk[] result)
          Sets the retrieval results.
 void setSensoryInput(Feature[] input)
          Sets the sensory input.
 void update(Feature[] sInput, double[] reinforcements)
          Updates each active network.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

global

protected Global global
global settings.


taskClarion

protected TaskClarion taskClarion
task-specific clarion settings.


eligCondions

protected short[][][][] eligCondions
eligible conditions of the external networks.


eligCheck

protected EligibilityCheck eligCheck
eligibility check of the external networks.


emOn

protected boolean emOn
EM is on or not.


emTrainAcsProb

protected double emTrainAcsProb
the probability of using EM to train the ACS.


aemOn

protected boolean aemOn
AEM is on or not.


aemTrainAcsProb

protected double aemTrainAcsProb
the probability of using AEM to train the ACS.


sensoryInput

protected Feature[] sensoryInput
current sensory input.


desiredOutput

protected Feature[][] desiredOutput
desired outputs.


netNum

protected int netNum
the number of networks.


exNetNum

protected int exNetNum
the number of external networks.


activeNetNum

protected int activeNetNum
the number of active networks.


exNetIdx

protected int exNetIdx
index to external network, WM network or goal structure network.


wmNetIdx

protected int wmNetIdx
index to external network, WM network or goal structure network.


gsNetIdx

protected int gsNetIdx
index to external network, WM network or goal structure network.


gsOption

protected int gsOption
goal structure option.


wmOnFlag

protected boolean wmOnFlag
WM is on or not.


activeNetworks

protected short[][] activeNetworks
the active networks.


nets

protected AcsNet[] nets
the ACS networks.


netStates

protected double[][] netStates
current states of each network.


corExtMode

protected int corExtMode
coordinating multiple external action net.


actionTypeNum

protected int actionTypeNum
# of different acitons: GS, WM, orvaried EX.


chosenType

protected int chosenType
knowledge types: BL, RER, IRL, FR. used for stochastic mode.


chosenActions

protected short[][][][] chosenActions
current chosen actions from each active network.


retrievalResults

protected GKSChunk[] retrievalResults
retrieval results from NACS.

Constructor Detail

ACS

public ACS(Global g)
construcutor.

Parameters:
g - the global setting.
Method Detail

isEligibleExNet

public boolean isEligibleExNet(int netIdx)

getSensoryLength

public int getSensoryLength()
Returns the length of sensory input.

Returns:
the length of sensory input.

getGsLength

public int getGsLength()
Returns the length of goal input.

Returns:
the length of goal input.

getWmLength

public int getWmLength()
Returns the length of WM input.

Returns:
the length of WM input.

getRerRules

public java.lang.String[] getRerRules(int netIdx)
Returns the RER rules of the specific network in terms of strings.

Parameters:
netIdx - the index to the specific network.
Returns:
the RER rules of the specific network in terms of strings.

getIrlRules

public java.lang.String[] getIrlRules(int netIdx)
Returns the IRL rules of the specific network in terms of strings.

Parameters:
netIdx - the index to the specific network.
Returns:
the IRL rules of the specific network in terms of strings.

getFixRules

public java.lang.String[] getFixRules(int netIdx)
Returns the FR rules of the specific network in terms of strings.

Parameters:
netIdx - the index to the specific network.
Returns:
the FR rules of the specific network in terms of strings.

getChosenActions

public short[][][][] getChosenActions()
Returns the chosen actions by all networks. The chosen actions are represented by four dimensional array. The first dimension: the index to an network; The second dimension: NORMAL or NACS-control action; The third dimension: an index to a specific action dimension; The fourth dimesion: the active values in that action dimension.


getAllConclusions

public Chunk[][][] getAllConclusions()
Returns the conclusions from all of the active networks in terms of chunks. The conclusions are represented by three dimension array. The first dimension: the index to an active network; The second dimension: an index to a specific knowledge type: IDN, RER, IRL, FR; The third dimesion: the conclusions from the knowledge type.

Returns:
the conclusions from all of the active networks in terms of chunks.

getRT

public int getRT()
Returns the response time without NACS involved.

Returns:
the response time.

getRT

public int getRT(int nacsRT)
Returns the response time with NACS involved.

Parameters:
nacsRT - the response time from NACS.
Returns:
the response time.

setSensoryInput

public void setSensoryInput(Feature[] input)
Sets the sensory input.

Parameters:
input - the sensory input to set.

setCurDesiredOutput

public void setCurDesiredOutput(Feature[][] output)
Sets the desired output.

Parameters:
output - the desired output to set.

setRetrievalResult

public void setRetrievalResult(GKSChunk[] result)
Sets the retrieval results.

Parameters:
result - the result to set.

setCurrentTime

public void setCurrentTime(long curTime)
Sets the current time.

Parameters:
curTime - current time.

observeState

public void observeState(Feature[] sInput)
observe new sensory input, new GS and WM states if exists and deliver them to each active network and form new state including the three types of inputs if exists.

Parameters:
sInput - the sensory input.

reasoning

public void reasoning()
Reasoning process in ACS. Let each active network decide actions and then get them. This method is called after the new state (input), including EX, GS, WM if exists, is given.


performWmAction

public void performWmAction()
Performs WM action.


performGsAction

public void performGsAction()
Performs GS action.


update

public void update(Feature[] sInput,
                   double[] reinforcements)
Updates each active network. update GS, WM states if exists by performing the chosen actions. the EX action is already performed before this method is called.

Parameters:
sInput - new sensory input by performing the chosen external action.
reinforcements - the reinforcements received at this step.