You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/md/helper.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -38,4 +38,5 @@ The `pygad.helper.misc` module has a class called `Helper` with some methods to
38
38
10.`generate_gene_value()`: Generates a value for the gene. It checks whether `gene_space` is `None` and calls either `generate_gene_value_randomly()` or `generate_gene_value_from_space()`.
39
39
11.`filter_gene_values_by_constraint()`: Receives a list of values for a gene. Then it filters such values using the gene constraint.
40
40
12.`get_valid_gene_constraint_values()`: Selects one valid gene value that satisfy the gene constraint. It simply calls `generate_gene_value()` to generate some gene values then it filters such values using `filter_gene_values_by_constraint()`.
41
+
13.`initialize_parents_array()`: Usually called from the methods in the `ParentSelection` class in the `pygad/utils/parent_selection.py` script to initialize the parents array.
Copy file name to clipboardExpand all lines: docs/md/releases.md
+27-16Lines changed: 27 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -613,22 +613,33 @@ Release Date 08 July 2025
613
613
1. Support passing a class to the fitness, crossover, and mutation. https://github.com/ahmedfgad/GeneticAlgorithmPython/issues/342
614
614
2. A new class called `Validation` is created in the new `pygad/utils/validation.py` script. It has a method called `validate_parameters()` to validate all the parameters passed while instantiating the `pygad.GA` class.
615
615
3. Refactoring the `pygad.py` script by moving a lot of functions and methods to other classes in other scripts.
616
-
1. The `summary()` method was moved to `Helper` class in the `pygad/helper/misc.py` script.
617
-
2. The validation code in the `__init__()` method of the `pygad.GA` class is moved to the new `validate_parameters()` method in the new `Validation` class in the new `pygad/utils/validation.py` script. Moreover, the `validate_multi_stop_criteria()` method is also moved to the same class.
618
-
3. The GA main workflow is moved into the new `GAEngine` class in the new `pygad/utils/engine.py` script. Specifically, these methods are moved from the `pygad.GA` class to the new `GAEngine` class:
619
-
1. run()
620
-
2. run_loop_head()
621
-
3. run_select_parents()
622
-
4. run_crossover()
623
-
5. run_mutation()
624
-
6. run_update_population()
625
-
7. initialize_population()
626
-
8. cal_pop_fitness()
627
-
9. best_solution()
628
-
10. round_genes()
629
-
4. The `pygad.GA` class now extends the two new classes `utils.validation.Validation` and `utils.engine.GAEngine`.
630
-
5. The version of the `pygad.utils` submodule is upgraded from `1.3.0` to `1.4.0`.
631
-
6. The version of the `pygad.helper` submodule is upgraded from `1.2.0` to `1.3.0`.
616
+
4. The `summary()` method was moved to `Helper` class in the `pygad/helper/misc.py` script.
617
+
5. The validation code in the `__init__()` method of the `pygad.GA` class is moved to the new `validate_parameters()` method in the new `Validation` class in the new `pygad/utils/validation.py` script. Moreover, the `validate_multi_stop_criteria()` method is also moved to the same class.
618
+
6. The GA main workflow is moved into the new `GAEngine` class in the new `pygad/utils/engine.py` script. Specifically, these methods are moved from the `pygad.GA` class to the new `GAEngine` class:
619
+
1. run()
620
+
2. run_loop_head()
621
+
3. run_select_parents()
622
+
4. run_crossover()
623
+
5. run_mutation()
624
+
6. run_update_population()
625
+
7. initialize_population()
626
+
8. cal_pop_fitness()
627
+
9. best_solution()
628
+
10. round_genes()
629
+
7. The `pygad.GA` class now extends the two new classes `utils.validation.Validation` and `utils.engine.GAEngine`.
630
+
8. The version of the `pygad.utils` submodule is upgraded from `1.3.0` to `1.4.0`.
631
+
9. The version of the `pygad.helper` submodule is upgraded from `1.2.0` to `1.3.0`.
632
+
10. Update the elitism after the evolution ends to fix issue where the best solution returned by the `best_solution()` method is not correct. https://github.com/ahmedfgad/GeneticAlgorithmPython/issues/337
633
+
11. Fix a bug in calling the `numpy.reshape()` function. The parameter `newshape` is removed since it is no longer supported started from NumPy `2.4.0`. https://numpy.org/doc/stable/release/2.4.0-notes.html#removed-newshape-parameter-from-numpy-reshape
634
+
12. A minor change in the documentation is made to replace the `newshape` parameter when calling `numpy.reshape()`.
635
+
13. Fix a bug in the `visualize/plot.py` script that causes a warning to be given when the plot leged is used with single-objective problems.
636
+
14. A new method called `initialize_parents_array()` is added to the `Helper` class in the `pygad/helper/misc.py` script. It is usually called from the methods in the `ParentSelection` class in the `pygad/utils/parent_selection.py` script to initialize the parents array.
637
+
15. Add more tests to test:
638
+
1) Operators (crossover, mutation, and parent selection).
0 commit comments