clarion.samples
Class HelloWorld

java.lang.Object
  extended by clarion.samples.HelloWorld
All Implemented Interfaces:
BaseSimulationTemplate

public class HelloWorld
extends java.lang.Object
implements BaseSimulationTemplate

This is a sample simulation running a very simple task we call the "Hello World" task. This simulation is meant to demonstrate how the CLARION library can be setup. It uses mostly default settings, so it should not be considered as being the definitive method for setting up a simulation using the CLARION Library. It is, however, a good place to start for learning how to setup a simulation.

Overview of the task:
This task simulates the "Hello World" task. It uses a single agent who's job is to respond either "hello" or "goodbye" based on the salutation you give it and the salutation it has the goal to wants to give. The objective is for the agent to respond with the same salutation as the salutation it is given.

The agent has been setup using the following:

In addition, there are also a few optional settings that have been commented out. These options are: If you would like to see how these optional settings affect the simulation, simply remove the comments in the initializeAgentInternalSpace and run methods.

It is highly recommended that you explore the documentation to get a sense of where all of the various parameters are located and what options you have for configuring the system. The documentation also provides a plethora of information on how to setup pieces of the architecture. If you are having difficulty figuring out how a part of the library works you can contact the CLARION library support team at:
clarion.support@gmail.com
It is advised that you check the documentation before contacting the support team as it may be able to answer your question.

Version:
Configured to run with the CLARION Library, version: 6.0.5
Author:
Nick Wilson

Field Summary
 ActionCollection Actions
          The actions that can be performed in this task
 CLARION Agent
          The agent who is running this task.
 DimensionValueCollection CombinedInputSpace
          The combination of the sensory input space and the stimulus for all of the drives.
 int CorrectCounter
          A counter to keep track of how many trials the agent gets correct
 java.util.ArrayList<Goal> Goals
          The goals the agent is able to set throughout the course of the task
 int NumberTrials
          The number of trials to be run.
 DimensionValueCollection SensoryInputSpace
          The sensory information.
 
Constructor Summary
HelloWorld()
           
 
Method Summary
 void initializeAgentInternalSpace()
          This method initializes the agent's internal space including the actions and goals, etc.
 void initializeCLARIONAgent(CLARION Agent)
          This method initializes the components and subsystems within the CALRION agent that are going to be used by the agent to perform this task.
 void initializeSensoryInformationSpace()
          This method initializes the sensory input space and the combined input space.
static void main(java.lang.String[] args)
          The main entry point for the simulation.
 void reportResults()
          This method reports the results of the simulation.
 void run(CLARION Agent)
          This method runs the agent through the Hello World task.
 void updateDeficit(CLARION Agent, AbstractAction ChosenAction)
          This is an optional method for adjusting the deficit based on task specific information.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SensoryInputSpace

public DimensionValueCollection SensoryInputSpace
The sensory information.


CombinedInputSpace

public DimensionValueCollection CombinedInputSpace
The combination of the sensory input space and the stimulus for all of the drives.


Actions

public ActionCollection Actions
The actions that can be performed in this task


Agent

public CLARION Agent
The agent who is running this task.


Goals

public java.util.ArrayList<Goal> Goals
The goals the agent is able to set throughout the course of the task


CorrectCounter

public int CorrectCounter
A counter to keep track of how many trials the agent gets correct


NumberTrials

public int NumberTrials
The number of trials to be run.

Constructor Detail

HelloWorld

public HelloWorld()
Method Detail

main

public static void main(java.lang.String[] args)
The main entry point for the simulation. Your task/simulation must have one of these in order to run. The CLARION Library, itself is not an executable program. It is a library for you to build your own program.

Parameters:
args -

initializeSensoryInformationSpace

public void initializeSensoryInformationSpace()
This method initializes the sensory input space and the combined input space.

Specified by:
initializeSensoryInformationSpace in interface BaseSimulationTemplate

initializeAgentInternalSpace

public void initializeAgentInternalSpace()
This method initializes the agent's internal space including the actions and goals, etc.

Specified by:
initializeAgentInternalSpace in interface BaseSimulationTemplate

initializeCLARIONAgent

public void initializeCLARIONAgent(CLARION Agent)
This method initializes the components and subsystems within the CALRION agent that are going to be used by the agent to perform this task.

Specified by:
initializeCLARIONAgent in interface BaseSimulationTemplate
Parameters:
Agent - The agent to initialize.

run

public void run(CLARION Agent)
This method runs the agent through the Hello World task.

Specified by:
run in interface BaseSimulationTemplate
Parameters:
Agent - The agent to run.

reportResults

public void reportResults()
This method reports the results of the simulation.

Specified by:
reportResults in interface BaseSimulationTemplate

updateDeficit

public void updateDeficit(CLARION Agent,
                          AbstractAction ChosenAction)
This is an optional method for adjusting the deficit based on task specific information. This method is known as the "Deficit Change Processor".

Parameters:
Agent - The agent whose deficit you wish to change.
ChosenAction - The chosen action.