Skip to content

Release PyGAD 3.9.1 - #383

Merged
ahmedfgad merged 12 commits into
masterfrom
github-actions
Oct 16, 2026
Merged

ahmedfgad merged 12 commits into
masterfrom
github-actions

Conversation

@ahmedfgad

Copy link
Copy Markdown
Owner

PyGAD 3.9.1

Release Date: October 16, 2026.

  1. Roulette wheel selection and stochastic universal selection favor the better solutions when fitness values are negative. Before this change, each share was the fitness divided by the total, which flips the order for negative values: the fitness values -1 and -9 gave the worse solution 90% of the selections. Negative fitness values are now shifted by the smallest fitness first, so -1 and -9 become 8 and 0. This also covers mixed positive and negative values, and equal negative values give every solution the same chance. Fitness values that are all zero or above keep their exact previous behavior.
  2. Regression tests cover negative, mixed-sign, equal negative, multi-objective, and large Python integer fitness, and a minimization run with each selector. The pygad.utils submodule version is 1.5.11.

@github-actions

github-actions Bot commented Oct 16, 2026 •

Copy link
Copy Markdown

📊 Change summary

6 files changed · +188 / −14 lines

pie showData
    title Lines changed per file (202 total)
    "tests/test_probability_selection_negative_fitness.py" : 127
    "pygad/utils/parent_selection.py" : 60
    "docs/source/releases.md" : 7
    "docs/source/utils.md" : 4
    "pygad/_version.py" : 2
    "pygad/utils/__init__.py" : 2
Loading
Per-file breakdown
File + − total
tests/test_probability_selection_negative_fitness.py 127 0 127
pygad/utils/parent_selection.py 48 12 60
docs/source/releases.md 7 0 7
docs/source/utils.md 4 0 4
pygad/_version.py 1 1 2
pygad/utils/__init__.py 1 1 2
Total (6 files) 188 14 202

@ahmedfgad
ahmedfgad merged commit 8e6a0c4 into master Oct 16, 2026
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants