/simple-genetic-algorithm

Computational Intelligence Module 2 - Evolutionary Algorithms

Primary LanguagePython

simple-genetic-algorithm

Computational Intelligence Module 2 - Evolutionary Algorithms

This is an implementation of a simple genetic algorithm, coded in Python, which includes the following genetic algorithm components:

  • Fitness function
  • Population of individuals
  • Reproduction
  • Mutation
  • Crossover

In this example, given a population of 8 12-bit individuals encoded with zeros and ones, we wish to evolve a child that fits the following pattern: 010010010010.

Improvements are still to be made to this algorithm to make it more flexible in terms of input, fit child, and stopping functions for the evolution

More about genetic algorithms can be found here.

Also included is a simple hill climbing algorithm which attempts for find the optimal solution for a given mathematical equation. More about hill climbing can be found here.