[This is preliminary documentation and is subject to change.]
Assembly: CLARIONLibrary (in CLARIONLibrary.dll) Version: 6.1.0.7 (6.1.0.7)
Syntax
C# |
---|
public sealed class World |
Remarks
- The features of all sensory information in the world (in the form of dimension-value pairs)
- The declarative chunks that semantically define objects in the world
- The actions that an agent can perform within the world (in the form of action chunks)
- An agent's goals (in the form of goal chunks), which describe an agent's purpose in the world
- The time
- The agents themselves
The World class is a singleton containing a single instance (see Instance) of the World class and several static methods for generating and retrieving (etc.) World objects.
Think of the World singleton object as you would the real world. That is, the world is made up of a lot of little environments, each with it's own unique objects and features. At any given time, a person (or agent) within the world is only experiencing a small piece of the whole world. The piece of the world that is experienced gets determined by those objects or features that are "activated" in sensory information (i.e., what is perceived by the agent).
![]() |
---|
World objects are represented differently within the system internals. That is, for all world objects, the World singleton generates a unique GUID (referred to as a World ID). The World ID is accessed (through the static methods of the World class) by the core components of the CLARION Library. Because this internal representation is vitally important to the proper performance of the system, the generation of ALL world objects is performed using the various static "New..." methods in the World class (see examples below). World objects generated using the "New" methods are added to the World singleton (and therefore "exist" within the world) before they are returned. |
Copyright 2011. Nicholas Wilson
Examples
![]() |
---|
The following code samples do not necessarily do anything particularly interesting or useful on their own. These snippets are simply intended as examples of how the World class can be used. |

DimensionValuePair dv = World.DimensionValuePair("Dim1", "Val1"); DeclarativeChunk dc = World.NewDeclarativeChunk("Example Chunk"); ExternalActionChunk a = World.NewExternalActionChunk(); a += World.NewDimensionValuePair ("Dim2","Val1"); GoalChunk g = World.NewGoalChunk (); g += World.NewDimensionValuePair("Dim3","Val2"); Agent john = World.NewAgent("John Doe"); Console.WriteLine(World.Instance); if(World.GetDimensionValuePair("Dim1","Val1") == dv) Console.WriteLine(World.GetAgent("John Doe"));