#8 · Primary category: Optimization & Heuristic Algorithms
GeneticAlgorithmPython
Source code of PyGAD, a Python 3 library for building the genetic algorithm and training machine learning algorithms (Keras & PyTorch).
Project last updated:07/09/26
GitHub Stars
2.2K
Forks
500
Contributors
27
License
BSD-3-Clause
Why we included this project
For optimization problems where gradients or closed-form solutions fall short, a genetic algorithm can be a pragmatic fallback, and PyGAD is one of the more approachable ways to run one in Python. You supply your own fitness function, then the library handles parent selection, crossover, and mutation across a range of built-in variants, covering both single- and multi-objective cases without making you write the evolutionary plumbing by hand. It also pairs well with machine learning work, since it can evolve the weights or hyperparameters of a Keras or PyTorch model as the population being optimized. The core install stays small, relying mainly on NumPy and cloudpickle, while plotting and deep-learning support come as optional extras. Teams wanting a scriptable optimization routine rather than a heavyweight platform will find the API easy to drop into existing NumPy-based code.
Articles for this project
No articles for this project yet.
To suggest a topic or contribute an article, contact us.
Related projects in this category
scikit-opt
Genetic Algorithm, Particle Swarm Optimization, Simulated Annealing, Ant Colony Optimization Algorithm,Immune Algorithm, Artificial Fish Swarm Algorithm, Differential Evolution and TSP(Traveling salesman)
ceres-solver
A large scale non-linear optimization library
FLAML
A fast library for AutoML and tuning. Join our Discord: https://discord.gg/Cppx2vSPVP.
sunfish
Sunfish: a Python Chess Engine in 111 lines of code
POT
POT : Python Optimal Transport