|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectclarion.system.AbstractSubsystem
clarion.system.MS
public final class MS
This class implements the Motivational Subsystem (MS) within CLARION. It extends the AbstractSubsystem class.
Usage:
This implementation of the motivational subsystem is in charge of one thing, and one thing
only:
The Drives!
Drives are primarily used in CLARION to guide the meta-cognitive tasks performed by the various modules within the MCS. Each drive has an implicit module that is used to derive an activation level for its "drive strength." The drive strengths are then passed to the MCS as well as possibly other subsystems (as defined by the user) so they can be used to guide anything from ACS level probability setting to goal selection and action decision making.
Drives can either be user defined or they can be specified from the list of primary drives defined by the CLARION theory.
If you wish to use the primary drives, an enumerator ("PrimaryDrives") containing the IDs for those drives can be found in the Personality class located within tools package of the CLARION Library.
When adding drives to the MS, they can be placed in any of 3 "behavioral systems" located within the MS:
It should also be noted that each of the behavioral systems have their own gain parameter that is used (primarily by the drive equation) for calculating the drive strengths for the drives located within each system respectively.
Below is a list of the primary drives and the behavioral system to which they are affiliated:
Although, conceptually, the goal structure is also located on the top level of the MS, implementationally it is logical to specify it as an intermediate module since it is used by several subsystems. Therefore, in the CLARION Library, the goal structure is contained within the CLARION class.
In addition to having methods for getting, adding and manipulating drives, the MS also has methods for defining the concept of a "personality", based on the combination of the drives. The CLARION Library comes pre-packaged with a few pre-defined personalities, which are located in the Personality class (as the enumerator "PersonalityTypes"). If you want to quickly setup the MS with one of these personalities, you can do so by simply calling the constructor that takes in a "personality type" (from the Personality class) as a parameter and will automatically generate the appropriate drives for you.
There is also a method within the MS to allow you to define your own personality by simply passing in a collection of Value objects (representing drive deficits) where the IDs of those Values are equal to the values from the enumerated type, "PrimaryDrives", located in the Personality class.
Note that it is not required that a CLARION agent even have an MS at all. If the task being performed by the agent does not require an MS, the user can choose simply not to attach the MS to the CLARION agent, and the agent will be able to operate quite successfully without this subsystem being specified (for some tasks).
Field Summary | |
---|---|
private BehavioralApproachSystem |
BAS
The behavioral approach system |
private BehavioralInhibitionSystem |
BIS
The behavioral inhibition system |
private DimensionValueCollection |
CurrentInput
The current input (including current sensory information, current goal, chunks in working memory, and drive stimulus). |
private NeitherBehavioralSystem |
NEITHER
The system for drives that belong to neither behavioral system |
private static long |
serialVersionUID
|
Fields inherited from class clarion.system.AbstractSubsystem |
---|
InputSpace |
Constructor Summary | |
---|---|
MS(CLARION Agent)
Minimally initializes the MS. |
|
MS(CLARION Agent,
Personality.PersonalityTypes Pers)
Initializes the MS with the personality specified. |
Method Summary | |
---|---|
void |
addDrivesToBAS(java.util.Collection<Drive> drives)
Adds the specified drives to the behavior approach system. |
void |
addDrivesToBIS(java.util.Collection<Drive> drives)
Adds the specified drives to the behavior inhibition system. |
void |
addDrivesToBothSystems(java.util.Collection<Drive> drives)
Adds the specified drives to both the BIS and the BAS. |
void |
addDrivesToNeither(java.util.Collection<Drive> drives)
Adds the specified drives to the MS without specifying a behavioral system. |
void |
addDriveToBAS(Drive drive)
Adds the specified drive to the behavior approach system. |
void |
addDriveToBIS(Drive drive)
Adds the specified drive to the behavior inhibition system. |
void |
addDriveToBothSystems(Drive drive)
Adds the specified drive to both the BIS and the BAS. |
void |
addDriveToNeither(Drive drive)
Adds the specified drive to the MS without specifying a behavioral system. |
protected void |
attachSelfToAgent(CLARION Agent)
Attaches the MS to the specified CLARION agent. |
DriveStrengthCollection |
calculateAllDriveStrengths(DimensionValueCollection DriveInput)
Gets the drive strengths for ALL drives in the MS. |
DriveStrengthCollection |
calculateBASDriveStrengths(DimensionValueCollection DriveInput)
Gets the drive strengths for all drives in the behavioral approach system. |
DriveStrengthCollection |
calculateBISDriveStrengths(DimensionValueCollection DriveInput)
Gets the drive strengths for all drives in the behavioral inhibition system. |
DriveStrengthCollection |
calculateBothDriveStrengths(DimensionValueCollection DriveInput)
Gets the drive strengths for all drives that belong to both the BAS and BIS. |
DriveStrength |
calculateDriveStrength(java.lang.Object ID,
DimensionValueCollection DriveInput)
Gets the drive strength for the drive with the specified ID. |
DriveStrengthCollection |
calculateNeitherDriveStrengths(DimensionValueCollection DriveInput)
Gets the drive strengths for all drives in the MS that do not belong to a behavioral system. |
protected void |
endEpisode()
Performs the appropriate end of episode instructions for the MS. |
java.util.Collection<Drive> |
getAllDrives()
Gets the all the drives in the MS. |
java.util.Collection<DriveStrength> |
getAllDriveStrengths()
Gets all of the drive strength objects for the drives in the MS. |
BehavioralApproachSystem |
getBAS()
Gets the BAS. |
java.util.Collection<Drive> |
getBASDrives()
Gets the drives in the behavioral approach system. |
java.util.Collection<DriveStrength> |
getBASDriveStrengths()
Gets the drive strengths for the drives in the behavioral approach system. |
BehavioralInhibitionSystem |
getBIS()
Gets the BIS. |
java.util.Collection<Drive> |
getBISDrives()
Gets the drives in the behavioral inhibition system. |
java.util.Collection<DriveStrength> |
getBISDriveStrengths()
Gets the drive strengths for the drives in the behavioral inhibition system. |
java.util.Collection<Drive> |
getBothDrives()
Gets the drives that are in both the BAS and BIS. |
java.util.Collection<DriveStrength> |
getBothDriveStrengths()
Gets the drive strengths for the drives that are in both the BAS and BIS. |
Drive |
getDrive(java.lang.Object ID)
Gets the drive with the specified ID. |
DriveStrength |
getDriveStrength(java.lang.Object ID)
Gets the drive strength for the drive with the specified ID. |
java.util.Collection<Drive> |
getNeitherDrives()
Gets the drives that have been specified as being in neither behavioral system. |
java.util.Collection<DriveStrength> |
getNeitherDriveStrengths()
Gets the drive strengths for the drives that have been specified as being in neither behavioral system. |
NeitherBehavioralSystem |
getNeitherSystem()
Gets the system for drives that belong to neither behavioral system. |
int |
getNumDrives()
Gets the number of drives in the MS. |
void |
initUserDefinedPersonality(java.util.Collection<Value> deficits)
Initializes the MS with a user defined personality. |
Methods inherited from class clarion.system.AbstractSubsystem |
---|
updateInputSpace |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static final long serialVersionUID
private BehavioralApproachSystem BAS
private BehavioralInhibitionSystem BIS
private NeitherBehavioralSystem NEITHER
private DimensionValueCollection CurrentInput
Constructor Detail |
---|
public MS(CLARION Agent)
Agent
- The agent to which the subsystem is being attached.public MS(CLARION Agent, Personality.PersonalityTypes Pers)
Note that the drives that are created using this constructor will be setup to use the drive equation as their implicit module. If you wish to use a different implicit module for the drives, you must setup, train, and attach that module to each drive that was created separately.
Agent
- The agent to which the subsystem is being attached.Pers
- The personality to set.Method Detail |
---|
public void initUserDefinedPersonality(java.util.Collection<Value> deficits)
Note that the drives that are created using this constructor will be setup to use the drive equation as their implicit module. If you wish to use a different implicit module for the drives, you must setup, train, and attach that module to each drive that was created separately.
public DriveStrength calculateDriveStrength(java.lang.Object ID, DimensionValueCollection DriveInput)
If you are using the drive equation, the specified drive input MUST have a dimension whose ID is equal to the specified ID and that dimension must contain a value with the ID: STIMULUS (of enumerated type RequiredEquationInputs located in the from the DriveEquation class).
ID
- The ID of the drive whose drive strength you want to get.DriveInput
- The current input for the MS.
public DriveStrengthCollection calculateBASDriveStrengths(DimensionValueCollection DriveInput)
If you are using the drive equation, the dimensions within the specified drive input MUST have IDs equal to the IDs of drives you want to use and those dimensions must contain a value with the ID: STIMULUS (of enumerated type RequiredEquationInputs located in the DriveEquation class).
If there are no drives that belong to the BAS, this method returns null.
DriveInput
- The current input to the MS.
public DriveStrengthCollection calculateBISDriveStrengths(DimensionValueCollection DriveInput)
If you are using the equation, the dimensions within the specified drive input MUST have IDs equal to the IDs of drives you want to use and those dimensions must contain a value with the ID: STIMULUS (of enumerated type RequiredEquationInputs located in the DriveEquation class).
If there are no drives that belong to the BIS, this method returns null.
DriveInput
- The current input to the MS.
public DriveStrengthCollection calculateBothDriveStrengths(DimensionValueCollection DriveInput)
If you are using the equation, the dimensions within the specified drive input MUST have IDs equal to the IDs of drives you want to use and those dimensions must contain a value with the ID: STIMULUS (of enumerated type RequiredEquationInputs located in the DriveEquation class).
DriveInput
- The current input to the MS.
public DriveStrengthCollection calculateNeitherDriveStrengths(DimensionValueCollection DriveInput)
If you are using the equation, the dimensions within the specified drive input MUST have IDs equal to the IDs of drives you want to use and those dimensions must contain a value with the ID: STIMULUS (of enumerated type RequiredEquationInputs located in the DriveEquation class).
If there are no drives that belong to neither behavioral system, this method returns null.
DriveInput
- The current input to the MS.
public DriveStrengthCollection calculateAllDriveStrengths(DimensionValueCollection DriveInput)
If you are using the equation, the dimensions within the specified drive input MUST have IDs equal to the IDs of drives you want to use and those dimensions must contain a value with the ID: STIMULUS (of enumerated type RequiredEquationInputs located in the DriveEquation class).
If there are no drives in the MS, this method returns null.
DriveInput
- The current input to the MS.
public int getNumDrives()
public Drive getDrive(java.lang.Object ID)
ID
- The ID of the drive to get.
public java.util.Collection<Drive> getAllDrives()
This method should NOT be used for obtaining drive strengths from the drives. If you wish to obtain the drive strengths, use one of the calculate methods.
If no drives exist in the MS, this method returns null.
public java.util.Collection<Drive> getBASDrives()
This method should NOT be used for obtaining drive strengths from the drives. If you wish to obtain the drive strengths, use one of the calculate methods.
If the BAS is not being used, this method returns null.
public java.util.Collection<Drive> getBISDrives()
This method should NOT be used for obtaining drive strengths from the drives. If you wish to obtain the drive strengths, use one of the calculate methods.
If the BIS is not being used, this method returns null.
public java.util.Collection<Drive> getBothDrives()
This method should NOT be used for obtaining drive strengths from the drives. If you wish to obtain the drive strengths, use one of the calculate methods.
If neither the BIS or BAS is being used, this method returns null. If only one of the systems is being used, this method will return just the items from that system.
public java.util.Collection<Drive> getNeitherDrives()
This method should NOT be used for obtaining drive strengths from the drives. If you wish to obtain the drive strengths, use one of the calculate methods.
If no drives have been specified as belonging to neither behavioral system, this method returns null.
public DriveStrength getDriveStrength(java.lang.Object ID)
ID
- The ID of the drive whose drive strength you wish to get.
public java.util.Collection<DriveStrength> getAllDriveStrengths()
This method should NOT be used for obtaining drive strengths from the drives. If you wish to obtain the drive strengths, use one of the calculate methods.
If no drives exist in the MS, this method returns null.
public java.util.Collection<DriveStrength> getBASDriveStrengths()
This method should NOT be used for obtaining drive strengths from the drives. If you wish to obtain the drive strengths, use one of the calculate methods.
If the BAS is not being used, this method returns null.
public java.util.Collection<DriveStrength> getBISDriveStrengths()
This method should NOT be used for obtaining drive strengths from the drives. If you wish to obtain the drive strengths, use one of the calculate methods.
If the BIS is not being used, this method returns null.
public java.util.Collection<DriveStrength> getBothDriveStrengths()
This method should NOT be used for obtaining drive strengths from the drives. If you wish to obtain the drive strengths, use one of the calculate methods.
If neither the BIS or BAS is being used, this method returns null. If only one of the systems is being used, this method will return just the items from that system.
public java.util.Collection<DriveStrength> getNeitherDriveStrengths()
This method should NOT be used for obtaining drive strengths from the drives. If you wish to obtain the drive strengths, use one of the calculate methods.
If no drives have been specified as belonging to the neither behavioral system, this method returns null.
public void addDriveToBAS(Drive drive) throws java.lang.IllegalArgumentException
drive
- The drive to add to the BAS
java.lang.IllegalArgumentException
- If the specified drive is already in the MS.public void addDrivesToBAS(java.util.Collection<Drive> drives)
drives
- The drives to add to the BAS.public void addDriveToBIS(Drive drive) throws java.lang.IllegalArgumentException
drive
- The drive to add to the BIS
java.lang.IllegalArgumentException
- If the specified drive is already in the MS.public void addDrivesToBIS(java.util.Collection<Drive> drives)
drives
- The drives to add to the BIS.public void addDriveToBothSystems(Drive drive) throws java.lang.IllegalArgumentException
drive
- The drive to add to the BIS and BAS.
java.lang.IllegalArgumentException
- If the specified drive is already in the MS.public void addDrivesToBothSystems(java.util.Collection<Drive> drives)
drives
- The drives to add to the BIS and BAS.public void addDriveToNeither(Drive drive) throws java.lang.IllegalArgumentException
drive
- The drive to add to the MS.
java.lang.IllegalArgumentException
- If the specified drive is already in the MS.public void addDrivesToNeither(java.util.Collection<Drive> drives)
drives
- The drives to add to the MS.public BehavioralApproachSystem getBAS()
This method should ONLY be used for initialization and reporting purposes.
public BehavioralInhibitionSystem getBIS()
This method should ONLY be used for initialization and reporting purposes.
public NeitherBehavioralSystem getNeitherSystem()
This method should ONLY be used for initialization and reporting purposes.
protected void attachSelfToAgent(CLARION Agent)
attachSelfToAgent
in class AbstractSubsystem
Agent
- The agent to wish this MS will be attached.protected void endEpisode()
endEpisode
in class AbstractSubsystem
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |