Modules

Theoretical functionality in jACT-R is defined and extended through the use of modules. As modules are developed and refined, their specification and details will be added here.

Declarative

The declarative module interface defines the methods necessary to asynchronously create and encode chunktypes and chunks. It also includes methods for disposing of temporary chunks (or cleaning up chunks during model disposal), and both partial and exact search methods.

An abstract implementation is provided that handles all of the basics (including event firing) requiring implementations of the actual create, add, copy, dispose and search methods.

There are specific extension interfaces for theory revisions four and five.

The default implementation conforms to theory revision six.

AbstractDeclarativeModule

The AbstractDeclarativeModule provides most of the nitty-gritty implementation details that are required for the IDeclarativeModule. However, it leaves the theoretically relevant components (creating, encoding, searching of chunks/types) to the client.

DefaultDeclarativeModule

The DefaultDeclarativeModule is the general starting point for any theory specific implementation. It is thread safe, provides all the required functionality, and also provides access to the three most commonly required extension points. Specifically, you can provide it with:

  • IDeclarativeNamer to specify the names of chunks/types on encoding
  • IDeclarativeInstantiator to instantiate the specific class of chunk/types required by the module (defaults to DefaultChunk5 and DefaultChunkType5)
  • IDeclarativeConfigurator to configure the instantiate chunk/types (useful for adding non-default parameters, etc).

Version 6

Default declarative module for ACT-R 6. Carries with it some reminents from ACT-R 5. (namely support for similarities). This module uses the IDeclarativeConfigurator to set the various activation equations used by the chunks (i.e., IBaseLevelActivationEquation, ISpreadingActivationEquation, IRandomActivationEquation)

Parameters

  • EnablePartialMatching : default false.
  • ActivationNoise : default 0. Note: a random module must be installed to use.
  • PermanentActivationNoise : default 0. See note above.
  • BaseLevelConstant : default 0.
  • MismatchPenalty : default 1.
  • MaximumSimilarity: default 0
  • MaximumDifference : default -1.

Associative Linkage

Associations in jACT-R are handled by IAssociativeLinkageSystem, which is handled by the Declarative module (often pulling the linkage system from a declarative learning module).

The linkage system provides methods for creating links, accessing their respective equations (for updating values) and a parameter handler to transform strings into lists of associative links. In conjunction with their declarative learning module, they will often install event listeners in order to install and update the links correctly.

Declarative Learning

Declarative learning is generally accomplished by an IDeclarativeLearningModule. Since the learning theories evolve faster than the rest of the architecture, there are significant differences between the various implementations and their expectations.

Version 4

DefaultDeclarativeLearningModule4 provides the ACT-R 4 style of base-level learning and associative learning. It expects that the chunks created by the installed declarative module support the ISubsymbolicChunk4 interface, as well the associative linkage system to be the DefaultAssociativeLinkageSystem (which creates Link4 associative links).

Note: Theoretically outdated. Limited support available.

Parameters

  • BaseLevelLearningRate : Decay rate of base level activation (values: numeric>0, NaN (off). default: 0.5)
  • AssociativeLearningRate : Carry over from prior estimates to the current (values: numeric >=0. default 1).
  • OptimizedLearning : Number of reference times to retain in the calculations (values: 0-100. default: 0) Note: 0 implies no optimization, that is, all references are retained.

Version 6

DefaultDeclarativeLearningModule6 extends the version for 4 by replacing the associative linkage system and providing an additional parameter for the MaximumAssociativeStrength.

Parameters

  • BaseLevelLearningRate : Decay rate of base level activation (values: numeric>0, NaN (off). default: 0.5)
  • MaximumAssociativeStrength : Smax (values: numeric >=0. default 1).
  • OptimizedLearning : Number of reference times to retain in the calculations (values: 0-100. default: 0) Note: 0 implies no optimization, that is, all references are retained.

Imaginal

The imaginal system is used to store intermediate problem state representations. Typically used in conjunction with the goal module which retains the goal state.

The imaginal system is time dependent (unlike the goal module), so all imaginal buffer operations take some (configurable) amount of time.

Version 6

DefaultImaginalModule6 is the default implementation of the imaginal system.
It provides the imaginal buffer, and has parameters to manipulate the amount of time add and modify requests take.

Parameters

  • AddDelayTime : How much time does it take to add a new representation to the imaginal buffer (values: numeric>=0. default:0.2)
  • ModifyDelayTime : How much time does a modification take (values: numeric>=0. default:0.2)
  • RandomizeDelaysEnabled : are the delays stochastic? (values:true/false. default: false) (Note: requires random module to be installed)

Intentional (goal) module

The DefaultGoalModule6 provides a simple immediate buffer and little else.

Perceptual Modules

Aural Module

(exists, documentation pending)

Motor module

DefaultMotorModule6 provides the functionality of the manual module in the lisp, but generalizes it over all possible muscles.

(exists, documentation pending)

Visual Module

DefaultVisualModule6 provides most of the visual functionality found within the lisp equivalent. It provides a fully extensible system for adding new feature maps (for visual searches), visual encoders (for converting percepts into chunks), and filters (for search time prioritizing). The time it takes to find or encode visual objects is also configurable.

Those wishing to add new functionality to the system will typically implement the following delegate interfaces or their abstract implementations:

  • IPerceptualEncoder or AbstractVisualEncode : Provides methods to determine whether or not a particular percept (IAfferentObject) is relevant. If so, it is responsible for creating the chunk, updating it, and marking it as invalid if it changes too much.
  • IFeatureMap, AbstractVisualFeatureMap, or AbstractSortedVisualFeatureMap : Provides a new feature map to be searched by the visual system. The class is responsible from pulling features out of a percept, indexing them, and providing search results.
  • IIndexFilter, or AbstractVisualLocationIndexFilter : Responsible for normalizing requests (i.e., resolving module dependent values like nearest=current), defining a weight (relative to other filters) for prioritizing, and filtering out other visual-locations.

To add any of these, merely provide the full class name of the implementor as a parameter name, and set its value to true. Setting the value to false will remove the named class.

Significant Divergences

(from the lisp)

  • visual-location.screen-x/-y are in visual degrees, not pixels.
  • origin of the visual field is in the center, increasing up and to the right (as opposed to the screen based upper-left corner, increasing down and right)
  • object tracking is automatic, so long as the percept does not exceed movement tolerances.
  • visual errors will set the visual buffer's error slot to provide more detailed information as to why the failure occurred. (error-nothing-matches, error-nothing-available, error-changed-too-much, error-no-longer-available, error-invalid-index)

Parameters

  • VisualEncodingTimeEquationClass: class name of implementor of IVisualEncodingTimeEquation. (default: DefaultEncodingTimeEquation).
  • VisualSearchTimeEquationClass: class name of implementor of IVisualSearchTimeEquation. (default: DefaultSearchTimeEquation)
  • EnableVisualBufferStuff: should new visual locations be stuffed into the buffer w/o a search. (default: false).
  • VisualFieldWidth: width in degrees of the visual field (default: 140)
  • VisualFieldHorizontalResolution: How many visual degrees separate unique visual-locations (default : 1)
  • VisualFieldHeight: height in degrees of the visual field (default: 90?)
  • VisualFieldVerticalResolution: How many visual degrees separate unique visual-locations (default : 1)
  • NumberOfFINSTS: how many finsts are available (default: 3)
  • FINSTDurationTime: how long does a finst last (default: 4)
  • NewFINSTOnsetDurationTime: how long does a new finst remain marked as new (default: ?)
  • MovementTolerance: How many visual angles must a percept move in a single interval before it has moved too much. (default: ?)
  • EnableStrictSynchronization: force the architecture to process all incoming perceptual messages before attempting to do a search or encoding. (default: false)

Vocal Module

(exists, documentation pending)

Procedural

The procedural module is the second primary module that all models must have (the other being declarative). It is responsible for managing all productions in the model.

Version 6

DefaultProceduralModule6 provides the primary procedural functionality. The most common points of extension are in conflict set assembly, production instantiation and selection. Each has its own delegate interface (IConflictSetAssembler, IProductionSelector, IProductionInstantiator). This implementation is also responsible for enforcing strict harvesting. For any buffer that has strict harvesting enabled (IActivationBuffer.isStrictHarvestingEnabled()), the module checks to see if the production matching on that buffer also includes a remove. If not, one is added automatically.

The default production selector will choose the production with the highest 'ExpectedUtility', if that is not defined (i.e. no procedural learning module is installed or enabled), it will use 'Utility'.

Parameters

  • NumberOfProductionsFired : How many productions have fired up to this point.
  • ExpectedUtilityNoise : Noise parameter for utility (values: number>=0. default : 0).
  • DefaultProductionFiringTime : How much time a production takes to fire (values: numeric>0. default: 0.05)

Procedural Learning

Procedural learning has undergone much evolution since the early days of ACT-R.

Version 6

DefaultProceduralLearningModule6 provides access to production compilation and utility learning. Utility learning utilizes the IExpectedUtilityEquation. Production compilation delegates to the IProductionCompiler. The module is responsible for propagating rewards backward in time. Utility learning is fully functional, and can even support the learning of utility noises (UtilityNoiseLearningExtension). The 'Reward' parameter determines how a production participates in the utility learning. A numeric value will result in that production starting a chain of rewards back propogating after it fires. A value of 'default' or NaN, will mark the production as participating the utilty learning, but not starting it. 'skip' or -Infinity will result in the production being skipped, but utility learning continues to propogate. Finally, you can mark a production with 'stop' or Infinity to halt reward processing at this production (not giving any credit to it or prior productions).

Production compilation, while implemented, is based directly on the lisp version and is not as extensible as desired. The long term goal is to get it using the ICompilableContext which describes buffers in terms of their critical properties for production compilation.

This implementation also has the ability reward productions selectively based upon what buffers they act upon. Obviously, we want to reward productions that act on the goal and imaginal buffers, but there exist a class of productions where rewards are less relevant. Goal-free or reflexive productions are often used for basic model behavior that exists below the intentional level. By limiting the productions to be rewarded to those that access the "IncludeBuffers" parameter, you can exclude some productions from rewards, without effecting the rest of the reward chain.

Parameters

  • ExpectedUtilityEquation : class name for the implementor of IExpectedUtilityEquation (default : DefaultExpectedUtilityEquation)
  • ProductionCompiler : class name for the implementor of IProductionCompiler (default: DefaultProductionCompiler6)
  • EnableProductionCompilation : should comilation be used (values:true/false. default:false)
  • OptimizedLearning : number of time references (for the production) to be retained. 0 means retain them all. (default: 0)
  • ParameterLearningRate : Discount applied to utility learning (values: numeric >0, NaN (off) default: NaN)
  • IncludeBuffers : a list of buffer names (coma separated) that productions must match/manipulate in order to be considered for rewarding. (default: "goal, imaginal, retrieval")

Random

IRandomModule provides a centralized location for the generation of random numbers. Any module that relies upon randomness should check for the existence of a random module (e.g. (IRandomModule) model.getModule(IRandomModule.class)) and use the returned instance. If no random module is installed, random behavior should not be enabled. This allows one to easily enable/disable random behavior. By centralizing the random generation, you can more easily guarantee repeatable behavior for a given random seed.

There is a single default implementation.

Default

DefaultRandomModule

Parameters

  • RandomSeed : default automatically generated.
  • TimeRandomizer : default 3. Sets the seed for the time randomization used for the equal distribution (time * ((randomizer-1)/randomizer))

Retrieval

The basic retrieval module template. All retrieval module implementations must support the parameter RetrievalThreshold, which defines the minimum chunk activation value that a chunk must have to be accessible.
This module class also provides access to the model-wide retrieval time equation. And an asynchronous retrieval method. Note: the retrieval method need not actually be asynchronous, but support is provided at this level since retrofitting is such a pain.
There is currently a single default implementation of this module.

Version 6

The default implementation provides access to the basic retrieval functionality, as well as exposes the parameters defined in 4.0 (LatencyFactor,LatencyExponent) and permits partial matching (if the declarative module's PartialMatchingEnabled is true).
Since it can be so useful for those that aren't completely concerned with retrieval behavior, the module also permits the use of indexed retrievals. If you already have a reference to a specific chunk (say as a slot value), you can insert it directly into the retrieval buffer to access it on the next cycle. To enable this, set the EnableIndexedRetrievals to true. Otherwise, +retrieval> =chunkRef will merely create a pattern based on that chunk and search for it, as is the canonical behavior.
Unlike most other buffers, the retrieval buffer provided by this module does not copy the chunk on insertion. It won't permit you to make modifications (=retrieval> slot newValue) will always fail. This was done to prevent unnecessary copying. Reference counts/access times are still consistent.
Actual retrievals are merely delegated to the declarative module. If the declarative module is asynchronous, so too shall the retrievals.
The module now supports parameter overrides when specifying a retrieval. These overrides hold for the duration of that single retrieval only. See below for options.

Parameters

  • RetrievalThreshold : default 0. -Infinity to disable entirely. If -Infinity is used, 0 will be used for the retrieval time equation so that failed retrievals don't take infinite time to complete.
  • LatencyFactor : default 1.
  • LatencyExponent: default 1. (unpublished parameter).
  • EnableIndexedRetrievals : default false. If true, a direct reference to the chunk is immediately retrieved.
  • FINSTDurationTime: default 3 seconds.
  • NumberOfFINSTs: default 4 chunks.

Meta-slots

  • :recently-retrieved : Test for whether this chunk has been recently retrieved (values: true/false). Can be used at request (RHS) or matching (LHS).
  • :retrievalThreshold : Temporarily use the specified retrieval threshold (any number, NaN, (-)Infinity)
  • :partialMatch : Temporarily enabled/disable partial matching (true/false)
  • :indexedRetrieval : Temporarily enabled/disable indexed retrievals (true/false)
  • :accessibility : determine which activation value to use for the retrievability of a chunk ("summation", "base level", "spread", "max", "min", default : "summation")
  • :retrievalTime : determine which activation value to use for retrieval time calc (same as :accessibility)

Resetting declarative finsts

The retrieval module only resets declarative finsts with a clear request. 

In Lisp parlance:

+retrieval>

isa clear

all true