Grail (C#)  1.4.0
A multi-platform, modular, universal engine for embedding advanced AI in games.
Grail.Planners.Domain Struct Reference

This class represents a complete planning domain.
It includes all the defined types of world objects and templates of actions. More...

Public Member Functions

 Domain (List< WorldObjectType > types)
 Constructs a new Domain instance. More...
 
ActionTemplate AddActionTemplate (string actionName, List< string > parameterNames)
 Creates a new ActionTemplate and adds it to this planning domain. More...
 
WorldObject CreateObjectOfType (string typeName)
 Creates a new WorldObject of the type identified by the typeName parameter. More...
 
readonly int GetTypeIndex (string typeName)
 Gets the type index (ID) for the given typeName . More...
 

Public Attributes

List< string > objectTypes
 
List< WorldObjectTypetypes
 
Dictionary< string, int > typeMap
 
List< ActionTemplateactionTemplates
 

Detailed Description

This class represents a complete planning domain.
It includes all the defined types of world objects and templates of actions.

Constructor & Destructor Documentation

◆ Domain()

Grail.Planners.Domain.Domain ( List< WorldObjectType types)
inline

Constructs a new Domain instance.

Parameters
typesThe vector of all possible world object types
Exceptions
Exception

Member Function Documentation

◆ AddActionTemplate()

ActionTemplate Grail.Planners.Domain.AddActionTemplate ( string  actionName,
List< string >  parameterNames 
)
inline

Creates a new ActionTemplate and adds it to this planning domain.

Parameters
actionNameThe name of the ActionTemplate to create.
parameterNamesNames of the action's parameters (argument) types
Returns
The created ActionTemplate object.

◆ CreateObjectOfType()

WorldObject Grail.Planners.Domain.CreateObjectOfType ( string  typeName)
inline

Creates a new WorldObject of the type identified by the typeName parameter.

◆ GetTypeIndex()

readonly int Grail.Planners.Domain.GetTypeIndex ( string  typeName)
inline

Gets the type index (ID) for the given typeName .

Returns
The generated type index.

The documentation for this struct was generated from the following file: