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

A class representing an action that can be simulated by grail planner. More...

#include <ActionTemplate.hh>

Public Member Functions

 ActionTemplate (const std::string &name, const std::vector< unsigned int > &actionParameterTypes, PreconditionFunction preconditionFunction, EffectFunction effectFunction, CostFunction costFunction)
 
 ActionTemplate (ActionTemplate &&other)=default
 
int GetTypeId () const
 
const std::string & GetName () const
 
std::vector< class ActionGenerateActions (const class WorldState &worldState) const
 

Friends

class Action
 

Detailed Description

A class representing an action that can be simulated by grail planner.

Constructor & Destructor Documentation

◆ ActionTemplate()

grail::planner::ActionTemplate::ActionTemplate ( const std::string &  name,
const std::vector< unsigned int > &  actionParameterTypes,
PreconditionFunction  preconditionFunction,
EffectFunction  effectFunction,
CostFunction  costFunction 
)

Constructor

Parameters
name-
actionParameterTypes-
preconditionFunction- a boolean function accepting a vector of action arguments (WorldObjects) and the current WorldState reference
effectFunction- a function returning void and accepting a vector of action arguments (WorldObjects) and the current WorldState reference
costFunction- a function returing a number representing the action's cost, accepting a vector of action arguments (WorldObjects) and the current WorldState reference

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