![]() |
Grail (C#)
1.3.0
A multi-platform, modular, universal engine for embedding advanced AI in games.
|
Public Member Functions | |
| abstract void | Evaluate (List< EvoScript > onceEvaluatedList, List< EvoScript > neverEvaluatedList) |
| This function's responsibility is to evaluate EvoScripts and assign the value to them using the [.Fitness] getter. If your method of evaluation is deterministic and absolute (i.e. fitness only depends on the EvoScript object itself) then you might ignore the . If your method is non-deterministic or relative (e.g., tournament-based) to the whole population, then you might evaluate again within the scope of the current population. More... | |
Protected Member Functions | |
| virtual void | TwoPlayerTournamentSelection (List< EvoScript > bots, int trialCount, float maxScoreInTrial, Func< EvoScript, EvoScript, float > compareTwoFunction, Random random) |
| A helper method that will: for each bot in test it against randomly chosen another bots and call the compareTwoFunction to score the bot. This function will assign Fitness to each bot based on the average score obtained in the process. More... | |
The Arena class is an interface for the evaluator of the quality of players represented by EvoScripts. It is used either stand-alone or in the in the evaluation phase of Evolutionary Algorithm optimization
|
pure virtual |
This function's responsibility is to evaluate EvoScripts and assign the value to them using the [.Fitness] getter. If your method of evaluation is deterministic and absolute (i.e. fitness only depends on the EvoScript object itself) then you might ignore the . If your method is non-deterministic or relative (e.g., tournament-based) to the whole population, then you might evaluate again within the scope of the current population.
|
inlineprotectedvirtual |
A helper method that will: for each bot in test it against randomly chosen another bots and call the compareTwoFunction to score the bot. This function will assign Fitness to each bot based on the average score obtained in the process.
| bots | The population of bots to be tested. |
| trialCount | The number of times, each bot is tested against some subset of population. |
| maxScoreInTrial | The maximum score that a bot can get in a single test. |
| compareTwoFunction | The function that tests a pair of bots and returns score from the first one's perspective. |
| random | Random numbers generator. |