clarion.system
Class AbstractImplicitModule

java.lang.Object
  extended by clarion.system.AbstractImplicitModule
Direct Known Subclasses:
AbstractEquation, AbstractTrainableImplicitModule

public abstract class AbstractImplicitModule
extends java.lang.Object

This class implements an implicit module within CLARION. This class is abstract and therefore cannot be instantiated on its own.

Usage:

Any class that extends an abstract implicit module can be used in the bottom level of the CLARION subsystems. This class acts as the base foundation for building implicit modules to use in the bottom level. All modules that are used within the bottom level of CLARION MUST extend from this class.

The CLARION Library is very loose about what a user can define as an implicit module on the bottom level. As long as your user defined implicit module extends from this class, you are free to implement just about any type of structure you would like.

The following structures come pre-defined for you to use within the CLARION Library:

Below are some suggestions of possible structures that could be implemented by the user:

Known Subclasses:

This class contains both global (static) and local constants. The default is to use the local constants. If you want to change any of the global constants, you need to do so before any instances of this class are initialized.

Version:
6.0.4
Author:
Nick Wilson

Field Summary
 double ACTUATION_TIME
          Actuation time.
protected  AbstractOutputChunk ChosenOutput
          The index of the output node relating to the chosen output.
 double DECISION_TIME
          Decision time.
static double GLOBAL_ACTUATION_TIME
          Actuation time.
static double GLOBAL_DECISION_TIME
          Decision time.
static double GLOBAL_PERCEPTION_TIME
          Perception time.
protected  DimensionValueCollection InputAsCollection
          The input layer represented as a collection.
protected  AbstractOutputChunkCollection<? extends AbstractOutputChunk> Output
          The output layer.
 double PERCEPTION_TIME
          Perception time.
 
Constructor Summary
AbstractImplicitModule(java.util.Collection<Dimension> InputSpace, AbstractOutputChunkCollection<? extends AbstractOutputChunk> Outputs)
          Initializes an implicit module.
 
Method Summary
abstract  void forwardPass()
          Performs a forward pass from the input to output of the implicit module.
 AbstractOutputChunk getChosenOutput()
          Gets the chosen output that was last provided to the implicit module.
 java.util.Collection<Dimension> getInput()
          Gets the input nodes in the form of a dimension-value collection.
 int getNumInput()
          Gets the number of input nodes.
 int getNumOutput()
          Gets the number of output nodes.
 java.util.Collection<? extends AbstractOutputChunk> getOutput()
          Gets the current output.
 AbstractOutputChunk getOutput(java.lang.Object ID)
          Gets the output chunk with the specified ID.
 double getResponseTime()
          Gets the response time for the implicit module.
 void setChosenOutput(AbstractOutputChunk chosenOut)
          Sets the chosen output for this implicit module.
 void setInput(DimensionValueCollection input)
          Sets the activations for the input layer to the specified input.
 void setInput(java.lang.Object ID, Value val)
          Sets the activation of the input node for the dimension with the specified ID to the activation of the specified value.
 void setInput(Value val)
          Sets the activation of the input nodes that equal the specified value to the activation of the specified value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

InputAsCollection

protected DimensionValueCollection InputAsCollection
The input layer represented as a collection.


Output

protected AbstractOutputChunkCollection<? extends AbstractOutputChunk> Output
The output layer.


ChosenOutput

protected AbstractOutputChunk ChosenOutput
The index of the output node relating to the chosen output.


GLOBAL_PERCEPTION_TIME

public static double GLOBAL_PERCEPTION_TIME
Perception time. Used for calculating response time.


PERCEPTION_TIME

public double PERCEPTION_TIME
Perception time. Used for calculating response time.


GLOBAL_DECISION_TIME

public static double GLOBAL_DECISION_TIME
Decision time. Used for calculating response time.


DECISION_TIME

public double DECISION_TIME
Decision time. Used for calculating response time.


GLOBAL_ACTUATION_TIME

public static double GLOBAL_ACTUATION_TIME
Actuation time. Used for calculating response time.


ACTUATION_TIME

public double ACTUATION_TIME
Actuation time. Used for calculating response time.

Constructor Detail

AbstractImplicitModule

public AbstractImplicitModule(java.util.Collection<Dimension> InputSpace,
                              AbstractOutputChunkCollection<? extends AbstractOutputChunk> Outputs)
                       throws InvalidFormatException
Initializes an implicit module.

If this is being used as an implicit module in the ACS and you are using goals or specialized working memory chunks, remember that the input space must also contain all dimension-value pairs within those chunks that differ from the sensory information space.

Parameters:
InputSpace - The input space for the implicit module.
Outputs - The outputs for the implicit module.
Throws:
InvalidFormatException - If the input or output space contain dimensions or chunks respectively that have the same ID.
Method Detail

getInput

public java.util.Collection<Dimension> getInput()
Gets the input nodes in the form of a dimension-value collection. The collection returned is unmodifiable and is meant for reporting the internal state only.

Returns:
An unmodifiable collection of dimension-value pairs representing the input nodes.

setInput

public void setInput(DimensionValueCollection input)
Sets the activations for the input layer to the specified input. This method should be called before the forwardPass method is called.

Parameters:
input - The input from which to set the activations on the input layer.

setInput

public void setInput(Value val)
Sets the activation of the input nodes that equal the specified value to the activation of the specified value.

In general, this method should NOT be used from outside of the CLARION library. This method will set the activation of ANY and ALL values within the input layer that match the ID of the specified value regardless of the dimension to which they belong. This method should only be used if you know for sure that the input layer does not contain values with the same ID or you want to set ALL of the values in the input layer with the same ID to the activation of the specified value.

Parameters:
val - The value related to the input nodes whose activations you wish to set.

setInput

public void setInput(java.lang.Object ID,
                     Value val)
Sets the activation of the input node for the dimension with the specified ID to the activation of the specified value.

Parameters:
ID - The ID of the dimension where the value you wish to set is located.
val - The value related to the input node whose activation you wish to set.

getNumInput

public int getNumInput()
Gets the number of input nodes.

Returns:
The number of input nodes.

getNumOutput

public int getNumOutput()
Gets the number of output nodes.

Returns:
The number of output nodes.

getOutput

public AbstractOutputChunk getOutput(java.lang.Object ID)
Gets the output chunk with the specified ID. If the output does not have a chunk with the specified ID, this method returns null.

Parameters:
ID - The ID of the output chunk to get.
Returns:
The output chunk with the specified ID. Null if the output chunk is not in the output.

getOutput

public java.util.Collection<? extends AbstractOutputChunk> getOutput()
Gets the current output. The collection returned is unmodifiable and is meant for reporting (or reading) the internal state only.

Returns:
An unmodifiable collection containing the output chunks.

getChosenOutput

public AbstractOutputChunk getChosenOutput()
Gets the chosen output that was last provided to the implicit module.

Returns:
The chosen output.

setChosenOutput

public void setChosenOutput(AbstractOutputChunk chosenOut)
Sets the chosen output for this implicit module. If the specified output is not within the output layer of the implicit module, this method will do nothing.

Parameters:
chosenOut - The chosen output.

getResponseTime

public double getResponseTime()
Gets the response time for the implicit module.

Returns:
The response time.

forwardPass

public abstract void forwardPass()
Performs a forward pass from the input to output of the implicit module. This is the method used by the CLARION Library to obtain activations on the output layer given the input.