Skip to content

DomenicoDeFelice/genetic-algorithm-in-python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Genea: A Genetic Algorithm in Python

Genea is a Genetic Algorithm written in Python, for educational purposes.

I started writing it for fun, while learning more about how genetic algorithms work.

Given a list of genes and a fitness function, the algorithm starts from a random population and evolves it, generation after generation, until it has converged to a (hopefully) good solution.

In the example below (default values in the source code), I'm using the English alphabet as list of genes and I'm using a fitness function that is inversely proportional to the hamming distance between an individual chromosome (a string of genes) and my name "Domenico De Felice".

In other words, the genetic algorithm starts from a pool of random strings, and make them converge towards my name.

The source code is well documented.

Play with it and have fun!

Demo

About

A genetic algorithm written in Python for educational purposes.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages