Skip to content

Commit

Permalink
PyGAD 3.3.1
Browse files Browse the repository at this point in the history
Release Date 17 February 2024
1. After the last generation and before the `run()` method completes, update the 2 instance attributes: 1) `last_generation_parents` 2) `last_generation_parents_indices`. This is to keep the list of parents up-to-date with the latest population fitness `last_generation_fitness`.  #275
  • Loading branch information
ahmedfgad committed Feb 17, 2024
1 parent 128db80 commit eae41c0
Show file tree
Hide file tree
Showing 6 changed files with 279 additions and 181 deletions.
2 changes: 1 addition & 1 deletion docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
author = 'Ahmed Fawzy Gad'

# The full version, including alpha/beta/rc tags
release = '3.3.0'
release = '3.3.1'

master_doc = 'index'

Expand Down
19 changes: 19 additions & 0 deletions docs/source/pygad.rst
Original file line number Diff line number Diff line change
Expand Up @@ -603,6 +603,25 @@ Other Methods
Summary <https://pygad.readthedocs.io/en/latest/pygad_more.html#print-lifecycle-summary>`__
section for more details and examples.

- 4 methods with names starting with ``run_``. Their purpose is to keep
the main loop inside the ``run()`` method clean. The details inside
the loop are moved to 4 individual methods. Generally, any method
with a name starting with ``run_`` is meant to be called by PyGAD
from inside the ``run()`` method. Supported in `PyGAD
3.3.1 <https://pygad.readthedocs.io/en/latest/releases.html#pygad-3-3-1>`__.

1. ``run_select_parents()``: Select the parents and call the callable
``on_parents()`` if defined.

2. ``run_crossover()``: Apply crossover and call the callable
``on_crossover()`` if defined.

3. ``run_mutation()``: Apply mutation and call the callable
``on_mutation()`` if defined.

4. ``run_update_population()``: Update the ``population`` attribute
after completing the processes of crossover and mutation.

The next sections discuss the methods available in the ``pygad.GA``
class.

Expand Down
2 changes: 1 addition & 1 deletion pygad/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
from .pygad import * # Relative import.

__version__ = "3.3.0"
__version__ = "3.3.1"
Loading

0 comments on commit eae41c0

Please sign in to comment.