Hide Comments
Hide Comments

Comments (0)

expandingProperties

 

Name

Description

public property

AvgFitness

Returns the average fitness level of the   Population.
 

public property

AvgWeightedFitness

Returns the average weighted fitness level of the   Population.
 

public property

CrossoverProbability

Controls the likelihood that crossover (also known as recombination) will occur when 2 parents are selected to create a new child. When crossover occurs, the 2 parents genes or DNA are combined to make the child. The crossover probability is checked for each new child (e.g., if there are 100 children created each generation, the CrossoverProbability will be tested 100 times).

The Operations property controls whether crossover occurs at all during evolution.

noteNote

If crossover does not occur, the child is a duplicate of the first parent (but may be mutated or inverted).

protected property

CumNormFitnesses

Contains the cumulative normalized fitnesses of the current generation (   Population)

public property

Diversity

Returns the genetic diversity of the current Population, which is the   AvgFitness /   MaxFitness. In other words, how different (based upon fitness) are the individuals in the population from each other? If the population is not diverse enough, it is hard to breed a solution as everyone is alike. The genetic component can use the Diversity with the   DiversityLimit to automatically abort evolution if the diversity indicates we are in an evolutionary dead-end.
 

public property

DiversityLimit

Specifies the minimum diversity the population must have in order to be considered viable. If the Diversity of the Population falls below this limit, the     Evolve method will abort evolution.

Note the     UseDiversityLimit property must be True to use the diversity limit.
 

public property

ElitistPct

Controls the percentage of "elite" parents used every generation for evolution. 0 means 0% of the population, 0.5 means 50% of the population, and 1 means 100% of the population. The ElitistPct property is used when the   SelectionMethod is smElitist.
 

public property

FitnessCutoff

Specifies the Fitness level desired for the evolutionary search. If the     FittestIndividual of the     Population has a fitness greater than or less than (depending on the     FitnessMethod) the fitness cutoff, the     Evolve method will abort evolution.

Note the     UseFitnessCutoff property must be True to use the fitness cutoff.
 
 

public property

FitnessMethod

Controls how the genetic component evolves: should it seek to maximize fitness or minimize fitness (or weighted fitness)

protected property

FitnessSum

Contains the sum of all fitness values for the entire population

public property

FittestIndividual

Returns the fittest individual in the Population. The individual is chosen based on the FitnessMethod and the Fitness evaluations of all the individuals in the population. The FittestIndividual is chosen every time the population is evolved.
 

This property is nil if the component is not     Initialized.

public property

Generation

Returns the current generation number of population. When the   Initialize method is called, the Generation is reset to 0. Every time the   Evolve method creates a new generation, this property is incremented.
 

public property

GenerationLimit

Specifies the maximum number of generations to breed before quitting
 
Note the   UseGenerationLimit property must be True to use the generation limit.
 

public property

Halt

Controls   Evolve method execution. Set Halt to true to stop evolution (useful for multi-threading)

public property

InitialDuplicatesRetries

Specifies the number of times to retry generating an individual on initialization if it is a duplicate

noteNote

The InitialDuplicatesRetries property works differently for genetic algorithms and genetic programming. In genetic algorithms, this property is the maximum number of times to retry generation before giving up for the entire initial population. For genetic programming, this property specifies how many times we attempt to create a unique individual per individual. If all of these retry attempts fail, the initialization depth is incremented to try and make a unique individual at the new depth.

alert_noteTip

With genetic algorithms, this property is not very important as generating unique individuals is easy and duplicates will not occur very often. However, for genetic programming, initialization duplicates will almost certainly occur. Having duplicate individuals in the initial population is a waste of processing power as it limits the pool of truly available individuals (though having duplicates in later generations is a feature not a bug as fitter individuals will tend to be selected and reproduces more as we evolve our solution). It is highly recommended to avoid duplicates in the initialization phase.

public property

Initialized

Returns true if the genetic component has been initialized (and initial population has been created and evaluated for fitness)

public property

InitialPopulation

Specifies the initial number of individuals to make in the   Population before attempting to solve your solution. Use this property to quickly and easily define the population size. The InitialPopulation property specifies the minimum initial population.

alert_noteTip

Your population size has a substantial bearing on whether the genetic component can find a solution, too small a population may be unable to evolve towards a solution, too large a population wastes processing power.

public property

InversionProbability

Controls the likelihood that inversion will occur in a child's DNA or chromosome, e.g., whether a portion of the child's chromosome will be flipped. The probability is between 0 (no chance) and 1 (always). When 2 parents reproduce and create a new child, their chromosomes are combined using Crossover and then the child's chromosome may be mutated and/or inverted. The InversionProbability is checked once per child.

The Operations property controls whether inversion occurs at all during evolution.
 

noteNote

In genetic programming, inversion is actually a point mutation (i.e., a node in an individual's GP tree may be flipped and become a different instruction of the same arity and type). You can either 0 out the probability here and handle it all in the mutation phase or leave it in.

public property

MaxFitness

Returns the highest fitness level of the   Population.
 
 

public property

MaxWeightedFitness

Returns the highest weighted fitness level of the   Population.
 

public property

MinFitness

Returns the lowest fitness level of the   Population.
 

public property

MinWeightedFitness

Returns the lowest weighted fitness level of the   Population.
 

public property

MutationProbability

Controls the likelihood that a child's chromosomes will be mutated.

For genetic algorithms, this is the likelihood that each bit of a child's chromosome will be mutated (flipped) between 0 (no chance) and 1 (always). When 2 parents reproduce and create a new child, their chromosomes are combined using Crossover and then the child's chromosome may be mutated. Because this probability is used for each bit of a child's chromosome, its value should be set very low (like 0.01). As a general rule, the probability that a chromosome will be flipped should be no more than 1 bit per individual. Any more bits flipping will keep the genetic algorithms from finding a solution.

For genetic programs, this is the likelihood that one mutation will occur in the genetic program tree, so its value should be higher than for genetic algorithms. Genetic programming has a whole suite of mutations (subtree, point, constant, etc) that can occur; which mutation occurs depends on their MutationWeights.
 
The     Operations property controls whether mutation occurs at all during evolution.
 
 

public property

OnEvolve

Occurs each time the   Evolve method is called. The OnEvolve event handler is called once at the end of the Evolve method. Use the OnEvolve event handler to take action when the Population evolves.

public property

Operations

Defines the set of genetic operations to perform at each evolutionary step. By default, the genetic component provides crossover, mutation, and inversion operations. You can also specify the chances of each operation occurring every generation using the     CrossoverProbability,     MutationProbability, and     InversionProbability properties.

In addition to the standard genetic operations provided by the TRSCustomGeneticComponent, you can perform your own by writing an     OnReproduction event handler.
 
 
 
 

public property

Population

Represents the entire population of candidate individuals (TRSIndividual) in the current   Generation, including the   FittestIndividual. The TRSCustomGeneticComponent seeks to solve your optimization or search problems by evolving a group or population of candidate individuals through successive generations, selecting fitter (or better) child individuals for each generation, until a solution is found. After every call to   Evolve, the Population property contains the next generation of individuals (the children), with the   PreviousGeneration property holding the previous generation (the parents, what was the Population before the Evolve call).

public property

PreviousGeneration

Contains the parents of the current generation, which is represented by the   Population property. After every call to   Evolve, the Population property contains the next generation of individuals (the children), with the PreviousGeneration property holding the previous generation (the parents, what was the Population before the Evolve call).
 

protected property

PriorityQueue

Returns the population sorted by fitness

protected property

RouletteIndex

Index of the individual next up in Elitist selection method or index of winner of roulette wheel selection method

public property

SelectionMethod

Specifies how the genetic component selects individuals from the current generation to be used as parents of the next generation. The genetic component provides some built-in methods and allows you to write your own by using the   OnSelection event.
 

public property

TournamentField

Specifies how many times the tournament must run for selecting a parent when     SelectionMethod is smTournament or smStochasticTournament. In other words, when selecting a parent, the genetic component runs a tournament, where the best or fittest individual is selected out of all the TournamentField number of contests.
 

alert_cautionWarning

Note that the TournamentField property can have a large impact on the processing time if the TournamentField property is high.

public property

UseDiversityLimit

Controls whether the genetic component attempts to abort evolution when the     Population's diversity falls below the     DiversityLimit. The DiversityLimit property aborts the evolutionary process when the diversity of the children falls below the DiversityLimit, e.g., all the children are too alike to go any further.

The Evolve method starts "breeding" the population towards your goal. The Evolve method may be called with the number of generations to execute. You can use the DiversityLimit, GenerationLimit and the FitnessCutoff as three properties to automatically abort evolution when they are exceeded. If the UseDiversityLimit is false, the     DiversityLimit will not abort evolution.
 
 

public property

UseFitnessCutoff

Controls whether the genetic component attempts to abort evolution when the     FitnessCutoff is exceeded. The FitnessCutoff property aborts the evolutionary process if the     FittestIndividual of the Population has a fitness greater than or less than (depending on the     FitnessMethod) the fitness cutoff, the     Evolve method will abort evolution.

The Evolve method starts "breeding" the population towards your goal. The Evolve method may be called with the number of generations to execute. You can use the DiversityLimit, GenerationLimit and the FitnessCutoff as three properties to automatically abort evolution when they are exceeded. If the     UseFitnessCutoff is false, the FitnessCutoff will not abort evolution.
 
 

public property

UseGenerationLimit

Controls whether the genetic component attempts to abort evolution when the maximum number of generations is exceeded. If     Generation exceeds     GenerationLimit, the     Evolve method will abort evolution.

The Evolve method starts "breeding" the population towards your goal. The Evolve method may be called with the number of generations to execute. You can use the DiversityLimit, GenerationLimit and the FitnessCutoff as three properties to automatically abort evolution when they are exceeded. If the     UseGenerationLimit is false, the GenerationLimit will not abort evolution.
 
 

protected property

WeightedFitnessSum

Contains the sum of all weighted fitness values for the entire population

Top

Comments (0)