#include <GLConstants.h>
Public Types | |
enum | TGeneBounds { BOUNDED_GENES = 0, UNBOUNDED_GENES = 1 } |
enum | TMemoryPolicy { DO_NOT_FREE = 0, FREE_ALL = 1, FREE_UNLOCKED = 2 } |
enum | TMutationPolicy { MUTATE_PARENTS = 0x01, MUTATE_CHILDREN = 0x02 } |
enum | TSizeLimits { FIXED = 0, NOT_FIXED = 1 } |
enum | TStorageFilling { REPLACE = 0, APPEND = 1 } |
enum | TTwinsFlags { TWINS_ALLOWED = 0, NO_TWINS = 1 } |
Static Public Member Functions | |
static string | toString (TGeneBounds bounds) |
static string | toString (TMemoryPolicy memory) |
static string | toString (TSizeLimits limits) |
static string | toStringBreeder (int breeder_type) |
static string | toStringCrossover (int crossover_type) |
static string | toStringGaState (int ga_state) |
static string | toStringInitialiser (int initialiser_type) |
static string | toStringMutator (int mutator_type) |
static string | toStringPopulation (int population_type) |
static string | toStringRanker (int ranker_type) |
static string | toStringSelectionist (int selectionist_type) |
static string | toStringVariator (int variator_type) |
Static Public Attributes | |
static const bool | CORPSES_KEEP = true |
static const bool | CORPSES_DISPOSE = false |
static const bool | AND_OPERATOR = true |
static const bool | OR_OPERATOR = false |
static const int | GA_STATE_INITIALISED = 101 |
static const int | GA_STATE_RUNNING = 105 |
GA is running. | |
static const int | GA_STATE_STOPPED_ERROR = 110 |
GA stopped with error. | |
static const int | GA_STATE_STOPPED_NORMALLY = 115 |
GA stopped normally. | |
static const int | MUTATOR_GENES_SWAPPING = 1001 |
Mutator which swaps 2 genes. | |
static const int | MUTATOR_GENES_SHUFFLING = 1002 |
Mutator which shuffles several (randomly chosen) genes. | |
static const int | MUTATOR_GENE_MOVING = 1003 |
Mutator which moves gene into new position. | |
static const int | MUTATOR_COMBINED = 1004 |
static const int | CROSSOVER_VECTOR_KEEP_MATCHING_INT = 2001 |
static const int | CROSSOVER_ONE_POINT = 2002 |
One point crossover which exchanges tails of 2 parents. | |
static const int | CROSSOVER_TWO_POINTS = 2003 |
static const int | RANKER_STANDARD_SO = 3001 |
Standard ranker for single objective GA. | |
static const int | VARIATOR_STANDARD = 4001 |
static const int | BREEDER_STANDARD = 5001 |
static const int | SELECTIONIST_ELITIST = 6001 |
static const int | SELECTIONIST_MIXER = 6002 |
static const int | POPULATION_STANDARD = 7001 |
standard population. | |
static const int | INITIALISER_SHUFFLE_INT_VECTOR = 8001 |
Generates vectors of randomly shuffled integers. |
Definition at line 9 of file GLConstants.h.
Constants for limits on genes (elements of the organism)
Definition at line 13 of file GLConstants.h.
Constants for policy of freeing the memory allocated to the organisms within some storage.
Definition at line 23 of file GLConstants.h.
Constants on policy to which organism mutation should be applied.
Definition at line 33 of file GLConstants.h.
Constants for the size property.
Definition at line 40 of file GLConstants.h.
Constants to indicate whether storage should be cleaned and filled with the new data or new data should be added to storage.
Definition at line 51 of file GLConstants.h.
Constants to be used with organism's tags Constants for specifying if twins (duplicated organisms) are allowed or not.
Definition at line 70 of file GLConstants.h.
string GLConstants::toString | ( | TSizeLimits | limits | ) | [static] |
Returns string representing the value of limits constant. Useful for debug.
limits | constant representing limits type of the object. |
Definition at line 29 of file GLConstants.cpp.
string GLConstants::toString | ( | TMemoryPolicy | memory | ) | [static] |
Return string representing the memory policy. Using for debug output.
memory | constant for memory policy. |
Definition at line 48 of file GLConstants.cpp.
string GLConstants::toString | ( | TGeneBounds | bounds | ) | [static] |
Returns string representing the value of bounds. Useful for debug.
bounds | constant representing bounds of the gene. |
Definition at line 9 of file GLConstants.cpp.
string GLConstants::toStringBreeder | ( | int | breeder_type | ) | [static] |
Returns string representing the value of the tag constant. Useful for debug.
tag | constant representing tag. |
breeder_type | constant for breeder type. |
breeder_type | constant for breeder type. |
Definition at line 70 of file GLConstants.cpp.
string GLConstants::toStringCrossover | ( | int | crossover_type | ) | [static] |
Returns string representing the value of the crossover type constant. Useful for debug.
crossover_type | constant for crossover type. |
Definition at line 87 of file GLConstants.cpp.
string GLConstants::toStringGaState | ( | int | ga_state | ) | [static] |
Returns string representing the value of the current GA state. Useful for debug.
ga_state | constant for GA state type. |
Definition at line 104 of file GLConstants.cpp.
string GLConstants::toStringInitialiser | ( | int | initialiser_type | ) | [static] |
Returns string representing the value of the organism initialiser type constant. Useful for debug.
initialiser_type | constant for organism initialiser type. |
Definition at line 128 of file GLConstants.cpp.
string GLConstants::toStringMutator | ( | int | mutator_type | ) | [static] |
Returns string representing the value of the mutator type constant. Useful for debug.
mutator_type | constant for mutator type. |
Definition at line 146 of file GLConstants.cpp.
string GLConstants::toStringPopulation | ( | int | population_type | ) | [static] |
Returns string representing the value of the population type constant. Useful for debug.
population_type | constant for population type. |
Definition at line 169 of file GLConstants.cpp.
string GLConstants::toStringRanker | ( | int | ranker_type | ) | [static] |
Returns string representing the value of the ranker type constant. Useful for debug.
ranker_type | constant for ranker type. |
Definition at line 186 of file GLConstants.cpp.
string GLConstants::toStringSelectionist | ( | int | selectionist_type | ) | [static] |
Returns string representing the value of the selectionist type constant. Useful for debug.
selectionist_type | constant for selectionist type. |
Definition at line 203 of file GLConstants.cpp.
string GLConstants::toStringVariator | ( | int | variator_type | ) | [static] |
Returns string representing the value of the variator type constant. Useful for debug.
variator_type | constant for variator type. |
Definition at line 222 of file GLConstants.cpp.
const bool GLConstants::AND_OPERATOR = true [static] |
flag to indicate that 'AND' condition to be used for list of boolean operations.
Definition at line 87 of file GLConstants.h.
const int GLConstants::BREEDER_STANDARD = 5001 [static] |
Constants for breeder type.Standard breeder which applies crossover to all organisms in storage with better organisms having more chances to breed.
Definition at line 152 of file GLConstants.h.
const bool GLConstants::CORPSES_DISPOSE = false [static] |
Flag to indicate, that corpses are to be disposed of.
Definition at line 83 of file GLConstants.h.
const bool GLConstants::CORPSES_KEEP = true [static] |
Flag to indicate that corpses are to be stored.
Definition at line 79 of file GLConstants.h.
const int GLConstants::CROSSOVER_TWO_POINTS = 2003 [static] |
Two points crossover which exchanges section of 2 parents between two points.
Definition at line 132 of file GLConstants.h.
const int GLConstants::CROSSOVER_VECTOR_KEEP_MATCHING_INT = 2001 [static] |
Constants for indicating the crossover types.Crossover which takes 2 vector-based organisms keeps coinciding genes in place and randomly shuffles the others.
Definition at line 127 of file GLConstants.h.
const int GLConstants::GA_STATE_INITIALISED = 101 [static] |
Possible states for the genetic algorithm GA is initialised and idle
Definition at line 98 of file GLConstants.h.
const int GLConstants::INITIALISER_SHUFFLE_INT_VECTOR = 8001 [static] |
Generates vectors of randomly shuffled integers.
Constants for organism initialisers.
Definition at line 174 of file GLConstants.h.
const int GLConstants::MUTATOR_COMBINED = 1004 [static] |
Mutator which applies several mutators simultaniously to an organism or chooses randromly one from the set.
Definition at line 120 of file GLConstants.h.
const int GLConstants::MUTATOR_GENES_SWAPPING = 1001 [static] |
Mutator which swaps 2 genes.
Constants for indicating the mutator types.
Definition at line 113 of file GLConstants.h.
const bool GLConstants::OR_OPERATOR = false [static] |
flag to indicate that 'OR' condition to be used for list of boolean operations.
Definition at line 91 of file GLConstants.h.
const int GLConstants::POPULATION_STANDARD = 7001 [static] |
const int GLConstants::RANKER_STANDARD_SO = 3001 [static] |
Standard ranker for single objective GA.
Constants for indicating the ranker type.
Definition at line 138 of file GLConstants.h.
const int GLConstants::SELECTIONIST_ELITIST = 6001 [static] |
Constants for selectionist type.Elitist selectionist which mixes old and new generations and keeps the most fit organisms only.
Definition at line 159 of file GLConstants.h.
const int GLConstants::SELECTIONIST_MIXER = 6002 [static] |
Selectionist which maintains variety by keeping only best elements of the old population and always adding elements from the new one.
Definition at line 162 of file GLConstants.h.
const int GLConstants::VARIATOR_STANDARD = 4001 [static] |
Constantns for variator type.Standard variator which uniformly applies mutator to all organisms in storage.
Definition at line 145 of file GLConstants.h.