Skip to content

Commit 9b3b72a

Browse files
authored
PyGAD 2.11.0
Release Date: 16 February 2021 1. In the `gene_space` argument, the user can use a dictionary to specify the lower and upper limits of the gene. This dictionary must have only 2 items with keys `low` and `high` to specify the low and high limits of the gene, respectively. This way, PyGAD takes care of not exceeding the value limits of the gene. For a problem with only 2 genes, then using `gene_space=[{'low': 1, 'high': 5}, {'low': 0.2, 'high': 0.81}]` means the accepted values in the first gene start from 1 (inclusive) to 5 (exclusive) while the second one has values between 0.2 (inclusive) and 0.85 (exclusive). For more information, please check the [Limit the Gene Value Range](https://pygad.readthedocs.io/en/latest/README_pygad_ReadTheDocs.html#limit-the-gene-value-range) section of the documentation. 2. The `plot_result()` method returns the figure so that the user can save it. 3. Bug fixes in copying elements from the gene space. 4. For a gene with a set of discrete values (more than 1 value) in the `gene_space` parameter like `[0, 1]`, it was possible that the gene value may not change after mutation. That is if the current value is 0, then the randomly selected value could also be 0. Now, it is verified that the new value is changed. So, if the current value is 0, then the new value after mutation will not be 0 but 1.
1 parent e22d14e commit 9b3b72a

File tree

3 files changed

+234
-107
lines changed

3 files changed

+234
-107
lines changed

docs/source/Footer.rst

Lines changed: 79 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
1-
.. _header-n359:
1+
.. _header-n0:
22

33
Release History
44
===============
55

6-
.. _header-n361:
6+
.. figure:: https://user-images.githubusercontent.com/16560492/101267295-c74c0180-375f-11eb-9ad0-f8e37bd796ce.png
7+
:alt:
8+
9+
.. _header-n3:
710

811
PyGAD 1.0.17
912
------------
@@ -15,7 +18,7 @@ Release Date: 15 April 2020
1518
values for the solutions. This allows the project to be customized to
1619
any problem by building the right fitness function.
1720

18-
.. _header-n366:
21+
.. _header-n8:
1922

2023
PyGAD 1.0.20
2124
-------------
@@ -35,7 +38,7 @@ Release Date: 4 May 2020
3538
4. The code object ``__code__`` of the passed fitness function is
3639
checked to ensure it has the right number of parameters.
3740

38-
.. _header-n377:
41+
.. _header-n19:
3942

4043
PyGAD 2.0.0
4144
------------
@@ -61,7 +64,7 @@ Release Date: 13 May 2020
6164
is called after each generation. This helps the user to do
6265
post-processing or debugging operations after each generation.
6366

64-
.. _header-n388:
67+
.. _header-n30:
6568

6669
PyGAD 2.1.0
6770
-----------
@@ -97,7 +100,7 @@ Release Date: 14 May 2020
97100

98101
2. Mutation is applied independently for the genes.
99102

100-
.. _header-n403:
103+
.. _header-n45:
101104

102105
PyGAD 2.2.1
103106
-----------
@@ -107,7 +110,7 @@ Release Date: 17 May 2020
107110
1. Adding 2 extra modules (pygad.nn and pygad.gann) for building and
108111
training neural networks with the genetic algorithm.
109112

110-
.. _header-n408:
113+
.. _header-n50:
111114

112115
PyGAD 2.2.2
113116
-----------
@@ -141,7 +144,7 @@ The new gene value is **0.1**.
141144
``crossover_type`` parameters of the pygad.GA class constructor. When
142145
``None``, this means the step is bypassed and has no action.
143146

144-
.. _header-n421:
147+
.. _header-n63:
145148

146149
PyGAD 2.3.0
147150
-----------
@@ -166,7 +169,7 @@ Release date: 1 June 2020
166169
6. The name of the ``pygad.nn.train_network()`` function is changed to
167170
``pygad.nn.train()``.
168171

169-
.. _header-n436:
172+
.. _header-n78:
170173

171174
PyGAD 2.4.0
172175
-----------
@@ -204,7 +207,7 @@ through more generations because no further improvement is possible.
204207
if ga_instance.best_solution()[1] >= 70:
205208
return "stop"
206209
207-
.. _header-n446:
210+
.. _header-n88:
208211

209212
PyGAD 2.5.0
210213
-----------
@@ -300,7 +303,7 @@ If the user did not assign the initial population to the
300303
randomly based on the ``gene_space`` parameter. Moreover, the mutation
301304
is applied based on this parameter.
302305

303-
.. _header-n474:
306+
.. _header-n116:
304307

305308
PyGAD 2.6.0
306309
------------
@@ -318,7 +321,7 @@ Release Date: 6 August 2020
318321
``on_fitness``, ``on_parents``, ``on_crossover``, ``on_mutation``,
319322
``on_generation``, and ``on_stop``.
320323

321-
.. _header-n483:
324+
.. _header-n125:
322325

323326
PyGAD 2.7.0
324327
-----------
@@ -377,7 +380,7 @@ parameter or set it to ``"classification"`` (default value). In this
377380
case, the activation function of the last layer can be set to any type
378381
(e.g. softmax).
379382

380-
.. _header-n507:
383+
.. _header-n149:
381384

382385
PyGAD 2.7.1
383386
-----------
@@ -387,7 +390,7 @@ Release Date: 11 September 2020
387390
1. A bug fix when the ``problem_type`` argument is set to
388391
``regression``.
389392

390-
.. _header-n512:
393+
.. _header-n154:
391394

392395
PyGAD 2.7.2
393396
-----------
@@ -397,7 +400,7 @@ Release Date: 14 September 2020
397400
1. Bug fix to support building and training regression neural networks
398401
with multiple outputs.
399402

400-
.. _header-n517:
403+
.. _header-n159:
401404

402405
PyGAD 2.8.0
403406
-----------
@@ -407,7 +410,7 @@ Release Date: 20 September 2020
407410
1. Support of a new module named ``kerasga`` so that the Keras models
408411
can be trained by the genetic algorithm using PyGAD.
409412

410-
.. _header-n522:
413+
.. _header-n164:
411414

412415
PyGAD 2.8.1
413416
-----------
@@ -420,7 +423,7 @@ Release Date: 3 October 2020
420423
Management, Faculty of Engineering, Alexandria University,
421424
Egypt <https://www.linkedin.com/in/hamadakassem>`__.
422425

423-
.. _header-n527:
426+
.. _header-n169:
424427

425428
PyGAD 2.9.0
426429
------------
@@ -448,7 +451,7 @@ Release Date: 06 December 2020
448451
``numpy.int64``, ``numpy.float``, ``numpy.float16``,
449452
``numpy.float32``, or ``numpy.float64``.
450453

451-
.. _header-n540:
454+
.. _header-n182:
452455

453456
PyGAD 2.10.0
454457
------------
@@ -509,7 +512,7 @@ Release Date: 03 January 2021
509512
``cal_pop_fitness()`` method is called to calculate the fitness
510513
values of the population.
511514

512-
.. _header-n565:
515+
.. _header-n207:
513516

514517
PyGAD 2.10.1
515518
------------
@@ -541,7 +544,7 @@ Release Date: 10 January 2021
541544
pointing about that at
542545
`GitHub <https://github.com/ahmedfgad/KerasGA/issues/1>`__.
543546

544-
.. _header-n721:
547+
.. _header-n218:
545548

546549
PyGAD 2.10.2
547550
------------
@@ -552,7 +555,40 @@ Release Date: 15 January 2021
552555
more information:
553556
https://github.com/ahmedfgad/GeneticAlgorithmPython/issues/25
554557

555-
.. _header-n720:
558+
.. _header-n223:
559+
560+
PyGAD 2.11.0
561+
------------
562+
563+
Release Date: 16 February 2021
564+
565+
1. In the ``gene_space`` argument, the user can use a dictionary to
566+
specify the lower and upper limits of the gene. This dictionary must
567+
have only 2 items with keys ``low`` and ``high`` to specify the low
568+
and high limits of the gene, respectively. This way, PyGAD takes care
569+
of not exceeding the value limits of the gene. For a problem with
570+
only 2 genes, then using
571+
``gene_space=[{'low': 1, 'high': 5}, {'low': 0.2, 'high': 0.81}]``
572+
means the accepted values in the first gene start from 1 (inclusive)
573+
to 5 (exclusive) while the second one has values between 0.2
574+
(inclusive) and 0.85 (exclusive). For more information, please check
575+
the `Limit the Gene Value
576+
Range <https://pygad.readthedocs.io/en/latest/README_pygad_ReadTheDocs.html#limit-the-gene-value-range>`__
577+
section of the documentation.
578+
579+
2. The ``plot_result()`` method returns the figure so that the user can
580+
save it.
581+
582+
3. Bug fixes in copying elements from the gene space.
583+
584+
4. For a gene with a set of discrete values (more than 1 value) in the
585+
``gene_space`` parameter like ``[0, 1]``, it was possible that the
586+
gene value may not change after mutation. That is if the current
587+
value is 0, then the randomly selected value could also be 0. Now, it
588+
is verified that the new value is changed. So, if the current value
589+
is 0, then the new value after mutation will not be 0 but 1.
590+
591+
.. _header-n234:
556592

557593
PyGAD Projects at GitHub
558594
========================
@@ -562,7 +598,7 @@ https://pypi.org/project/pygad. PyGAD is built out of a number of
562598
open-source GitHub projects. A brief note about these projects is given
563599
in the next subsections.
564600

565-
.. _header-n578:
601+
.. _header-n236:
566602

567603
`GeneticAlgorithmPython <https://github.com/ahmedfgad/GeneticAlgorithmPython>`__
568604
--------------------------------------------------------------------------------
@@ -573,7 +609,7 @@ GitHub Link: https://github.com/ahmedfgad/GeneticAlgorithmPython
573609
is the first project which is an open-source Python 3 project for
574610
implementing the genetic algorithm based on NumPy.
575611

576-
.. _header-n581:
612+
.. _header-n239:
577613

578614
`NumPyANN <https://github.com/ahmedfgad/NumPyANN>`__
579615
----------------------------------------------------
@@ -587,7 +623,7 @@ neural network without using a training algorithm. Currently, it only
587623
supports classification and later regression will be also supported.
588624
Moreover, only one class is supported per sample.
589625

590-
.. _header-n584:
626+
.. _header-n242:
591627

592628
`NeuralGenetic <https://github.com/ahmedfgad/NeuralGenetic>`__
593629
--------------------------------------------------------------
@@ -600,7 +636,7 @@ projects
600636
`GeneticAlgorithmPython <https://github.com/ahmedfgad/GeneticAlgorithmPython>`__
601637
and `NumPyANN <https://github.com/ahmedfgad/NumPyANN>`__.
602638

603-
.. _header-n587:
639+
.. _header-n245:
604640

605641
`NumPyCNN <https://github.com/ahmedfgad/NumPyCNN>`__
606642
----------------------------------------------------
@@ -612,7 +648,7 @@ convolutional neural networks using NumPy. The purpose of this project
612648
is to only implement the **forward pass** of a convolutional neural
613649
network without using a training algorithm.
614650

615-
.. _header-n590:
651+
.. _header-n248:
616652

617653
`CNNGenetic <https://github.com/ahmedfgad/CNNGenetic>`__
618654
--------------------------------------------------------
@@ -624,7 +660,7 @@ convolutional neural networks using the genetic algorithm. It uses the
624660
`GeneticAlgorithmPython <https://github.com/ahmedfgad/GeneticAlgorithmPython>`__
625661
project for building the genetic algorithm.
626662

627-
.. _header-n593:
663+
.. _header-n251:
628664

629665
`KerasGA <https://github.com/ahmedfgad/KerasGA>`__
630666
--------------------------------------------------
@@ -637,7 +673,7 @@ the
637673
`GeneticAlgorithmPython <https://github.com/ahmedfgad/GeneticAlgorithmPython>`__
638674
project for building the genetic algorithm.
639675

640-
.. _header-n596:
676+
.. _header-n254:
641677

642678
`TorchGA <https://github.com/ahmedfgad/TorchGA>`__
643679
--------------------------------------------------
@@ -653,7 +689,7 @@ project for building the genetic algorithm.
653689
`pygad.torchga <https://github.com/ahmedfgad/TorchGA>`__:
654690
https://github.com/ahmedfgad/TorchGA
655691

656-
.. _header-n600:
692+
.. _header-n258:
657693

658694
Submitting Issues
659695
=================
@@ -670,7 +706,7 @@ is not working properly or to ask for questions.
670706
If this is not a proper option for you, then check the **Contact Us**
671707
section for more contact details.
672708

673-
.. _header-n604:
709+
.. _header-n262:
674710

675711
Ask for Feature
676712
===============
@@ -687,7 +723,7 @@ to [email protected].
687723

688724
Also check the **Contact Us** section for more contact details.
689725

690-
.. _header-n608:
726+
.. _header-n266:
691727

692728
Projects Built using PyGAD
693729
==========================
@@ -706,15 +742,15 @@ Within your message, please send the following details:
706742

707743
- Preferably, a link that directs the readers to your project
708744

709-
.. _header-n619:
745+
.. _header-n277:
710746

711747
For More Information
712748
====================
713749

714750
There are different resources that can be used to get started with the
715751
genetic algorithm and building it in Python.
716752

717-
.. _header-n621:
753+
.. _header-n279:
718754

719755
Tutorial: Implementing Genetic Algorithm in Python
720756
--------------------------------------------------
@@ -738,7 +774,7 @@ good resource to start with coding the genetic algorithm.
738774

739775
|image0|
740776

741-
.. _header-n632:
777+
.. _header-n290:
742778

743779
Tutorial: Introduction to Genetic Algorithm
744780
-------------------------------------------
@@ -757,7 +793,7 @@ which is available at these links:
757793

758794
|image1|
759795

760-
.. _header-n642:
796+
.. _header-n300:
761797

762798
Tutorial: Build Neural Networks in Python
763799
-----------------------------------------
@@ -777,7 +813,7 @@ available at these links:
777813

778814
|image2|
779815

780-
.. _header-n652:
816+
.. _header-n310:
781817

782818
Tutorial: Optimize Neural Networks with Genetic Algorithm
783819
---------------------------------------------------------
@@ -797,7 +833,7 @@ available at these links:
797833

798834
|image3|
799835

800-
.. _header-n662:
836+
.. _header-n320:
801837

802838
Tutorial: Building CNN in Python
803839
--------------------------------
@@ -823,7 +859,7 @@ good resource to start with coding CNNs.
823859

824860
|image4|
825861

826-
.. _header-n675:
862+
.. _header-n333:
827863

828864
Tutorial: Derivation of CNN from FCNN
829865
-------------------------------------
@@ -842,7 +878,7 @@ which is available at these links:
842878

843879
|image5|
844880

845-
.. _header-n685:
881+
.. _header-n343:
846882

847883
Book: Practical Computer Vision Applications Using Deep Learning with CNNs
848884
--------------------------------------------------------------------------
@@ -868,7 +904,7 @@ Find the book at these links:
868904
.. figure:: https://user-images.githubusercontent.com/16560492/78830077-ae7c2800-79e7-11ea-980b-53b6bd879eeb.jpg
869905
:alt:
870906

871-
.. _header-n700:
907+
.. _header-n358:
872908

873909
Contact Us
874910
==========
@@ -889,6 +925,9 @@ Contact Us
889925

890926
- `GitHub <https://github.com/ahmedfgad>`__
891927

928+
.. figure:: https://user-images.githubusercontent.com/16560492/101267295-c74c0180-375f-11eb-9ad0-f8e37bd796ce.png
929+
:alt:
930+
892931
.. |image0| image:: https://user-images.githubusercontent.com/16560492/78830052-a3c19300-79e7-11ea-8b9b-4b343ea4049c.png
893932
:target: https://www.linkedin.com/pulse/genetic-algorithm-implementation-python-ahmed-gad
894933
.. |image1| image:: https://user-images.githubusercontent.com/16560492/82078259-26252d00-96e1-11ea-9a02-52a99e1054b9.jpg

0 commit comments

Comments
 (0)