Installation
There are many ways to setup and use CLARION ranging from very straight-forward (although not very dynamic or particularly useful) to very advanced (initializing every little aspect of CLARION), however all components of all subsystems of CLARION MUST be properly initialized (and trained if necessary) prior to running a task. The CLARION class is the main class for the entire system. An agent is defined as an instance of the CLARION class. For CLARION to run, the ACS must be setup at a minimum.

There are no restrictions for developing task environments or simulations that use the CLARION java library. To use the CLARION library, simply add the library (clarion.jar) to the libraries list for a java project and then simply import whichever CLARION packages your wish to access.
Adding a library (in eclipse) is accomplished by following these steps:

  • Create a new java project within an SDK (example uses eclipse).
  • Right-click on the project folder in the "package explorer" and choose "properties."
  • On the next screen, choose "Java Build Path" and then the "Libraries" tab.
  • Under the "Libraries" tab, choose the "Add External Jars" button and then specify the location of the "clarion.jar" file.

The CLARION Library contains 3 packages:

  • clarion.system - The main classes of the CLARION Library.
  • clarion.tools - Some classes that act as tools to assist with initializing agents using the CLARION library.
  • clarion.samples - A series of sample simulations that come pre-packaged with the CLARION Library.

To use the CLARION library:

  • Specify "import clarion.system.*;" (for the main classes) at the top of your simulation.
    Note: You will likely find it necessary to import the other packages of CLARION into your simulation as well in order to correctly setup CLARION. The extent to which you will need to import the other packages depends upon how you are setting up the system as well as the level of complexity you wish to use.

The CLARION library has been setup so that it can be used without accessing the source code for the library. In fact, it is HIGHLY recommended that you do NOT alter the source code for the CLARION library. However, the CLARION library is open source and is free to be modified as needed. To view the source code, follow these steps:

  • Create a new java project within an SDK (example uses eclipse).
  • Right-click on "sourceCode." and select "import."
  • On the next screen, under "select an import source" choose "archive file" and click "next".
  • On the following screen, select the location where you have saved the "clarion.jar" file and press "finish."

There are no requirements for implementing CLARION into a simulation. However, the abstract class BaseSimulationTemplate has been provided with the CLARION library to provide assistance in setting up a simulation using the CLARION library. To use the simulation setup, simply have your simulation implement the BaseSimulationTemplate interface located in the tools package.

BaseSimulationTemplate
While there are no requirements for setting up a simulation or task environment to work with the CLARION library, this interface provides a base template to help with the construction of simulations using the CLARION library.
The order for constructing a simulation using this template is:
  1. Create a class in your own package that includes clarion.tools.BaseSimulationTemplate and implements BaseSimulationTemplate.
  2. Construct the input space. This includes:
    • The space of all sensory information
  3. Construct the space for all possible internal information that can be used by your CLARION agents. This includes:
    • The Actions that can be performed
    • The Goals (if being used)
    • Specialized Working Memory  Chunks (if being used)
    • Input specific to the Drives (if being used):
      • stimulus
      • deficit
    • Adjusting the global parameters you want adjusted by accessing them statically within their appropriate class (optional).
  4. Initialize your CLARION agents.
  5. Initialize an instance of the MS (if being used).
    • The instance of the MS you just initialized will be automatically attached to the CLARION Agent with whom it is initialized
  6. Initialize the Drives either by:
  7. If initializing Drives to use an implicit module (AbstractImplicitModule), then:
    1. Initialize the implicit module.
    2. Train the implicit module (if needed).
    3. Attach the implicit module to the Drive.
  8. Initialize an instance of the MCS (if being used).
    • The instance of the MCS you just initialized will be automatically attached to the CLARION Agent with whom it is initialized
    1. Initialize an instance of the GoalSelectionModule (if being used).
    2. If using an implicit module for goal selection, then:
      1. Initialize the implicit module.
      2. Train the implicit module (if needed).
      3. Attach the implicit module to the GoalSelectionModule.
    3. Initialize an instance of the ACSLevelProbabilitySettingModule (if being used).
    4. If using an implicit module for ACS level proability setting, then:
      1. Initialize the implicit module.
      2. Train the implicit module (if needed).
      3. Attach the implicit module to the ACSLevelProbabilitySettingModule.
  9. Initialize an instance of the GoalStructure (if being used).
    • The instance of the GoalStructure you just initialized will be automatically attached to the Agent with whom it is initialized
    1. Specify the relevance each Drive has to each Goal.
    2. Add the Goals to the list of possible Goals in the GoalStructure.
  10. Initialize an instance of the ACS.
    • The instance of the ACS you just initialized will be automatically attached to the Agent with whom it is initialized
    1. Initialize and train (if needed) one or more implicit modules (REQUIRED).
    2. Initialize any IRL Rules or Fixed Rules (if being used).
    3. Add implicit modules, Rules, and Actions to the ACS.
  11. Initialize an instance of the Working Memory (if being used).
    • The instance of the Working Memory you just initialized will be automatically attached to the Agent with whom it is initialized
To run the simulation:
  • At each time increment:
    1. Have the CLARION agent perceive the current sensory information including drive specific input (if being used) and any feedback from the last time increment (if available).
    2. Ask the CLARION agent to act given what it perceived.
    3. Adjust the current sensory information (including drive specific input), and repeat.
Reporting the internal results:
  • Essentially all components of CLARION can be viewed at any point during the simulation if you want to report the internal state of a CLARION agent.
The following internal operations are acceptable to perform during the simulation:
  1. Presenting the CLARION agent with new sensory information (through perception [see perceive method]) not originally specified within the sensory information space during initialization.
  2. Adding new Actions, action networks, or Rules to the ACS.
  3. Adding new Goals to the list of possible Goals in the GoalStructure.
  4. Adding new Drives to the MS (not recommended).
  5. Adding new specialized Working Memory  Chunk to the specialized Working Memory  Chunk list in the Working Memory.
  6. Changing the LOCAL parameters for various components inside an agent.
Methods:
Below are detailed methods to use when setting up a simulation using BaseSimulationTemplate
Method Summary
 void initializeAgentInternalSpace()
          This method is where you construct the space of all possible internal information that can be used by your CLARION agents.
 void initializeCLARIONAgent(clarion.CLARION Agent)
          This method is where all of the agent specific initialization takes place for each agent in your environment.
 void initializeSensoryInformationSpace()
          This method is where you construct the world in which your CLARION agents will live.
 void reportResults()
          Use this method to report the results of your simulation.
 void run(clarion.CLARION Agent)
          This method is used to run the task.