GeneticAlgorithm MembersModulus Evo2
OnlineModulus Evo2

The GeneticAlgorithm type exposes the following members.
Constructors

  NameDescription
Public methodGeneticAlgorithm 
Initializes a new instance of the GeneticAlgorithm class.
Public methodGeneticAlgorithm(String)
Initializes a new instance of the GeneticAlgorithm class.
Back to Top
Methods

  NameDescription
Public methodAdd
Adds the specified Genome. All Genomes must contain exactly the same number and type of chromosomes and genes and must be added in the same order for each genome. The initial population of genomes must contain multiple xy genome pairs with different surnames to prevent inbreeding, which would cause a lack of variation.
Public methodCreateGenomes
Overridable function creates the population of Genomes.
Public methodOnlineEquals
Determines whether the specified OnlineObject is equal to the current OnlineObject.
(Inherited from OnlineObject.)
Public methodEvaluate
Evaluates the specified genome using a client-supplied custom fitness function.
Public methodEvolve
Evolves the genomes based on the error summation caused by the genes in each chromosome. Unlike other algorithms, this version evolves based on the fitness of the entire genome. This function should be called once after each evaluation of the genomes. The stop condition may be when the error reaches a pre-defined optimum, or after a certain number of iterations without any improvement, or a combination thereof.
Protected methodOnlineFinalize
Allows an OnlineObject to attempt to free resources and perform other cleanup operations before the OnlineObject is reclaimed by garbage collection.
(Inherited from OnlineObject.)
Public methodFittestGenomes
Returns the top n fittest genomes.
Public methodStatic memberFromString
Creates a new GeneticAlgorithm object from a string created by ToString.
Public methodOnlineGetHashCode
Serves as a hash function for a particular type.
(Inherited from OnlineObject.)
Public methodOnlineGetType
Gets the OnlineType of the current instance.
(Inherited from OnlineObject.)
Public methodStatic memberLoad
Loads the specified genetic algorithm from a file.
Protected methodOnlineMemberwiseClone
Creates a shallow copy of the current OnlineObject.
(Inherited from OnlineObject.)
Public methodMutate
Ages the individual by performing mutations.
Public methodRun
Code goes here to loop through and run the GA
Public methodSave
Saves this genetic algorithm to a file.
Public methodToString
Returns a OnlineString that represents this instance.
(Overrides OnlineObject ToString .)
Back to Top
Properties

  NameDescription
Public propertyArchive
Determines if dead genomes should be stored
Public propertyGenomes
Entire population of Genomes (individuals).
Public propertyInbreedingDistance
Distance in ordinal position between two genomes to prevent interbreeding. Based on Westermarck. The greater the value, the more females must be added in the beginning to exceed the limit.
Public propertyPopulationSize
The maximum size of the genome population. The recommended size is 1,000 or greater.
Public propertyStop
Instructs the Evolve function to stop.
Public propertyTag
Helps identify the the genetic algorithm.
Back to Top
Events

  NameDescription
Public eventOnBirth
Fires when a new genome is created.
Public eventOnDeath
Fires when a genome is removed from the population.
Public eventOnGenomeSelectionFailed
Fires when a genome could not be selected in the Evolve method. This occurs when the initial population is too small or the InbreedingDistance property is set too high in relation to the population size.
Public eventOnGenomeUpdated
Fires when a genome has been updated, either through creation or mutation.
Back to Top
See Also