Hide Comments
Hide Comments

Comments (0)

Represents namespace RSGeneticBase.

expandingClasses

 

Name

Description

public class

TRSCustomGeneticComponent

Represents the base class for including genetic algorithms (GA) or genetic programs (GP) in your programs.

Genetic algorithms seek to solve optimization or search problems. They are inspired by evolutionary biology and approach the search problem as a task of 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 TRSCustomGeneticComponent class contains a population of individuals ( RSGeneticBase.TRSPopulation), which contain "DNA", chromosomes for genetic algorithms (Bits property) and genetic program trees for genetic programs.
 

public class

TRSIndividual

The TRSIndividual class is the base individual class for the library. It represents one individual, or candidate solution, in the population of solutions in a genetic algorithm or genetic programming problem. With genetic components, there is a population of individuals ( RSGeneticBase.TRSPopulation), which contain "dna", chromosomes for genetic algorithms or a program tree for genetic programming.

Genetic components then work by evolving your population towards the solution of the problem. Parents are selected from the current generation to reproduce the children of the next generation. Evolving a new generation involves:
 

Selecting 2 parents (Individuals) to reproduce
Splicing the the 2 parents together to make a child (called Crossover)
Optionally Mutating and Inverting the "dna" of the child to provide randomness
Repeating the above steps until the population of the new generation has been produced.
 



After the new generation is bred, the genetic component looks at the new population to see if any of the individuals solve the problem. This usually means evaluating the "fitness" of each individual (a numeric score that measures the ability of the individual). If any individual is "fit enough", the evolutionary search stops.
 



public class

TRSPopulation

The TRSPopulation class is the base population class for the library. It represents the entire population (the collection of TRSIndividual items) in a Genetic Algorithm or Programming problem.

Genetic components work by evolving your population towards the solution of the problem. Parents are selected from the current generation to reproduce the children of the next generation. Evolving a new generation involves:
 

Selecting 2 parents (Individuals) to reproduce
Splicing the the 2 parents together to make a child (called Crossover)
Optionally Mutating and Inverting the "dna" of the child to provide randomness
Repeating the above steps until the population of the new generation has been produced.
 

After the new generation is bred, the genetic component looks at the new population to see if any of the individuals solve the problem. This usually means evaluating the "fitness" of each individual (a numeric score that measures the ability of the individual). If any individual is "fit enough", the evolutionary search stops.
 

Top

expandingDelegates

 

Name

Description

public delegate

TRSCrossoverEvent

Defines the method signature for the OnCrossover event. The Parent1 and Parent2 parameters identify the parents of the Child parameter that will be recombined into the child. The DoMutation parameter controls whether the genetic operation will occur at all. Set DoMutation to False to prevent the crossover.

public delegate

TRSFitnessEvent

Defines the method signature for the OnEvaluateFitness event.

public delegate

TRSIndividualEvent

Defines the method signature for events that include an individual.

public delegate

TRSInitializationEvent

Defines the method signature for the OnInitialization event. Set the Initialized parameter to True to prevent the Initialize method from randomizing the Population's DNA.

public delegate

TRSMutationEvent

Defines the method signature for mutation events like OnMutation and OnInversion. Set the DoMutation event to True to force the mutation to occur. Set the DoMutation event to False to prohibit the mutation from occurring for this individual.

public delegate

TRSParentChildEvent

Defines the method signature for events that contain parents and their child, e.g., OnReproduction.

public delegate

TRSSelectionEvent

Defines the method signature for selection events, e.g., where one individual from the Population of individuals must be selected. Set the Parent parameter to the individual you want to be selected and used.

Top

expandingTypes

 

Name

Description

public type

TRSIndividualClass

Represents type TRSIndividualClass.

Top

Comments (0)