clarion.system
Class AbstractRuntimeTrainableImplicitModule

java.lang.Object
  extended by clarion.system.AbstractImplicitModule
      extended by clarion.system.AbstractTrainableImplicitModule
          extended by clarion.system.AbstractRuntimeTrainableImplicitModule
All Implemented Interfaces:
InterfaceHandlesFeedback, InterfaceRuntimeTrainable, InterfaceTracksMatchStatistics, InterfaceTrainable
Direct Known Subclasses:
TableLookup

public abstract class AbstractRuntimeTrainableImplicitModule
extends AbstractTrainableImplicitModule
implements InterfaceRuntimeTrainable, InterfaceTracksMatchStatistics

This class implements a runtime trainable implicit module within CLARION. It extends the AbstractTrainableImplicitModule class and implements the InterfaceRuntimeTrainable and InterfaceTracksMatchStatistics interfaces. This class is abstract and therefore cannot be instantiated on its own.

Usage:

The runtime trainable implicit module is a framework for building an implicit module that can be used in the bottom level of the CLARION subsystems. A runtime trainable implicit module is unique from other implicit modules in that it can be trained during runtime. Any implicit modules that extend this class will be capable of being trained during runtime within the CLARION library.

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
protected  double Feedback
          The immediate feedback given to the network (if given).
static double GLOBAL_POSITIVE_MATCH_THRESHOLD
          The threshold for the positive match criterion.
protected  double NM
          The negative match counter.
protected  double PM
          The positive match counter.
 double POSITIVE_MATCH_THRESHOLD
          The threshold for the positive match criterion.
 
Fields inherited from class clarion.system.AbstractTrainableImplicitModule
DesiredOutput
 
Fields inherited from class clarion.system.AbstractImplicitModule
ACTUATION_TIME, ChosenOutput, DECISION_TIME, GLOBAL_ACTUATION_TIME, GLOBAL_DECISION_TIME, GLOBAL_PERCEPTION_TIME, InputAsCollection, Output, PERCEPTION_TIME
 
Constructor Summary
AbstractRuntimeTrainableImplicitModule(java.util.Collection<Dimension> InputSpace, AbstractOutputChunkCollection<? extends AbstractOutputChunk> Outputs)
          Initializes an implicit module that is capable of being trained during runtime.
 
Method Summary
 double getFeedback()
          Gets the immediate feedback that was last provided to the rule.
 double getNM()
          Gets the negative match statistic.
 double getPM()
          Gets the positive match statistic.
 void incrementNM()
          Increments the negative match statistic.
 void incrementPM()
          Increments the positive match statistic.
 void resetMatchStatistics()
          Resets the match statistics.
 void setFeedback(double feedback)
          Sets the immediate feedback for the rule.
 void setNM(double nm)
          Sets the negative match statistic.
 void setPM(double pm)
          Sets the positive match statistic.
 void updateMatchStatistics(AbstractMatchCalculator MatchCalculator)
          Updates the positive or negative match statistics based on the feedback.
 
Methods inherited from class clarion.system.AbstractTrainableImplicitModule
backwardPass, getSumSqErrors, setDesiredOutput, setDesiredOutput
 
Methods inherited from class clarion.system.AbstractImplicitModule
forwardPass, getChosenOutput, getInput, getNumInput, getNumOutput, getOutput, getOutput, getResponseTime, setChosenOutput, setInput, setInput, setInput
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface clarion.system.InterfaceTrainable
backwardPass, getSumSqErrors, setDesiredOutput, setDesiredOutput
 
Methods inherited from interface clarion.system.InterfaceHandlesFeedback
checkMatchCriterion
 

Field Detail

Feedback

protected double Feedback
The immediate feedback given to the network (if given).


PM

protected double PM
The positive match counter.


NM

protected double NM
The negative match counter.


GLOBAL_POSITIVE_MATCH_THRESHOLD

public static double GLOBAL_POSITIVE_MATCH_THRESHOLD
The threshold for the positive match criterion.


POSITIVE_MATCH_THRESHOLD

public double POSITIVE_MATCH_THRESHOLD
The threshold for the positive match criterion.

Constructor Detail

AbstractRuntimeTrainableImplicitModule

public AbstractRuntimeTrainableImplicitModule(java.util.Collection<Dimension> InputSpace,
                                              AbstractOutputChunkCollection<? extends AbstractOutputChunk> Outputs)
Initializes an implicit module that is capable of being trained during runtime.

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 - A collection of dimension-value pairs to set as the input nodes.
Outputs - The chunks to associate with the output layer.
Method Detail

getPM

public double getPM()
Gets the positive match statistic.

Specified by:
getPM in interface InterfaceTracksMatchStatistics
Returns:
The positive match statistic.

getNM

public double getNM()
Gets the negative match statistic.

Specified by:
getNM in interface InterfaceTracksMatchStatistics
Returns:
The negative match statistic.

setPM

public void setPM(double pm)
Sets the positive match statistic. This method can be used to update the positive match statistic if the user wishes to provide their own match criterion function.

Specified by:
setPM in interface InterfaceTracksMatchStatistics
Parameters:
pm - The value to set as the positive match statistic.

setNM

public void setNM(double nm)
Sets the negative match statistic. This method can be used to update the negative match statistic if the user wishes to provide their own match criterion function.

Specified by:
setNM in interface InterfaceTracksMatchStatistics
Parameters:
nm - The value to set as the negative match statistic.

getFeedback

public double getFeedback()
Gets the immediate feedback that was last provided to the rule. This method is only used if feedback is being provided.

Specified by:
getFeedback in interface InterfaceHandlesFeedback
Returns:
The feedback.

setFeedback

public void setFeedback(double feedback)
Sets the immediate feedback for the rule. This method should be called before the updateMatchStatistics method is called. This method is only used if feedback is being provided.

Specified by:
setFeedback in interface InterfaceHandlesFeedback
Parameters:
feedback - The value of the feedback.

updateMatchStatistics

public void updateMatchStatistics(AbstractMatchCalculator MatchCalculator)
Updates the positive or negative match statistics based on the feedback.

This update is usually performed after the feedback has been set.

Specified by:
updateMatchStatistics in interface InterfaceTracksMatchStatistics
Parameters:
MatchCalculator - The match calculator to use to determine positivity.

resetMatchStatistics

public void resetMatchStatistics()
Resets the match statistics.

Specified by:
resetMatchStatistics in interface InterfaceTracksMatchStatistics

incrementPM

public void incrementPM()
Increments the positive match statistic. This method can be used to update the positive match statistic if the user wishes to provide their own match criterion function.

Specified by:
incrementPM in interface InterfaceTracksMatchStatistics

incrementNM

public void incrementNM()
Increments the negative match statistic. This method can be used to update the negative match statistic if the user wishes to provide their own match criterion function.

Specified by:
incrementNM in interface InterfaceTracksMatchStatistics