Open Collective
Open Collective
Loading
PyGAD 2.16.0
Published on June 20, 2021 by Ahmed Fawzy Gad

  1. A user-defined function can be passed to the mutation_type, crossover_type, and parent_selection_type parameters in the pygad.GA class to create a custom mutation, crossover, and parent selection operators. Check the User-Defined Crossover, Mutation, and Parent Selection Operators section in the documentation: https://pygad.readthedocs.io/en/latest/README_pygad_ReadTheDocs.html#user-defined-crossover-mutation-and-parent-selection-operators
The example_custom_operators.py script gives an example of building and using custom functions for the 3 operators.
https://github.com/ahmedfgad/GeneticAlgorithmPython/discussions/50