(C++)
1.0.0
A multi-platform, modular, universal engine for embedding advanced AI in games.
|
#include <DomainTranslator.hh>
Public Member Functions | |
DomainTranslator (MemoryPool &memory, bool isDomainReusable=true) | |
DomainTranslator (const DomainTranslator &)=default | |
DomainTranslator (DomainTranslator &&)=default | |
DomainTranslator & | operator= (const DomainTranslator &)=default |
DomainTranslator & | operator= (DomainTranslator &&)=default |
WorldState | GetWorldState (AIEntity &entity, const class Goal &goal) |
const ObjectIndexBinding & | GetObjectIndexBinding () const |
virtual Plan | TranslatePlan (const AIEntity &entity, const Planner::AbstractPlan &plan, const Goal &goal) const =0 |
Protected Member Functions | |
virtual std::vector< IPlannerObject * > | GeneratePlannerObjects (AIEntity &entity, const Goal &goal)=0 |
virtual std::vector< WorldObjectType > | CreateObjectTypes (const AIEntity &entity, const Goal &goal)=0 |
virtual void | AddActionTemplates (const AIEntity &entity, const std::shared_ptr< Domain > &domain, const Goal &goal)=0 |
virtual void | SetWorldStateParameters (const AIEntity &entity, WorldState &state, const Goal &goal) const |
Protected Attributes | |
MemoryPool & | memory |
ObjectIndexBinding | binding {} |
An abstract class to implement translating from in-game world state to plan-space world state and from abstract plan to behavior sequence.
grail::planning::DomainTranslator::DomainTranslator | ( | MemoryPool & | memory, |
bool | isDomainReusable = true |
||
) |
Constructs a DomainTranslator using the specified MemoryPool.
isDomainReusable | - if set to true, the planner will assume that the planning domain remains constant, meaning that addActionTemplates and createObjectTypes will be invoked only once on DomainTranslator construction |
|
protectedpure virtual |
Inside this method, action templates for all possible actions should be added to the Domain. Use Domain::addActionTemplate
|
protectedpure virtual |
|
protectedpure virtual |
This method should return a vector of IPlannerObject instances that correspond to in-game objects. An ObjectIndexBinding instance will be created from the returned objects.
const ObjectIndexBinding & grail::planning::DomainTranslator::GetObjectIndexBinding | ( | ) | const |
|
protectedvirtual |
Inside this method, initial abstract WorldState parameters should be set. Use state.setParameter
|
pure virtual |