Grail (C#)  1.3.0
A multi-platform, modular, universal engine for embedding advanced AI in games.
Grail.Utility.SelectionResult Struct Reference

Structure containing results of operations done by Selector. More...

Collaboration diagram for Grail.Utility.SelectionResult:

Public Member Functions

 SelectionResult (bool isDebugging=false)
 Constructor. More...
 
UtilityEvaluatorSnapshot FetchNextEvaluatorSnapshot (string evaluatedObjectName, string metadata, int rank)
 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 ()
 Checks whether Selector already finished it's calculations and encountered no errors. More...
 

Public Attributes

readonly UtilityReasonerSnapshot snapshot
 If debugging mode was enabled in constructor, contains debug snapshot of whole UtilityReasoner on which selection was executed. More...
 
int optionIndex
 Index of option selected by Selector. More...
 

Detailed Description

Structure containing results of operations done by Selector.

Constructor & Destructor Documentation

◆ SelectionResult()

Grail.Utility.SelectionResult.SelectionResult ( bool  isDebugging = false)
inline

Constructor.

Parameters
isDebuggingFlag enabling this structure to gather debug snapshots.

Member Function Documentation

◆ FetchNextEvaluatorSnapshot()

UtilityEvaluatorSnapshot Grail.Utility.SelectionResult.FetchNextEvaluatorSnapshot ( string  evaluatedObjectName,
string  metadata,
int  rank 
)
inline

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

Parameters
evaluatedObjectNameName of object which will be evaluated.
metadataCustom description of evaluated object provided by the developer.
rankMeasure of importance of evaluated object.
Returns
Newly created empty snapshot.

◆ IsValid()

bool Grail.Utility.SelectionResult.IsValid ( )
inline

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

Returns
True if valid, false otherwise.

Member Data Documentation

◆ optionIndex

int Grail.Utility.SelectionResult.optionIndex

Index of option selected by Selector.

◆ snapshot

readonly UtilityReasonerSnapshot Grail.Utility.SelectionResult.snapshot

If debugging mode was enabled in constructor, contains debug snapshot of whole UtilityReasoner on which selection was executed.


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