![]() |
Grail (C++)
1.4.0
A multi-platform, modular, universal engine for embedding advanced AI in games.
|
The roulette selector namespace - contains method responsible for selecting most suitable objects based on roulette. More...
Classes | |
| struct | RouletteOptions |
| RouletteSelectionOptions - Struct determining options for roulette selection. More... | |
Functions | |
| template<typename ContextType > | |
| void | GetBestOption (const std::vector< SelectionOption< ContextType >> &options, SelectionResult &result, RandomNumberGenerator &randomNumberGenerator, RouletteOptions rouletteOptions, std::function< bool(const std::size_t &)> validator) |
| GetBestOption - Selects most suitable option. Provides different context for each evaluated objects. More... | |
The roulette selector namespace - contains method responsible for selecting most suitable objects based on roulette.
| void grail::utility::roulette_selector::GetBestOption | ( | const std::vector< SelectionOption< ContextType >> & | options, |
| SelectionResult & | result, | ||
| RandomNumberGenerator & | randomNumberGenerator, | ||
| RouletteOptions | rouletteOptions, | ||
| std::function< bool(const std::size_t &)> | validator | ||
| ) |
GetBestOption - Selects most suitable option. Provides different context for each evaluated objects.
| options | - Contexts paired with evaluators |
| result | - Reference to the selection result object. |
| validator | - Function validating whether given object can be chosen |
| randomNumberGenerator | - Random number generator |
| rouletteOptions | - Options for roulette algorithm |
| ContextType | - Type of evaluated object. By default - ValueTuple(AIEntity, Blackboard). |