Skip to content

Provides Bit-String functionality for use in genetic algorithms

Notifications You must be signed in to change notification settings

bencoveney/ChromosomeLibrary

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 

Repository files navigation

What is ChromosomeLibrary?

ChromosomeLibrary provides bit-string functionality for use in genetic algorithm projects:

  • Creation of Chromosomes (from random or given data)
  • Reproduction (including single-point crossover and mutation operations)

Usage

To create initial random chromosomes use the following code:

int bitStringSize = 8;
Chromosome init = GenerateRandomChromosome(bitStringSize);

Chromosomes can also be created from given data:

string data = "01101001";
Chromosome init = new Chromosome(data);

Genetic data from two parents can be combined to produce child chromosomes:

float mutationRate = 0.001f;
float crossoverRate = 0.3f;

Chromosome[] children = Reproduce(ChromosomeA, ChromosomeB, mutationRate, crossoverRate);

About

Provides Bit-String functionality for use in genetic algorithms

Resources

Stars

Watchers

Forks

Packages

No packages published