(C++)
1.0.0
A multi-platform, modular, universal engine for embedding advanced AI in games.
|
A reasoner which uses planners to find optimal sequences of behaviors based on goals. More...
#include <PlannerReasoner.hh>
Classes | |
struct | Config |
Public Member Functions | |
PlannerReasoner (MemoryPool &memory) | |
PlannerReasoner (MemoryPool &memory, std::shared_ptr< planning::GoalSelector > goalSelector, std::unique_ptr< planning::DomainTranslator > actionTranslator, const Config &config) | |
void | SelectBehavior (AIEntity &entity) override |
selectBehavior - Runs reasoner's selection algorithm and assigns chosen behavior to provided entity. More... | |
void | SetNewGoal (std::unique_ptr< planning::Goal > newGoal, AIEntity &entity) override |
void | SetupNewPlanner (std::unique_ptr< planning::DomainTranslator > domainTranslator, const Config &config) |
void | SetFallbackBehavior (std::unique_ptr< Behavior > behavior) |
Sets the behavior that should be performed during plan computation or if no valid plan is found. | |
const planning::Goal * | GetCurrentGoal () const override |
void | BindPlanningSucceededCallback (PlannerCallback callback) |
void | BindPartialPlanFoundCallback (PlannerCallback callback) |
void | BindPlanningFailedCallback (std::function< void(const planning::Goal &)> callback) |
void | BindPlanExecutedCallback (std::function< void()> callback) |
void | SetSnapshotProduction (bool shouldProduce) |
bool | IsComputing () const |
PlannerReasonerSnapshot | ProduceDebugSnapshot () |
std::unique_ptr< ISnapshotGenerator > | CreateSnapshotGenerator (std::size_t) override |
void | ClearCurrentDebugSnapshot () |
void | SetDebugSnapshotFirstIteration (std::size_t iterationNumber) |
void | SetDebugSnapshotLastIteration (std::size_t iterationNumber) |
std::size_t | GetDebugSnapshotFirstIteration () const |
std::size_t | GetDebugSnapshotLastIteration () const |
Public Member Functions inherited from grail::Reasoner | |
Reasoner (const Reasoner &)=default | |
Reasoner (Reasoner &&)=default | |
Reasoner & | operator= (const Reasoner &)=default |
Reasoner & | operator= (Reasoner &&)=default |
virtual std::unique_ptr< ISnapshotGenerator > | CreateSnapshotGenerator (size_t) |
A reasoner which uses planners to find optimal sequences of behaviors based on goals.
|
overridevirtual |
selectBehavior - Runs reasoner's selection algorithm and assigns chosen behavior to provided entity.
entity |
Implements grail::Reasoner.
void grail::PlannerReasoner::SetupNewPlanner | ( | std::unique_ptr< planning::DomainTranslator > | domainTranslator, |
const Config & | config | ||
) |
Resets the planner domain. based on data provided by the new domain translator . This method can be used if you want the agent to start planning an entirely different set of actions and disregard the previously defined domain.