#8 · Primary category: Optimization & Heuristic Algorithms

GeneticAlgorithmPython

deep-learning evolutionary-algorithms genetic-algorithm machine-learning neural-networks numpy optimization pygad pygad-documentation python

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