|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectclarion.system.CLARION
public class CLARION
This is the main class of the CLARION Library. All agents within a task environment must have their own instance of this class.
Usage:
The CLARION class acts as the "brain" for a CLARION agent. The "brain" of this agent interacts with the task environment using the "perceive" and "act" functions. If setup correctly, only these two methods should need to be called during runtime (after the CLARION agent has been initialized).
The constructor of this class builds a "frame" from which all desired subsystems can be attached. After a CLARION instance has been fully setup, only those subsystems that have been attached will be used when performing action-decision making.
Subsystems and intermediate modules (i.e. the working memory and goal structure) for CLARION must be attached in the following order:
Every instance of CLARION MUST at least have an ACS attached to it in order to operate correctly. This is the MINIMUM requirement for setting up a CLARION agent.
Also, keep in mind that each instance of CLARION needs to have its own instances of the subsystems it uses. CLARION should NOT share instances of subsystems (or any other components within those subsystems for that matter). Doing so would be like saying that two agents share the same brain or parts of the same brain. Also, any component that is given to an instance of CLARION MUST NOT be tied to another instance of CLARION.
While CLARION will automatically create its own internal representation for some components, it is HIGHLY recommended that you create UNIQUE instances for EVERYTHING that is provided and/or attached to a CLARION agent (with the notable exception of the sensory information).
Many of the components located within CLARION (including the subsystems) have options and parameters
(in the form of constants) that can be adjusted from their defaults as is deemed necessary by the task
being performed. All parameters come in two varieties:
The parameters can be found within their appropriate components. If you are having trouble locating a parameter, it is advised that you consult the documentation for assistance.
Requirements for using the CLARION Library:
Field Summary | |
---|---|
private ACS |
acs
The Action Centered Subsystem. |
private long |
Birthdate
The time-stamp taken from the internal-clock at the moment the CLARION agent in instantiated. |
private AbstractAction |
ChosenAction
The chosen action when the "act" method was last called |
private Goal |
CurrentGoal
The current goal |
private DimensionValueCollection |
CurrentInput
The current input (including perceived sensory information, current goal, and chunks in working memory) for this instance of CLARION. |
private GoalStructure |
gs
The Goal Structure. |
protected DimensionValueCollection |
InputSpace
A dimension-value collection that contains all of the dimension-value pairs of which this instance of CLARION is currently aware. |
private long |
InternalClock
The number of time-steps (incremented whenever an action is performed) that the agent has been alive. |
private MCS |
mcs
The Meta Cognitive Subsystem. |
private MS |
ms
The Motivational Subsystem. |
private NACS |
nacs
The Non Action Centered Subsystem. |
private WorkingMemory |
wm
The Working Memory. |
Constructor Summary | |
---|---|
CLARION(DimensionValueCollection SensoryInformationSpace)
Minimally initializes a CLARION agent. |
Method Summary | |
---|---|
AbstractAction |
act()
Determines the action to perform given what was perceived. |
protected void |
attachACS(ACS Acs)
Attaches the action centered subsystem to this instance of CLARION. |
protected void |
attachGoalStructure(GoalStructure GS)
Attaches the goal structure to this instance of CLARION. |
protected void |
attachMCS(MCS Mcs)
Attaches the meta-cognitive subsystem to this instance of CLARION. |
protected void |
attachMS(MS Ms)
Attaches the motivational subsystem to this instance of CLARION. |
protected void |
attachNACS(NACS Nacs)
Attaches the non-action centered subsystem to this instance of CLARION. |
protected void |
attachWorkingMemory(WorkingMemory WM)
Attaches the working memory to this instance of CLARION. |
void |
endEpisode()
Marks the end of an "episode". |
private DimensionValueCollection |
generateCurrentInput(DimensionValueCollection CurrentSensoryInformation)
Generates the current input to use inside of CLARION given the current sensory information, the current goal, and the items in working memory. |
ACS |
getACS()
Gets the ACS. |
long |
getAge()
Gets the age (the number of time steps since this instance of CLARION was initialized) of the agent. |
long |
getBirthdate()
Gets the birthdate (the time stamp when this instance of CLARION was initialized) of the agent. |
Goal |
getCurrentGoal()
Gets the current goal. |
GoalStructure |
getGoalStructure()
Gets the goal structure. |
protected DimensionValueCollection |
getInputSpace()
Gets the internal representation of the input space from this instance of CLARION. |
java.util.Collection<Dimension> |
getInternalInputSpace()
Gets the internal representation of the input space from this instance of CLARION. |
AbstractAction |
getLastAction()
Gets the last action chosen by this instance of CLARION. |
MCS |
getMCS()
Gets the MCS. |
MS |
getMS()
Gets the MS. |
NACS |
getNACS()
Gets the NACS. |
WorkingMemory |
getWorkingMemory()
Gets the working memory. |
void |
perceive(DimensionValueCollection NewSensoryInformation)
Perceives the new sensory information and performs learning. |
void |
perceive(DimensionValueCollection NewSensoryInformation,
double feedback)
Perceives the new sensory information as well as any feedback that is to be received for performing the last action. |
void |
resetGoal()
Resets the current goal. |
void |
resetLastAction()
Resets the last chosen action. |
protected void |
updateInputSpace(java.util.Collection<Dimension> c)
Updates the input space based on the specified collection of dimension-value pairs. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private ACS acs
private NACS nacs
private MS ms
private MCS mcs
private GoalStructure gs
private WorkingMemory wm
protected DimensionValueCollection InputSpace
private DimensionValueCollection CurrentInput
private AbstractAction ChosenAction
private Goal CurrentGoal
private long Birthdate
private long InternalClock
Constructor Detail |
---|
public CLARION(DimensionValueCollection SensoryInformationSpace)
SensoryInformationSpace
- A collection that contains all of the possible
dimension-values that can be specified as sensory information to be perceived by a CLARION
agent.Method Detail |
---|
public void perceive(DimensionValueCollection NewSensoryInformation) throws MissingACSException
If you are using the drive equation (or its equivalent) for calculating drive strengths within the MS, the sensory information should also include a dimension with the ID "STIMULUS" that contains the stimulus values for each of the drives. The stimulus for the drives is simply a translation from the sensory information (or context) into a single value to be used by the drive equation (etc.) for calculating the drive strength.
NewSensoryInformation
- The new sensory information to be perceived.
MissingACSException
- If no instance of the ACS has been initialized.public void perceive(DimensionValueCollection NewSensoryInformation, double feedback) throws MissingACSException
If you are using the drive equation (or its equivalent) for calculating drive strengths within the MS, the sensory information should also include a dimension with the ID "STIMULUS" that contains the stimulus values for each of the drives. The stimulus for the drives is simply a translation from the sensory information (or context) into a single value to be used by the drive equation (etc.) for calculating the drive strength.
NewSensoryInformation
- The new sensory information to be perceived.feedback
- The feedback received for performing the last action.
MissingACSException
- If no instance of the ACS has been initialized.public AbstractAction act() throws MissingACSException, MissingSensoryInformationException
MissingACSException
- If no instance of the ACS has been initialized.
MissingSensoryInformationException
- If no sensory information has been perceived.private DimensionValueCollection generateCurrentInput(DimensionValueCollection CurrentSensoryInformation)
CurrentSensoryInformation
- The current sensory information being perceived.
protected void attachGoalStructure(GoalStructure GS)
GS
- The goal structure to be attached.protected void attachWorkingMemory(WorkingMemory WM)
WM
- The working memory to be attached.protected void attachACS(ACS Acs)
Acs
- The action centered subsystem to be attached.protected void attachMS(MS Ms)
Ms
- The motivational subsystem to be attached.protected void attachMCS(MCS Mcs)
Mcs
- The meta-cognitive subsystem to be attached.protected void attachNACS(NACS Nacs)
Nacs
- The non-action centered subsystem to be attached.public ACS getACS()
public MS getMS()
public MCS getMCS()
public NACS getNACS()
public GoalStructure getGoalStructure()
public WorkingMemory getWorkingMemory()
protected DimensionValueCollection getInputSpace()
public java.util.Collection<Dimension> getInternalInputSpace()
public AbstractAction getLastAction()
public Goal getCurrentGoal()
public void resetLastAction()
public void resetGoal()
public long getAge()
public long getBirthdate()
public void endEpisode()
protected void updateInputSpace(java.util.Collection<Dimension> c)
c
- The collection of dimension-value pairs with which to update the input space.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |