Grail (C++)
1.4.0
A multi-platform, modular, universal engine for embedding advanced AI in games.
|
#include <Domain.hh>
Public Member Functions | |
Domain (const std::vector< WorldObjectType > &types) | |
Domain (const Domain &other)=delete | |
Domain (Domain &&other)=delete | |
Domain & | operator= (Domain &&other)=delete |
Domain & | operator= (const Domain &)=delete |
void | AddActionTemplate (const std::string &name, const std::vector< std::string > ¶mNames, 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< WorldObjectType > | types {} |
std::map< std::string, unsigned int > | typemap {} |
std::vector< ActionTemplate > | actionTemplates {} |
This class represents a complete planning domain. It includes all the defined types of world objects and templates of actions.
grail::planner::Domain::Domain | ( | const std::vector< WorldObjectType > & | types | ) |
Constructor
types | - the vector of all possible world object types |
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.
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 |
unsigned int grail::planner::Domain::GetTypeIndex | ( | const std::string & | typeName | ) | const |