(C++)
1.1.0
A multi-platform, modular, universal engine for embedding advanced AI in games.
|
The UtilitySelector namespace - contains methods responsible for selecting most suitable objects based on calculated scores. More...
Functions | |
template<typename ContextType > | |
void | SelectMaxUtility (const std::vector< Option< ContextType >> &options, SelectionResult &result, std::function< bool(const std::size_t &)> validator) |
template<typename ContextType > | |
void | GetBestOption (SelectionMethod selectionMethod, const std::vector< Option< ContextType >> &options, SelectionResult &result, std::function< bool(const std::size_t &)> validator=[](const std::size_t &) -> bool { return true;}) |
GetBestOption - Selects most suitable option. Provides different context for each evaluated objects. More... | |
The UtilitySelector namespace - contains methods responsible for selecting most suitable objects based on calculated scores.
void grail::utility::selector::GetBestOption | ( | SelectionMethod | selectionMethod, |
const std::vector< Option< ContextType >> & | options, | ||
SelectionResult & | result, | ||
std::function< bool(const std::size_t &)> | validator = [](const std::size_t&) -> bool { return true; } |
||
) |
GetBestOption - Selects most suitable option. Provides different context for each evaluated objects.
selectionMethod | - MAX or ROULETTE (ROULETTE not yet implemented) |
options | - Contexts paired with evaluators |
result | - Reference to the selection result object. |
validator | - Function validating whether given object can be chosen |
ContextType | - Type of evaluated object. By default - ValueTuple(AIEntity, Blackboard). |