# PyGAD: An Intuitive Genetic Algorithm Python Library

arXiv: https://arxiv.org/abs/2106.06158 · HTML: https://mlsanity.com/paper/2106.06158/

## Key facts

- Cited by 25 papers in the map (data through 14 Oct 2026).
- Builds on 0 of its 53 references that are in the map.
- First posted on arXiv 11 Jun 2021.

## Built on by (most cited first, 25 of 25)

- [SurCo: Learning Linear Surrogates For Combinatorial Nonlinear Optimization Problems](https://mlsanity.com/paper/2210.12547/) (2022)
- [SynerGPT: In-Context Learning for Personalized Drug Synergy Prediction and Drug Design](https://mlsanity.com/paper/2307.11694/) (2023)
- [Road Planning for Slums via Deep Reinforcement Learning](https://mlsanity.com/paper/2305.13060/) (2023)
- [Zero Grads: Learning Local Surrogate Losses for Non-Differentiable Graphics](https://mlsanity.com/paper/2308.05739/) (2023)
- [USTBench: Benchmarking and Dissecting Spatiotemporal Reasoning of LLMs as Urban Agents](https://mlsanity.com/paper/2505.17572/) (2025)
- [Optimizing Treatment Allocation in the Presence of Interference](https://mlsanity.com/paper/2410.00075/) (2024)
- [Evolutionary scheduling of university activities based on consumption forecasts to minimise electricity costs](https://mlsanity.com/paper/2202.12595/) (2022)
- [CryoRL: Reinforcement Learning Enables Efficient Cryo-EM Data Collection](https://mlsanity.com/paper/2204.07543/) (2022)
- [Category-wise Fine-Tuning: Resisting Incorrect Pseudo-Labels in Multi-Label Image Classification with Partial Labels](https://mlsanity.com/paper/2401.16991/) (2024)
- [Human-Readable Programs as Actors of Reinforcement Learning Agents Using Critic-Moderated Evolution](https://mlsanity.com/paper/2410.21940/) (2024)
- [Unsupervised Particle Tracking with Neuromorphic Computing](https://mlsanity.com/paper/2502.06771/) (2025)
- [Multi-Agent Reinforcement Learning for Inverse Design in Photonic Integrated Circuits](https://mlsanity.com/paper/2506.18627/) (2025)
- [Realistic mask generation for matter-wave lithography via machine learning](https://mlsanity.com/paper/2207.08723/) (2022)
- [Uncertainty Quantification in Neural-Network Based Pain Intensity Estimation](https://mlsanity.com/paper/2311.08569/) (2023)
- [Class-specific Data Augmentation for Plant Stress Classification](https://mlsanity.com/paper/2406.13081/) (2024)
- [Realistic Counterfactual Explanations for Machine Learning-Controlled Mobile Robots using 2D LiDAR](https://mlsanity.com/paper/2505.06906/) (2025)
- [Composite Data Augmentations for Synthetic Image Detection Against Real-World Perturbations](https://mlsanity.com/paper/2506.11490/) (2025)
- [RIS-Enabled Smart Wireless Environments: Fundamentals and Distributed Optimization](https://mlsanity.com/paper/2512.18788/) (2025)
- [Towards Robust Universal Perturbation Attacks: A Float-Coded, Penalty-Driven Evolutionary Approach](https://mlsanity.com/paper/2601.12624/) (2026)
- [Interpretable Deep Reinforcement Learning for Element-level Bridge Life-cycle Optimization](https://mlsanity.com/paper/2604.02528/) (2026)
- [Active Sensing for RIS-Aided Tracking and Power Control: A Hybrid Neuroevolution and Supervised Learning Approach](https://mlsanity.com/paper/2607.00056/) (2026)
- [ConceptCF: Concept-based Counterfactuals for the Explainability of Time Series](https://mlsanity.com/paper/2607.18748/) (2026)
- [LLMs in Process Diagram Engineering: From Optimal PFDs to Validated P&IDs](https://mlsanity.com/paper/2608.11220/) (2026)
- [Transformer-Based Flow Shop Scheduling Using MILP-Generated Training Data](https://mlsanity.com/paper/2608.29690/) (2026)
- [Data-driven Optimal Sensor Placement for Aerosol Monitoring in the UK](https://mlsanity.com/paper/2610.12658/) (2026)

## Abstract (arXiv)

This paper introduces PyGAD, an open-source easy-to-use Python library for building the genetic algorithm. PyGAD supports a wide range of parameters to give the user control over everything in its life cycle. This includes, but is not limited to, population, gene value range, gene data type, parent selection, crossover, and mutation. PyGAD is designed as a general-purpose optimization library that allows the user to customize the fitness function. Its usage consists of 3 main steps: build the fitness function, create an instance of the pygad.GA class, and calling the pygad.GA.run() method. The library supports training deep learning models created either with PyGAD itself or with frameworks like Keras and PyTorch. Given its stable state, PyGAD is also in active development to respond to the user's requested features and enhancement received on GitHub https://github.com/ahmedfgad/GeneticAlgorithmPython. PyGAD comes with documentation https://pygad.readthedocs.io for further details and examples.
