diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml index 5af20c6..b6918b5 100644 --- a/.github/FUNDING.yml +++ b/.github/FUNDING.yml @@ -1,6 +1,6 @@ # These are supported funding model platforms -github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2] +github: [ahmedfgad] # Up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2] # paypal: http://paypal.me/ahmedfgad # Replace with a single Patreon username open_collective: pygad ko_fi: # Replace with a single Ko-fi username diff --git a/README.md b/README.md index 8aa7897..f16e92b 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ Push your PyGAD problem to [Vilvik](https://vilvik.com) and run it in the cloud. Read the [PyGAD documentation](https://pygad.readthedocs.io/en/latest). [![PyPI Downloads](https://pepy.tech/badge/pygad)](https://pepy.tech/project/pygad) [![Conda Downloads](https://img.shields.io/conda/dn/conda-forge/pygad.svg?label=Conda%20Downloads)]( -https://anaconda.org/conda-forge/PyGAD) [![PyPI version](https://badge.fury.io/py/pygad.svg)](https://badge.fury.io/py/pygad)![Docs](https://readthedocs.org/projects/pygad/badge)[![PyGAD PyTest Matrix](https://github.com/ahmedfgad/GeneticAlgorithmPython/actions/workflows/main.yml/badge.svg)](https://github.com/ahmedfgad/GeneticAlgorithmPython/actions/workflows/main.yml) [![Release](https://github.com/ahmedfgad/GeneticAlgorithmPython/actions/workflows/release.yml/badge.svg)](https://github.com/ahmedfgad/GeneticAlgorithmPython/actions/workflows/release.yml) [![Scorecard supply-chain security](https://github.com/ahmedfgad/GeneticAlgorithmPython/actions/workflows/scorecard.yml/badge.svg)](https://github.com/ahmedfgad/GeneticAlgorithmPython/actions/workflows/scorecard.yml) [![License](https://img.shields.io/badge/License-BSD_3--Clause-blue.svg)](https://opensource.org/licenses/BSD-3-Clause) [![REUSE](https://api.reuse.software/badge/github.com/ahmedfgad/GeneticAlgorithmPython)](https://api.reuse.software/info/github.com/ahmedfgad/GeneticAlgorithmPython) [![Stack Overflow](https://img.shields.io/badge/stackoverflow-Ask%20questions-blue.svg)]( +https://anaconda.org/conda-forge/PyGAD) [![PyPI version](https://badge.fury.io/py/pygad.svg)](https://badge.fury.io/py/pygad)[![Docs](https://app.readthedocs.org/projects/pygad/badge/?version=latest)](https://pygad.readthedocs.io/en/latest/) [![PyGAD PyTest Matrix](https://github.com/ahmedfgad/GeneticAlgorithmPython/actions/workflows/main.yml/badge.svg)](https://github.com/ahmedfgad/GeneticAlgorithmPython/actions/workflows/main.yml) [![Release](https://github.com/ahmedfgad/GeneticAlgorithmPython/actions/workflows/release.yml/badge.svg)](https://github.com/ahmedfgad/GeneticAlgorithmPython/actions/workflows/release.yml) [![Scorecard supply-chain security](https://github.com/ahmedfgad/GeneticAlgorithmPython/actions/workflows/scorecard.yml/badge.svg)](https://github.com/ahmedfgad/GeneticAlgorithmPython/actions/workflows/scorecard.yml) [![License](https://img.shields.io/badge/License-BSD_3--Clause-blue.svg)](https://opensource.org/licenses/BSD-3-Clause) [![REUSE](https://api.reuse.software/badge/github.com/ahmedfgad/GeneticAlgorithmPython)](https://api.reuse.software/info/github.com/ahmedfgad/GeneticAlgorithmPython) [![Stack Overflow](https://img.shields.io/badge/stackoverflow-Ask%20questions-blue.svg)]( https://stackoverflow.com/questions/tagged/pygad) [![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/ahmedfgad/GeneticAlgorithmPython/badge)](https://securityscorecards.dev/viewer/?uri=github.com/ahmedfgad/GeneticAlgorithmPython) [![DOI](https://zenodo.org/badge/DOI/10.1007/s11042-023-17167-y.svg)](https://doi.org/10.1007/s11042-023-17167-y) ![PYGAD-LOGO](https://github.com/ahmedfgad/GeneticAlgorithmPython/raw/master/docs/source/images/101267295-c74c0180-375f-11eb-9ad0-f8e37bd796ce.png) @@ -30,7 +30,7 @@ The library is under active development and more features are added regularly. I # Installation -The current release is [PyGAD 3.8.1](https://github.com/ahmedfgad/GeneticAlgorithmPython/releases/tag/3.8.1), dated October 11, 2026. Read the [release notes](https://github.com/ahmedfgad/GeneticAlgorithmPython/blob/3.8.1/docs/source/releases.md#pygad-381) for its fixes and compatibility changes. PyGAD requires Python 3.8 or newer. +The current release is [PyGAD 3.9.2](https://github.com/ahmedfgad/GeneticAlgorithmPython/releases/tag/3.9.2), dated October 16, 2026. Read the [release notes](https://github.com/ahmedfgad/GeneticAlgorithmPython/blob/3.9.2/docs/source/releases.md#pygad-392) for its fixes and compatibility changes. PyGAD requires Python 3.8 or newer. Watch the [PyGAD 3.8.0 release video on YouTube](https://youtu.be/8pdIiMAMLUM). diff --git a/docs/source/index.md b/docs/source/index.md index a02b22e..25e8fee 100644 --- a/docs/source/index.md +++ b/docs/source/index.md @@ -33,7 +33,6 @@ The library is under active development, and new features are added often. Pleas You can donate to PyGAD through: -- [Credit/Debit Card](https://donate.stripe.com/eVa5kO866elKgM0144): https://donate.stripe.com/eVa5kO866elKgM0144 - [Open Collective](https://opencollective.com/pygad): [opencollective.com/pygad](https://opencollective.com/pygad) - PayPal: Use either this link [paypal.me/ahmedfgad](https://paypal.me/ahmedfgad) or the e-mail address ahmed.f.gad@gmail.com - Interac e-Transfer: Use the e-mail address ahmed.f.gad@gmail.com diff --git a/docs/source/releases.md b/docs/source/releases.md index 6b6e310..a849528 100644 --- a/docs/source/releases.md +++ b/docs/source/releases.md @@ -8,6 +8,13 @@ Release notes are listed from newest to oldest. Unreleased contains changes plan No changes yet. +## PyGAD 3.9.2 + +Release Date: October 16, 2026. + +1. [Roulette wheel selection](utils.md#roulette_wheel_selection) and [stochastic universal selection](utils.md#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`. + ## PyGAD 3.9.1 Release Date: October 16, 2026. diff --git a/docs/source/utils.md b/docs/source/utils.md index 6ade59c..f4e0662 100644 --- a/docs/source/utils.md +++ b/docs/source/utils.md @@ -450,7 +450,7 @@ Selects the parents using the tournament selection technique. Selects the parents using the roulette wheel selection technique. -Each solution gets a share of the wheel equal to its fitness divided by the total fitness. If any fitness value is negative, all values are first shifted by the smallest fitness, so the worst solution gets no share and the better solutions keep larger shares. For example, the fitness values `-1` and `-9` become `8` and `0`. If all values are equal and negative, every solution gets the same chance. Fitness values that are all zero or above are used without a shift, and a total of zero raises `ZeroDivisionError`. +Each solution gets a share of the wheel equal to its fitness divided by the total fitness. If any fitness value is negative, all values are first shifted by the smallest fitness, so the worst solution gets no share and the better solutions keep larger shares. For example, the fitness values `-1` and `-9` become `8` and `0`. If all values are equal and negative, every solution gets the same chance. Fitness values that are all zero or above are used without a shift, and a total of zero raises `ZeroDivisionError`. Values near the float limits, such as `-sys.float_info.max` for a rejected solution, are scaled before they are shifted or added, so nothing overflows. `-inf` and `NaN` get no chance, and when any fitness is `+inf`, those solutions share every chance equally.