Skip to content

Release PyGAD 3.9.2 - #384

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

ahmedfgad merged 15 commits into
masterfrom
github-actions

Conversation

@ahmedfgad

Copy link
Copy Markdown
Owner

PyGAD 3.9.2

Release Date: October 16, 2026.

  1. Roulette wheel selection and stochastic universal selection no longer fail with fitness values near the float limits. In PyGAD 3.9.1, a fitness of -sys.float_info.max, which some libraries give a rejected solution, made the shifted values overflow, and parent selection raised IndexError. The values are now scaled before they are shifted or added. -inf and NaN get no chance, solutions with +inf fitness share every chance equally, and a population with no finite fitness raises a clear ValueError. Ordinary non-negative fitness keeps exactly the same probabilities.
  2. Regression tests cover the most negative float, huge values of both signs, huge positive values, infinite and missing values, and full runs with both selectors. The pygad.utils submodule version is 1.5.12.

@github-actions

Copy link
Copy Markdown

📊 Change summary

6 files changed · +202 / −13 lines

pie showData
    title Lines changed per file (215 total)
    "tests/test_probability_selection_extreme_fitness.py" : 110
    "pygad/utils/parent_selection.py" : 90
    "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_extreme_fitness.py 110 0 110
pygad/utils/parent_selection.py 81 9 90
docs/source/releases.md 7 0 7
docs/source/utils.md 2 2 4
pygad/_version.py 1 1 2
pygad/utils/__init__.py 1 1 2
Total (6 files) 202 13 215

@ahmedfgad
ahmedfgad merged commit 02069ae 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