This is a simple tutorial to implement a basic genetic algorithm in Python in under 150 lines using only Python standard libraries. Specific genetic operators implemented are uniform mutation and one-point crossover.
Refer to genetic-algorithms-tutorial.ipynb
for the tutorial. If you want to jump right away into the code, code/genetic_algorithm_uc.py
is the uncommented code and code/genetic_algorithm.py
is the commented code.