1+ =========
2+ Footer.md
3+ =========
4+
15.. _header-n0 :
26
37Release History
@@ -166,7 +170,45 @@ Release date: 1 June 2020
1661706. The name of the ``pygad.nn.train_network() `` function is changed to
167171 ``pygad.nn.train() ``.
168172
169- .. _header-n77 :
173+ .. _header-n214 :
174+
175+ PyGAD 2.4.0
176+ -----------
177+
178+ Release date: 5 July 2020
179+
180+ 1. A new parameter named ``delay_after_gen `` is added which accepts a
181+ non-negative number specifying the time in seconds to wait after a
182+ generation completes and before going to the next generation. It
183+ defaults to ``0.0 `` which means no delay after the generation.
184+
185+ 2. The passed function to the ``callback_generation `` parameter of the
186+ pygad.GA class constructor can terminate the execution of the genetic
187+ algorithm if it returns the string ``stop ``. This causes the
188+ ``run() `` method to stop.
189+
190+ One important use case for that feature is to stop the genetic
191+ algorithm when a condition is met before passing though all the
192+ generations. The user may assigned a value of 100 to the
193+ ``num_generations `` parameter of the pygad.GA class constructor.
194+ Assuming that at generation 50, for example, a condition is met and
195+ the user wants to stop the execution before waiting the remaining 50
196+ generations. To do that, just make the function passed to the
197+ ``callback_generation `` parameter to return the string ``stop ``.
198+
199+ Here is an example of a function to be passed to the
200+ ``callback_generation `` parameter which stops the execution if the
201+ fitness value 70 is reached. The value 70 might be the best possible
202+ fitness value. After being reached, then there is no need to pass
203+ through more generations because no further improvement is possible.
204+
205+ .. code :: python
206+
207+ def func_generation (ga_instance ):
208+ if ga_instance.best_solution()[1 ] >= 70 :
209+ return " stop"
210+
211+ .. _header-n219 :
170212
171213PyGAD Projects at GitHub
172214========================
@@ -226,7 +268,7 @@ convolutional neural networks using NumPy. The purpose of this project
226268is to only implement the **forward pass ** of a convolutional neural
227269network without using a training algorithm.
228270
229- .. _header-n212 :
271+ .. _header-n91 :
230272
231273`CNNGenetic <https://github.com/ahmedfgad/CNNGenetic >`__
232274--------------------------------------------------------
@@ -238,7 +280,7 @@ convolutional neural networks using the genetic algorithm. It uses the
238280`GeneticAlgorithmPython <https://github.com/ahmedfgad/GeneticAlgorithmPython >`__
239281project for building the genetic algorithm.
240282
241- .. _header-n216 :
283+ .. _header-n94 :
242284
243285Submitting Issues
244286=================
@@ -255,7 +297,7 @@ is not working properly or to ask for questions.
255297If this is not a proper option for you, then check the **Contact Us **
256298section for more contact details.
257299
258- .. _header-n95 :
300+ .. _header-n98 :
259301
260302Ask for Feature
261303===============
@@ -272,7 +314,7 @@ to ahmed.f.gad@gmail.com.
272314
273315Also check the **Contact Us ** section for more contact details.
274316
275- .. _header-n99 :
317+ .. _header-n102 :
276318
277319Projects Built using PyGAD
278320==========================
@@ -291,15 +333,15 @@ Within your message, please send the following details:
291333
292334- Preferably, a link that directs the readers to your project
293335
294- .. _header-n110 :
336+ .. _header-n113 :
295337
296338For More Information
297339====================
298340
299341There are different resources that can be used to get started with the
300342genetic algorithm and building it in Python.
301343
302- .. _header-n112 :
344+ .. _header-n115 :
303345
304346Tutorial: Implementing Genetic Algorithm in Python
305347--------------------------------------------------
@@ -323,7 +365,7 @@ good resource to start with coding the genetic algorithm.
323365
324366|image0 |
325367
326- .. _header-n123 :
368+ .. _header-n126 :
327369
328370Tutorial: Introduction to Genetic Algorithm
329371-------------------------------------------
@@ -342,7 +384,7 @@ which is available at these links:
342384
343385|image1 |
344386
345- .. _header-n133 :
387+ .. _header-n136 :
346388
347389Tutorial: Build Neural Networks in Python
348390-----------------------------------------
@@ -362,7 +404,7 @@ available at these links:
362404
363405|image2 |
364406
365- .. _header-n143 :
407+ .. _header-n146 :
366408
367409Tutorial: Optimize Neural Networks with Genetic Algorithm
368410---------------------------------------------------------
@@ -382,7 +424,7 @@ available at these links:
382424
383425|image3 |
384426
385- .. _header-n153 :
427+ .. _header-n156 :
386428
387429Tutorial: Building CNN in Python
388430--------------------------------
@@ -408,7 +450,7 @@ good resource to start with coding CNNs.
408450
409451|image4 |
410452
411- .. _header-n166 :
453+ .. _header-n169 :
412454
413455Tutorial: Derivation of CNN from FCNN
414456-------------------------------------
@@ -427,7 +469,7 @@ which is available at these links:
427469
428470|image5 |
429471
430- .. _header-n176 :
472+ .. _header-n179 :
431473
432474Book: Practical Computer Vision Applications Using Deep Learning with CNNs
433475--------------------------------------------------------------------------
@@ -453,7 +495,7 @@ Find the book at these links:
453495.. figure :: https://user-images.githubusercontent.com/16560492/78830077-ae7c2800-79e7-11ea-980b-53b6bd879eeb.jpg
454496 :alt:
455497
456- .. _header-n191 :
498+ .. _header-n194 :
457499
458500Contact Us
459501==========
0 commit comments