Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit158e53c

Browse files
authored
PyGAD 2.16.1 Documentation
1 parent19bac06 commit158e53c

File tree

2 files changed

+59
-1
lines changed

2 files changed

+59
-1
lines changed

‎docs/source/Footer.rst

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -833,6 +833,64 @@ Release Date: 19 June 2021
833833
section for more details.
834834
https://github.com/ahmedfgad/GeneticAlgorithmPython/discussions/50
835835

836+
.. _pygad-2161:
837+
838+
PyGAD 2.16.1
839+
------------
840+
841+
Release Date: 28 September 2021
842+
843+
1. Reuse the fitness of previously explored solutions rather than
844+
recalculating them. This feature only works if
845+
``save_solutions=True``.
846+
847+
2. The user can use the ``tqdm`` library to show a progress bar.
848+
https://github.com/ahmedfgad/GeneticAlgorithmPython/discussions/50
849+
850+
..code::python
851+
852+
import pygad
853+
import numpy
854+
import tqdm
855+
856+
equation_inputs= [4,-2,3.5]
857+
desired_output=44
858+
859+
deffitness_func(solution,solution_idx):
860+
output= numpy.sum(solution* equation_inputs)
861+
fitness=1.0/ (numpy.abs(output- desired_output)+0.000001)
862+
return fitness
863+
864+
num_generations=10000
865+
with tqdm.tqdm(total=num_generations)as pbar:
866+
ga_instance= pygad.GA(num_generations=num_generations,
867+
sol_per_pop=5,
868+
num_parents_mating=2,
869+
num_genes=len(equation_inputs),
870+
fitness_func=fitness_func,
871+
on_generation=lambda_: pbar.update(1))
872+
873+
ga_instance.run()
874+
875+
ga_instance.plot_result()
876+
877+
1. Solved the issue of unequal length between the ``solutions`` and
878+
``solutions_fitness`` when the ``save_solutions`` parameter is set to
879+
``True``. Now, the fitness of the last population is appended to the
880+
``solutions_fitness`` array.
881+
https://github.com/ahmedfgad/GeneticAlgorithmPython/issues/64
882+
883+
2. There was an issue of getting the length of these 4 variables
884+
(``solutions``, ``solutions_fitness``, ``best_solutions``, and
885+
``best_solutions_fitness``) doubled after each call of the ``run()``
886+
method. This is solved by resetting these variables at the beginning
887+
of the ``run()`` method.
888+
https://github.com/ahmedfgad/GeneticAlgorithmPython/issues/62
889+
890+
3. Bug fixes when adaptive mutation is used
891+
(``mutation_type="adaptive"``).
892+
https://github.com/ahmedfgad/GeneticAlgorithmPython/issues/65
893+
836894
PyGAD Projects at GitHub
837895
========================
838896

‎docs/source/conf.py

Lines changed: 1 addition & 1 deletion
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='2.16.0'
25+
release='2.16.1'
2626

2727
master_doc='index'
2828

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp