Collapse All Expand All

C#

Clarion Library 6.1.1
AgentInitializer Class
Members Example See Also Send Feedback

[This is preliminary documentation and is subject to change.]

Contains static initializer methods that are used to initialize the internal components of an agent.

Namespace: Clarion
Assembly: ClarionLibrary (in ClarionLibrary.dll) Version: 6.1.1.0 (6.1.1.0)

# Syntax

C#
    public static class AgentInitializer

# Remarks

While the World singleton object contains the mechanisms for initializing the descriptive objects (i.e., the world objects) of a task environment, the agent initializer provides the mechanisms for initializing the functional objects (i.e., the agent's internals).

The agent initializer has static "Initialize..." methods that can be used to initialize any of the following internal objects for an agent:

- Drives
- Drive components
- Action rules
- Implicit decision networks
- Associative rules
- Associative memory networks
- Associative episodic memory networks
- Meta-cognitive modules
- Meta-cognitive action rules
- Meta-cognitive decision networks

Caution
ALL items initialized by this class MUST be committed to the agent (drive, or module) in which they were initialized! Failure to do so WILL result in an error!

Like the "New..." methods in the World class, the "Initialize..." methods use a factory design pattern for generating functional objects. In other words, a component, returned by an "Initialize..." method, will already exist within an agent when that method returns. This means that internal components are always agent-specific. It is impossible to initialize an internal component and then share that component between multiple agents. This requirement exists for two reasons:

1. Allowing agents to share internal components would be an implementation NIGHTMARE
2. Conceptually, it makes no sense. It would be like saying that two agents are joined together at the brain

Initializing agent internals using the agent initializer is done using component factories. In general, initializer methods are called using the following convention:

CopyC#

    [2] comp = AgentInitializer.Initialize[1]([3], [4], [5]);

where the "[#]" can be described as follows:

1. The "name" of the internal (e.g., Drive, ImplicitDecisionNetwork, MetaCognitiveModule, etc.) you wish to initialize
2. The type of component desired (e.g., FoodDrive, BPNetwork, GoalSelectionModule, etc.)
3. The target agent in whom the internal item is to be initialized
4. *The factory that is to be used for initializing the desired component
5. *(optional) Any parameters that may be needed in order to initialize the internal component using the factory

*To find-out the list of required and optional parameters, please consult the documentation of the factory for the functional object that is being generated

Note
Developers implementing their own custom internal items (e.g., custom components, drives, etc.) are advised to CLEARLY note in the documentation the exact parameters that are required in order

Copyright 2011. Nicholas Wilson

# Examples

CopyC#

    SimplifiedQBPNetwork net = AgentInitializer.InitializeImplicitDecisionNetwork(John, SimplifiedQBPNetwork.Factory);

    IRLRule rule = AgentInitializer.InitializeActionRule(John, IRLRule.Factory, SomeAction, IRL_SupportCalculator);

    GoalSelectionModule gsm = AgentInitializer.InitializeMetaCognitiveModule(John, GoalSelectionModule.Factory);

    FoodDrive foodDrive = AgentInitializer.InitializeDrive(John, FoodDrive.Factory, .5);

# Inheritance Hierarchy

System..::..Object
Clarion..::..AgentInitializer

# See Also

AgentInitializer Members
Clarion Namespace