@@ -95,17 +95,53 @@ Release Date: 14 May 2020
9595 1. The ``best_solution_fitness `` attribute is renamed to
9696 ``best_solutions_fitness `` (plural solution).
9797
98- .. _header-n42 :
98+ 2. Mutation is applied independently for the genes.
99+
100+ .. _header-n44 :
99101
100102PyGAD 2.2.1
101- ===========
103+ -----------
102104
103105Release Date: 17 May 2020
104106
1051071. Adding 2 extra modules (pygad.nn and pygad.gann) for building and
106108 training neural networks with the genetic algorithm.
107109
108- .. _header-n148 :
110+ .. _header-n49 :
111+
112+ PyGAD 2.2.2
113+ -----------
114+
115+ Release Date: 18 May 2020
116+
117+ 1. The initial value of the ``generations_completed `` attribute of
118+ instances from the pygad.GA class is ``0 `` rather than ``None ``.
119+
120+ 2. An optional bool parameter named ``mutation_by_replacement `` is added
121+ to the constructor of the pygad.GA class. It works only when the
122+ selected type of mutation is random (``mutation_type="random" ``). In
123+ this case, setting ``mutation_by_replacement=True `` means replace the
124+ gene by the randomly generated value. If ``False ``, then it has no
125+ effect and random mutation works by adding the random value to the
126+ gene. This parameter should be used when the gene falls within a
127+ fixed range and its value must not go out of this range. Here are
128+ some examples:
129+
130+ Assume there is a gene with the value 0.5.
131+
132+ If ``mutation_type="random" `` and ``mutation_by_replacement=False ``,
133+ then the generated random value (e.g. 0.1) will be added to the gene
134+ value. The new gene value is **0.5+0.1=0.6 **.
135+
136+ If ``mutation_type="random" `` and ``mutation_by_replacement=True ``,
137+ then the generated random value (e.g. 0.1) will replace the gene
138+ value. The new gene value is **0.1 **.
139+
140+ 3. ``None `` value could be assigned to the ``mutation_type `` and
141+ ``crossover_type `` parameters of the pygad.GA class constructor. When
142+ ``None ``, this means the step is bypassed and has no action.
143+
144+ .. _header-n155 :
109145
110146PyGAD Projects at GitHub
111147========================
@@ -115,7 +151,7 @@ https://pypi.org/project/pygad. PyGAD is built out of a number of
115151open-source GitHub projects. A brief note about these projects is given
116152in the next subsections.
117153
118- .. _header-n44 :
154+ .. _header-n51 :
119155
120156`GeneticAlgorithmPython <https://github.com/ahmedfgad/GeneticAlgorithmPython >`__
121157--------------------------------------------------------------------------------
@@ -126,7 +162,7 @@ GitHub Link: https://github.com/ahmedfgad/GeneticAlgorithmPython
126162is the first project which is an open-source Python 3 project for
127163implementing the genetic algorithm based on NumPy.
128164
129- .. _header-n47 :
165+ .. _header-n54 :
130166
131167`NumPyANN <https://github.com/ahmedfgad/NumPyANN >`__
132168----------------------------------------------------
@@ -140,7 +176,7 @@ neural network without using a training algorithm. Currently, it only
140176supports classification and later regression will be also supported.
141177Moreover, only one class is supported per sample.
142178
143- .. _header-n50 :
179+ .. _header-n57 :
144180
145181`NeuralGenetic <https://github.com/ahmedfgad/NeuralGenetic >`__
146182--------------------------------------------------------------
@@ -153,7 +189,7 @@ projects
153189`GeneticAlgorithmPython <https://github.com/ahmedfgad/GeneticAlgorithmPython >`__
154190and `NumPyANN <https://github.com/ahmedfgad/NumPyANN >`__.
155191
156- .. _header-n53 :
192+ .. _header-n60 :
157193
158194Submitting Issues
159195=================
@@ -170,7 +206,7 @@ is not working properly or to ask for questions.
170206If this is not a proper option for you, then check the **Contact Us **
171207section for more contact details.
172208
173- .. _header-n57 :
209+ .. _header-n64 :
174210
175211Ask for Feature
176212===============
@@ -187,7 +223,7 @@ to ahmed.f.gad@gmail.com.
187223
188224Also check the **Contact Us ** section for more contact details.
189225
190- .. _header-n61 :
226+ .. _header-n68 :
191227
192228Projects Built using PyGAD
193229==========================
@@ -206,15 +242,15 @@ Within your message, please send the following details:
206242
207243- Preferably, a link that directs the readers to your project
208244
209- .. _header-n72 :
245+ .. _header-n79 :
210246
211247For More Information
212248====================
213249
214250There are different resources that can be used to get started with the
215251genetic algorithm and building it in Python.
216252
217- .. _header-n74 :
253+ .. _header-n81 :
218254
219255Tutorial: Implementing Genetic Algorithm in Python
220256--------------------------------------------------
@@ -238,7 +274,7 @@ good resource to start with coding the genetic algorithm.
238274
239275|image0 |
240276
241- .. _header-n85 :
277+ .. _header-n92 :
242278
243279Tutorial: Introduction to Genetic Algorithm
244280-------------------------------------------
@@ -257,7 +293,7 @@ which is available at these links:
257293
258294|image1 |
259295
260- .. _header-n95 :
296+ .. _header-n102 :
261297
262298Tutorial: Build Neural Networks in Python
263299-----------------------------------------
@@ -277,7 +313,7 @@ available at these links:
277313
278314|image2 |
279315
280- .. _header-n105 :
316+ .. _header-n112 :
281317
282318Tutorial: Optimize Neural Networks with Genetic Algorithm
283319---------------------------------------------------------
@@ -297,7 +333,7 @@ available at these links:
297333
298334|image3 |
299335
300- .. _header-n115 :
336+ .. _header-n122 :
301337
302338Book: Practical Computer Vision Applications Using Deep Learning with CNNs
303339--------------------------------------------------------------------------
@@ -323,7 +359,7 @@ Find the book at these links:
323359.. figure :: https://user-images.githubusercontent.com/16560492/78830077-ae7c2800-79e7-11ea-980b-53b6bd879eeb.jpg
324360 :alt:
325361
326- .. _header-n130 :
362+ .. _header-n137 :
327363
328364Contact Us
329365==========
0 commit comments