Show/Hide Toolbars

RiverSoftAVG Products Help

Navigation: Code Documentation > GeneticAlgorithm > RSGeneticProgramming > Classes

TRSCustomBinaryGeneticProgramming Class

Scroll Prev Top Next More

The TRSCustomBinaryGeneticProgramming component is the base class for including genetic programming (GP) in your programs that use floating point values and use functions of at most arity = 2. It instantiates the RSGenerics.GeneticProgramming.TRSCustomGeneticProgramming<T> generics class using TGAFloat and ensures the correct TRSGPInstruction<T> and TRSGPNode<T> classes are created for it. This class creates nodes and instructions with functions of at most arity = 2, it is slightly faster and uses less memory than the RSGeneticProgramming.TRSCustomGeneticProgramming class, which is the more general solution.

Genetic programming is a computer science method, inspired by evolutionary biology, for automatically solving problems, without having to know or define the form or structure of optimum problem structure beforehand. You define the basic building blocks (functions, constants, and variables) of the problem and then the component does the rest. Genetic programming solves 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. It uses evolutionary biology techniques such as inheritance, mutation, selection, and crossover (also called recombination).

The TRSCustomBinaryGeneticProgramming class contains a population of individuals (TRSGPPopulation<TGAFloat>), which contain genetic program trees as DNA. These DNA are used to represent the solution to the search problem. They represent the functions, constants, and variables of each candidate solution (or individual), represented by a TRSGPIndividual<TGAFloat> class.
 

After setting up the    Instructions that your genetic programs can use, you set the InitialPopulation , define a fitness function ( OnEvaluateFitness event) to properly "score" each individual, and then Evolve your solution.
 

alert_noteNotes to Implementers

The TRSCustomBinaryGeneticProgramming class redeclares the Instructions property and OnConstantMutation event to use instantiated generics types that look like non-generic types. Unfortunately, when a published property contains a generic, even an instantiated one (e.g., TRSGPInstructions<TGAFloat>), Delphi will not publish the property and make it available at design-time.

Namespace: RSGeneticProgramming

RiverSoftAVG Products Help © 1996-2016 Thomas G. Grubb