Grail (C++)  1.4.0
A multi-platform, modular, universal engine for embedding advanced AI in games.
grail::planner::Domain Struct Reference

#include <Domain.hh>

Public Member Functions

 Domain (const std::vector< WorldObjectType > &types)
 
 Domain (const Domain &other)=delete
 
 Domain (Domain &&other)=delete
 
Domainoperator= (Domain &&other)=delete
 
Domainoperator= (const Domain &)=delete
 
void AddActionTemplate (const std::string &name, const std::vector< std::string > &paramNames, PreconditionFunction preconditionFunction, EffectFunction effectFunction, CostFunction costFunction)
 
WorldObject CreateObjectOfType (const std::string &name) const
 Creates and object of a type identified by name parameter.
 
unsigned int GetTypeIndex (const std::string &typeName) const
 

Public Attributes

std::vector< std::string > objectTypes {}
 
std::vector< WorldObjectTypetypes {}
 
std::map< std::string, unsigned int > typemap {}
 
std::vector< 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::planner::Domain::Domain ( const std::vector< WorldObjectType > &  types)

Constructor

Parameters
types- the vector of all possible world object types

Member Function Documentation

◆ AddActionTemplate()

void grail::planner::Domain::AddActionTemplate ( const std::string &  name,
const std::vector< std::string > &  paramNames,
PreconditionFunction  preconditionFunction,
EffectFunction  effectFunction,
CostFunction  costFunction 
)

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

Parameters
name- the name of the ActionTemplate to create.
paramNames- the names of action parameter (argument) types
preconditionFunction- preconditions for the action; see the PreconditionFunction specification
effectFunction- effects of the action; see the EffectFunction specification
costFunction- cost of the action; see the CostFunction specification

◆ GetTypeIndex()

unsigned int grail::planner::Domain::GetTypeIndex ( const std::string &  typeName) const
Returns
The generated type index for a given type name

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