C# Class GA.Ga

Genetic Algorithm class
Show file Open project: homoluden/fedkf-ga Class Usage Examples

Public Methods

Method Description
Ga ( ) : System

Default constructor sets mutation rate to 5%, crossover to 80%, population to 100, and generations to 2000.

Ga ( double crossoverRate, double mutationRate, int populationSize, int generationSize, int genomeSize ) : System
Ga ( int genomeSize ) : System
Go ( double maxGeneVal, double minGeneVal ) : void

Method which starts the GA executing.

InitialValues ( ) : void

Private Methods

Method Description
Initiation ( ) : void
RouletteSelection ( ) : int

After ranking all the genomes by fitness, use a 'roulette wheel' selection method. This allocates a large probability of selection to those with the highest fitness.

Selection ( ) : void

Method Details

Ga() public method

Default constructor sets mutation rate to 5%, crossover to 80%, population to 100, and generations to 2000.
public Ga ( ) : System
return System

Ga() public method

public Ga ( double crossoverRate, double mutationRate, int populationSize, int generationSize, int genomeSize ) : System
crossoverRate double
mutationRate double
populationSize int
generationSize int
genomeSize int
return System

Ga() public method

public Ga ( int genomeSize ) : System
genomeSize int
return System

Go() public method

Method which starts the GA executing.
public Go ( double maxGeneVal, double minGeneVal ) : void
maxGeneVal double
minGeneVal double
return void

InitialValues() public method

public InitialValues ( ) : void
return void