Skip to content

PyGAD 3.9.0

Choose a tag to compare

@github-actions github-actions released this 16 Oct 04:14
· 3 commits to master since this release
18ff9be

PyGAD 3.9.0

Release Date: October 16, 2026.

  1. Roulette wheel selection and stochastic universal selection sum fitness values in a floating-point type wide enough for the input. Large int64, uint64, float16, and float32 fitness values no longer overflow and raise ZeroDivisionError. Object arrays of Python integers keep exact values. See PR #381.
  2. SBX crossover and polynomial mutation round integer results to the nearest integer instead of truncating them. For a gene with a finite gene space, the result moves to the nearest allowed value. Before this change, the highest value of an integer gene was almost never produced, values were pulled toward zero, and SBX could not keep a parent's highest value. Results for integer genes change for the same random seed. Float genes are not affected. See Conversion and Rounding Rules.
  3. A new gene_categorical parameter marks genes whose values are categories with no order. For these genes, polynomial mutation picks one of the other allowed values at random and SBX crossover copies the value of one parent. The default None keeps the previous behavior. See Categorical Genes.
  4. Regression tests cover reaching both ends of integer and finite gene spaces, balanced steps up and down, negative ranges, stepped and uneven spaces, and every gene_categorical validation rule and operator behavior. The pygad.helper and pygad.utils submodule versions are 1.4.7 and 1.5.10.