Genetic Algorithm(GA)

less than 1 minute read

Published:

Result of CLPSO

What did I do

Tried the Simple Genetic Algorithm, implement the Crossover, Mutation part and found the issue of SGA.

Codes are available at: https://github.com/LeslieWongCV/EE6227_Wong/tree/main/GenericAlgorithm

Setup on which the code was tested

  • python==3.7
  • numpy==1.19.2

SGA

Simple Genetic Algorithm is one of the Evolution Algorithms, every step is just like the evolution process happening in nature. Crossover\Mutation\Reproduction\fitness value computation are conducted in the process.

Features

  1. The classic and the basic.
  2. There are so many ways to do the Crossover and Mutation. PMX, OX1, OX2, POS, etc.

Procedure

Results

Y = X^2

Y = X * sin(10 * pi * X) + 2

Issues

Sometimes it will go to local best.

Simple Genetic Algorithm’s result is strong relied on the initial population when the function of the problem has local minimal/maximal points.

Contact

The above is the a brief description of GA. If you encounter unclear or controversial issues, feel free to contact Leslie Wong.