Grail (C#)
1.4.0
A multi-platform, modular, universal engine for embedding advanced AI in games.
|
Classes | |
class | BaseEvoParam |
A class that represents a parameter that is modifiable (optimizable) by evolutionary algorithms. Unless your parameter is only a positional index (represented by an integer from 0 to max), use a specialized version EvoParam<Type>. These parameters form an encoding and are stored as member Fields or Properties in an Individual and set as optimizable using Individual.SetMemberParameterOptimizable. Typically, the Individual.SetMemberParameterOptimizable function should be called in the constructor of an Individual-derived class. More... | |
class | Crossover |
The Crossover object that encapsulates the crossover operation and its configuration in the evolutionary algorithm. More... | |
class | EAOptimizer |
A class that serves as the main interface for evolutionary algorithms in Grail. More... | |
class | EvoParam |
A specialization of BaseEvoParam to hold a value of specific type. Use a generic version if the inner type of the parameter is not just an integer position from [0,n]. More... | |
class | FitnessRepository |
This class provides a functionality of assigning fitness values as averages from the previous evaluations. It can be used to minimize the effects of variance when fitness calculation is non-deterministic. Use AddSampleWithFitnessUpdate(Individual) method to store the current fitness and update it based on past evaluations. More... | |
interface | IFitnessProvider |
Contains one property Fitness. This interface can be used for evolutionary algorithms and/or for RouletteSampler<T>. More... | |
class | Individual |
Represents an individual for evolutionary algorithms (EA). It stores the encoding consisting of optimizable parameters (represented by BaseEvoParam and specialized EvoParam<Type>). The members (fields or properties) should be registered for optimization using SetMemberParameterOptimizable methods in your implementation of the constructor. In the optimization process, the EA will require assigning the fitness evaluation to the individual. Calculate it in your game environment based on the current values of Individual's parameters. More... | |
class | Mutation |
The Mutation object that encapsulates the mutation operation and its configuration in evolutionary algorithm. More... | |
class | RouletteSampler |
Provides a functionality of a fitness proportional roulette sampling of any objects that implement the IFitnessProvider interface. Because the implementation is optimized for usage in EA, the sampled elements are removed unless the method ends with 'WithReturn'. More... | |
class | Selection |
The Selection class encapsulates the selection operation, i.e., how individuals are selected from the current population to the next generation, in the evolutionary algorithm. See EAOptimizer. More... | |
Enumerations | |
enum | CrossoverSelectionType { CrossoverSelectionType.RANDOM, CrossoverSelectionType.ROULETTE, CrossoverSelectionType.TOP, CrossoverSelectionType.PSEUDO_ROULETTE, CrossoverSelectionType.CONSECUTIVE_PAIRS } |
Predefined ways in which individuals are selected from the population for crossover. Please refer to enum values for details about each of them. More... | |
enum | ElitismType { ElitismType.NONE, ElitismType.FITNESS_RANKING, ElitismType.ROULETTE } |
Different types of handling elitism within evolutionary algorithm. More... | |
enum | MutationSelectionType { MutationSelectionType.ITERATE_AND_TEST_P, MutationSelectionType.SELECT_P_OF_N } |
Predefined ways in which individuals are selected from the population for mutation. Please refer to enum values for details about each of them. More... | |
|
strong |
Predefined ways in which individuals are selected from the population for crossover. Please refer to enum values for details about each of them.
Enumerator | |
---|---|
RANDOM | Each individual that undergoes crossover is selected using a uniform random distribution. |
ROULETTE | Individuals that will be recombined together are selected using weighted random distribution proportional to their fitness values. |
TOP | Only the top individuals as ranked by fitness are selected for crossover - without any randomization. |
PSEUDO_ROULETTE | A certain amount of individuals determined by Crossover.PseudoRouletteRandomPortion is chosen as in RANDOM, whereas the rest as in ROULETTE. |
CONSECUTIVE_PAIRS | In this method, an i-th individual will be recombined with the (i+1)-th individual according to the current ordering of the population. The ordering is arbitrary, not performed by fitness. |
|
strong |
Different types of handling elitism within evolutionary algorithm.
|
strong |
Predefined ways in which individuals are selected from the population for mutation. Please refer to enum values for details about each of them.