(C++)
1.0.0
A multi-platform, modular, universal engine for embedding advanced AI in games.
|
Public Member Functions | |
UtilityReasoner (std::map< std::shared_ptr< utility::IEvaluator< EntityBlackboardPair >>, Prefab< Behavior > > &&prefabOptions, SelectionMethod selectionMethod=SelectionMethod::MAX, float persistence=0.1f) | |
UtilityReasoner - selects behaviors based on their scores calculated by utility system. More... | |
UtilityReasoner (const UtilityReasoner &other)=delete | |
UtilityReasoner (UtilityReasoner &&other)=default | |
UtilityReasoner & | operator= (const UtilityReasoner &other)=delete |
UtilityReasoner & | operator= (UtilityReasoner &&other)=default |
void | SelectBehavior (AIEntity &entity) override |
selectBehavior - Runs reasoner's selection algorithm and assigns chosen behavior to provided entity. More... | |
std::unique_ptr< ISnapshotGenerator > | CreateSnapshotGenerator (size_t) override |
UtilityReasonerSnapshot | GetUtilityReasonerSnapshot () const |
void | SetSnapshotProduction (bool value) |
Public Member Functions inherited from grail::Reasoner | |
Reasoner (const Reasoner &)=default | |
Reasoner (Reasoner &&)=default | |
Reasoner & | operator= (const Reasoner &)=default |
Reasoner & | operator= (Reasoner &&)=default |
grail::UtilityReasoner::UtilityReasoner | ( | std::map< std::shared_ptr< utility::IEvaluator< EntityBlackboardPair >>, Prefab< Behavior > > && | prefabOptions, |
SelectionMethod | selectionMethod = SelectionMethod::MAX , |
||
float | persistence = 0.1f |
||
) |
UtilityReasoner - selects behaviors based on their scores calculated by utility system.
prefabOptions | - prefabs mapped with evaluators |
selectionMethod | - utility selection method (MAX or ROULETTE) - ROULLETTE unavailable for now |
persistence | - bonus score that currently executed behavior(or behavior from the top of the stack) gains (persistence of 0 give no bonus at all) |
|
overridevirtual |
selectBehavior - Runs reasoner's selection algorithm and assigns chosen behavior to provided entity.
entity |
Implements grail::Reasoner.