(C++)  1.0.0
A multi-platform, modular, universal engine for embedding advanced AI in games.
grail::UtilityReasoner Class Reference
Inheritance diagram for grail::UtilityReasoner:
Collaboration diagram for grail::UtilityReasoner:

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
 
UtilityReasoneroperator= (const UtilityReasoner &other)=delete
 
UtilityReasoneroperator= (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< ISnapshotGeneratorCreateSnapshotGenerator (size_t) override
 
UtilityReasonerSnapshot GetUtilityReasonerSnapshot () const
 
void SetSnapshotProduction (bool value)
 
- Public Member Functions inherited from grail::Reasoner
 Reasoner (const Reasoner &)=default
 
 Reasoner (Reasoner &&)=default
 
Reasoneroperator= (const Reasoner &)=default
 
Reasoneroperator= (Reasoner &&)=default
 

Constructor & Destructor Documentation

◆ UtilityReasoner()

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.

Parameters
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)

Member Function Documentation

◆ SelectBehavior()

void grail::UtilityReasoner::SelectBehavior ( AIEntity entity)
overridevirtual

selectBehavior - Runs reasoner's selection algorithm and assigns chosen behavior to provided entity.

Parameters
entity

Implements grail::Reasoner.


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