Grail (C++)  1.4.0
A multi-platform, modular, universal engine for embedding advanced AI in games.
grail::utility::SelectionResult Struct Reference

The SelectionResult struct - Structure containing results of operations done by Selector. More...

#include <SelectionResult.hh>

Collaboration diagram for grail::utility::SelectionResult:

Public Member Functions

 SelectionResult (bool isDebugging=false)
 SelectionResult - Constructor. More...
 
data::UtilityEvaluatorSnapshotFetchNextEvaluatorSnapshot (const std::string &evaluatedObjectName, const std::string &evaluatedObjectMetadata, int rank)
 FetchNextEvaluatorSnapshot - If debugging mode was enabled in constructor, creates an empty snapshot for the provided evaluated object and attaches it to internal snapshot tree. More...
 
bool IsValid () const
 IsValid - Checks whether Selector already finished it's calculations and encountered no errors. More...
 

Public Attributes

std::unique_ptr< data::UtilityReasonerSnapshotsnapshot {nullptr}
 snapshot - If debugging mode was enabled in constructor, contains debug snapshot of whole UtilityReasoner on which selection was executed.
 
std::size_t optionIndex = std::numeric_limits<std::size_t>::max()
 optionIndex - Index of option selected by Selector.
 

Detailed Description

The SelectionResult struct - Structure containing results of operations done by Selector.

Constructor & Destructor Documentation

◆ SelectionResult()

grail::utility::SelectionResult::SelectionResult ( bool  isDebugging = false)
inline

SelectionResult - Constructor.

Parameters
isDebugging- Flag enabling this structure to gather debug snapshots.

Member Function Documentation

◆ FetchNextEvaluatorSnapshot()

data::UtilityEvaluatorSnapshot* grail::utility::SelectionResult::FetchNextEvaluatorSnapshot ( const std::string &  evaluatedObjectName,
const std::string &  evaluatedObjectMetadata,
int  rank 
)
inline

FetchNextEvaluatorSnapshot - If debugging mode was enabled in constructor, creates an empty snapshot for the provided evaluated object and attaches it to internal snapshot tree.

Parameters
evaluatedObjectName- Name of object which will be evaluated.
rank- Measure of importance of evaluated object.
Returns
Newly created empty snapshot.

◆ IsValid()

bool grail::utility::SelectionResult::IsValid ( ) const
inline

IsValid - Checks whether Selector already finished it's calculations and encountered no errors.

Returns
True if valid, false otherwise.

The documentation for this struct was generated from the following file: