|
AvgProgramDepth
|
Returns the average program depth of the current Population
|
|
AvgProgramSize
|
Returns the average program size of the current Population
|
|
BloatLimit
|
Specifies the bloat limit. The meaning of this property depends on the BloatStrategy. When the bloat strategy specifies limiting the depth, the BloatLimit specifies the maximum depth. Similarly, when the bloat strategy specifies limiting the tree size, the BloatLimit specifies the maximum size.
|
|
BloatStrategy
|
Specifies the strategy to deal with bloat in the genetic program trees.
Bloat, or uncontrolled growth of genetic programs, is a common problem in genetic programming. After a certain number of generations, genetic program trees tend to start gaining in size and depth rapidly, slowing execution and often leading to no convergence on a solution.
The BloatStrategy property specifies the anti-bloating strategy to attempt to control excessive tree growth. Unfortunately, the bloat strategies are often problem dependent so you may have to tinker with bloat strategies to see which works for your problem.
The BloatLimit property is used with the BloatStrategy to specify when limits are exceeded. The ParsimonyCoefficient property is used with parsimony-type anti-bloat strategies. The TarpeianProbability property is used with the Tarpeian anti-bloat strategies.
Tip
|
You can implement your own anti-bloat strategy by hooking into the OnReproduction event
|
|
|
CrossoverMethod
|
Specifies the crossover method to use. Currently, there is only one choice. cmSubtree, which specifies that crossover involves grafting a subtree from one parent into a subtree of another parent to create the new child's DNA.
The chance of crossover occurring depends on the CrossoverProbability 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.
|
|
FunctionsCount
|
Returns the number of Instructions that are not terminals (i.e., functions of arity > 0)
|
|
Functions[Integer]
|
Returns a non-terminal function (Instructions that are functions of arity > 0) in the list of functions
|
|
InitializationDepth
|
Specifies the initial maximum depth that an individual's genetic program tree. The initial maximum depth is a minimum of 2. However, if InitializationDepth is set to 0, then the genetic component will choose an initial depth based on number of operations.
The actual depth could be less if using a ramped or grow RSGenerics.GeneticProgramming.TRSCustomGeneticProgramming<T>.InitializationMethod . Conversely, the actual depth could also be more than the maximum if the InitialDuplicatesRetries requires expanding the depth to avoid duplicates.
|
|
InitializationMethod
|
Defines the initialization method to use for initializing an individuals genetic program tree, i.e., how are the initial GP trees formed.
The Full method creates trees that all equal the InitializationDepth (think full, bushy trees). There are not necessarily all the same size (number of nodes) as they depends on the arity of the instructions, but the same initial depth. The Full method creates trees by selecting only functions with arity greater than 0 until the initialization depth is reached; after which only terminals are selected.
The Grow method creates a wider variety of shapes and sizes. In the Grow method, nodes for the trees are selected from the full set of primitives (functions, constants, and variables) until the initialization depth is reached. Since an early node could select a terminal (constant, variable, or function of arity = 0), that node's subtree stops growing before the initialization depth.
The literature suggests that the shape of trees can impact which types of problems a genetic programming component will solve. Koza, in his original book "Genetic Programming," actually suggests using a method called ramped half and half, which involves using both the Full and Grow method and varying the desired depth of the trees. The depth limit is ramped from 2 to the full initialization depth limit, i.e., first individual has a depth limit of 2, second individual has a depth limit of 3, etc up to the full initialization depth limit. The depth limits are evenly divided amongst the population, e.g., if there are 100 individuals and a full initialization depth limit of 10, approximately 11 individuals will have a depth limit of 2, 11 will have a depth limit of 3, etc.
|
|
Instructions
|
Specifies the set of instructions allowed in a genetic program, including all functions, variables and constants. When the genetic programming component is evolving the population of genetic programs, it uses this collection to select a function, variable or constant.
|
|
MaxProgramDepth
|
Returns the maximum program depth of the current Population
|
|
MaxProgramSize
|
Returns the maximum program size of the current Population
|
|
MinProgramDepth
|
Returns the minimum program depth of the current Population
|
|
MinProgramSize
|
Returns the minimum program size of the current Population
|
|
MutateConstantWeight
|
Defines the weight or probability that the subtree mutation method will be chosen over the other genetic programming mutation methods. When mutation is selected to occur (see MutationProbability ), the genetic programming component chooses a mutation method using the weights you supply.
Constant mutation replaces the value of a constant instruction with a different value (see OnConstantMutation)
|
|
MutateHoistWeight
|
Defines the weight or probability that the subtree mutation method will be chosen over the other genetic programming mutation methods. When mutation is selected to occur (see MutationProbability ), the genetic programming component chooses a mutation method using the weights you supply.
Hoist mutation replaces the entire child program tree with a subtree from the child (the subtree becomes the root node). This has the effect of reducing the complexity of the child.
|
|
MutatePointWeight
|
Defines the weight or probability that the subtree mutation method will be chosen over the other genetic programming mutation methods. When mutation is selected to occur (see MutationProbability ), the genetic programming component chooses a mutation method using the weights you supply.
Point mutation replaces a node of the child with a node of the same type (e.g., arity and TRSGPInstruction<T>). The PointMutationMethod and PointMutationProbability control how the point mutation occurs.
|
|
MutateReplacementWeight
|
Defines the weight or probability that the subtree mutation method will be chosen over the other genetic programming mutation methods. When mutation is selected to occur (see MutationProbability ), the genetic programming component chooses a mutation method using the weights you supply.
Replacement mutation is similar to Subtree mutation. It replaces a node of child with a node of the same type (e.g., arity and TRSGPGeneticInstruction<T>) and then grows a new subtree.
|
|
MutateShrinkWeight
|
Defines the weight or probability that the subtree mutation method will be chosen over the other genetic programming mutation methods. When mutation is selected to occur (see MutationProbability ), the genetic programming component chooses a mutation method using the weights you supply.
Shrink mutation replaces a subtree of the child with a terminal. This has the effect of reducing the complexity of the child.
|
|
MutateSubtreeWeight
|
Defines the weight or probability that the subtree mutation method will be chosen over the other genetic programming mutation methods. When mutation is selected to occur (see MutationProbability ), the genetic programming component chooses a mutation method using the weights you supply.
Subtree mutation replaces a randomly selected subtree of the child with a newly genereated subtree. The old subtree is deleted and a new subtree is grown in its place. The new subtree can be of a different type than the one being replaced, e.g., a constant is replaced with a function and its children.
|
|
MutationWeights
|
Defines the weights or probabilities that particular mutation methods will be chosen over the other genetic programming mutation methods. When mutation is selected to occur (see MutationProbability ), the genetic programming component chooses a mutation method using the weights you supply.
|
|
MutationWeightSum
|
Returns the sum of all the MutationWeights
|
|
OnConstantMutation
|
Occurs when constant mutation is selected. Use this event to supply a new constant value for a genetic program node
|
|
Operations
|
Returns a list of the Instructions that are functions with arity > 0
|
|
ParsimonyCoefficient
|
Specifies the parsimony coefficient to use when trying to control bloat using bsSizeParsimonyPressure and bsDepthParsimonyPressure.
When generating the WeightedFitness of an individual, the Fitness is reduced by the size or depth its genetic program multiplied by the ParsimonyCoefficient. This has the effect for evolving for smaller genetic programs over larger genetic programs.
Note
|
bsCovariantSizeParsimonyPressure and bsCovariantDepthParsimonyPressure also use the ParsimonyCoefficient when evaluating the WeightedFitness. However, these two methods recalculate the ParsimonyCoefficient themselves every generation using the formula CoVariance(ProgramData, FitnessData) / Variance(ProgramData).
|
|
|
PointMutationMethod
|
Specifies how point mutation is performed on an individual's genetic program when point mutation is selected. Point mutation could occur once over the entire tree or there could be a chance of point mutation for every node in the tree. The PointMutationProbability property controls the chance of point mutation occurring on a node (note that this is after the MutationProbability check has occurred and point mutation has been chosen from the set of mutation methods).
|
|
PointMutationProbability
|
The PointMutationProbability property controls the chance of point mutation occurring on a node. When point mutation is going to occur, every node of the genetic program is checked against this probability to see if point mutation occurs. If point mutation is found to occur, what happens next depends on the PointMutationMethod property.
|
|
Population
|
Represents the entire population of candidate individuals (TRSIndividual) in the current Generation, including the FittestIndividual. The TRSCustomGeneticProgramming<T> component 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).
|
|
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).
|
|
SelectionNonTerminalsProbability
|
Specifies the probability that a non-terminal (function) should be preferentially selected in a genetic program tree over a terminal (constant, variable, or function of arity = 0).
With genetic programming, it is preferable to select non-terminals over terminals for genetic operations. Changing an entire subtree's meaning is a stronger change than just changing a constant at the edges of a genetric program. Used in crossover, mutation, and inversion.
|
|
TarpeianProbability
|
Specifies the probability that an individual's Fitness will be set to UnfitFitness when its genetic program Size or Depth exceeds the average size or depth. The Tarpeian anti-bloat strategy has the advantage that the individual is judged before evaluating fitness which can significantly reduce computation.
This property is used when the BloatStrategy is bsTarpeianDepth or bsTarpeianSize.
|
|
Terminals
|
Returns a list of the Instructions that are terminals: constants, variables, and functions of arity 0.
|
|
TerminalsCount
|
Returns the number of Instructions that are terminals (i.e., constants, variables, and functions of arity = 0)
|
|
Terminal[Integer]
|
Returns a terminal ( Instructions that are constants, variables or functions of arity = 0) in the list of terminals
|
|
TournamentField
|
Represents property TournamentField.
|