Skip to content

Commit eae41c0

Browse files
committed
PyGAD 3.3.1
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
1 parent 128db80 commit eae41c0

File tree

6 files changed

+279
-181
lines changed

6 files changed

+279
-181
lines changed

docs/source/conf.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
author = 'Ahmed Fawzy Gad'
2323

2424
# The full version, including alpha/beta/rc tags
25-
release = '3.3.0'
25+
release = '3.3.1'
2626

2727
master_doc = 'index'
2828

docs/source/pygad.rst

+19
Original file line numberDiff line numberDiff line change
@@ -603,6 +603,25 @@ Other Methods
603603
Summary <https://pygad.readthedocs.io/en/latest/pygad_more.html#print-lifecycle-summary>`__
604604
section for more details and examples.
605605

606+
- 4 methods with names starting with ``run_``. Their purpose is to keep
607+
the main loop inside the ``run()`` method clean. The details inside
608+
the loop are moved to 4 individual methods. Generally, any method
609+
with a name starting with ``run_`` is meant to be called by PyGAD
610+
from inside the ``run()`` method. Supported in `PyGAD
611+
3.3.1 <https://pygad.readthedocs.io/en/latest/releases.html#pygad-3-3-1>`__.
612+
613+
1. ``run_select_parents()``: Select the parents and call the callable
614+
``on_parents()`` if defined.
615+
616+
2. ``run_crossover()``: Apply crossover and call the callable
617+
``on_crossover()`` if defined.
618+
619+
3. ``run_mutation()``: Apply mutation and call the callable
620+
``on_mutation()`` if defined.
621+
622+
4. ``run_update_population()``: Update the ``population`` attribute
623+
after completing the processes of crossover and mutation.
624+
606625
The next sections discuss the methods available in the ``pygad.GA``
607626
class.
608627

pygad/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
from .pygad import * # Relative import.
22

3-
__version__ = "3.3.0"
3+
__version__ = "3.3.1"

0 commit comments

Comments
 (0)