-
-
Notifications
You must be signed in to change notification settings - Fork 489
Commit 6659d5d
PyGAD 3.0.0 Release
PyGAD 3.0.0 Release Notes
1. The structure of the library is changed and some methods defined in the `pygad.py` module are moved to the `pygad.utils`, `pygad.helper`, and `pygad.visualize` submodules.
2. The `pygad.utils.parent_selection` module has a class named `ParentSelection` where all the parent selection operators exist. The `pygad.GA` class extends this class.
3. The `pygad.utils.crossover` module has a class named `Crossover` where all the crossover operators exist. The `pygad.GA` class extends this class.
4. The `pygad.utils.mutation` module has a class named `Mutation` where all the mutation operators exist. The `pygad.GA` class extends this class.
5. The `pygad.helper.unique` module has a class named `Unique` some helper methods exist to solve duplicate genes and make sure every gene is unique. The `pygad.GA` class extends this class.
6. The `pygad.visualize.plot` module has a class named `Plot` where all the methods that create plots exist. The `pygad.GA` class extends this class.
```python
...
class GA(utils.parent_selection.ParentSelection,
utils.crossover.Crossover,
utils.mutation.Mutation,
helper.unique.Unique,
visualize.plot.Plot):
...
```
2. Support of using the `logging` module to log the outputs to both the console and text file instead of using the `print()` function. This is by assigning the `logging.Logger` to the new `logger` parameter. Check the [Logging Outputs](https://pygad.readthedocs.io/en/latest/README_pygad_ReadTheDocs.html#logging-outputs) for more information.
3. A new instance attribute called `logger` to save the logger.
4. The function/method passed to the `fitness_func` parameter accepts a new parameter that refers to the instance of the `pygad.GA` class. Check this for an example: [Use Functions and Methods to Build Fitness Function and Callbacks](https://pygad.readthedocs.io/en/latest/README_pygad_ReadTheDocs.html#use-functions-and-methods-to-build-fitness-and-callbacks). #163
5. Update the documentation to include an example of using functions and methods to calculate the fitness and build callbacks. Check this for more details: [Use Functions and Methods to Build Fitness Function and Callbacks](https://pygad.readthedocs.io/en/latest/README_pygad_ReadTheDocs.html#use-functions-and-methods-to-build-fitness-and-callbacks). #92 (comment)
6. Validate the value passed to the `initial_population` parameter.
7. Validate the type and length of the `pop_fitness` parameter of the `best_solution()` method.
8. Some edits in the documentation. #106
9. Fix an issue when building the initial population as (some) genes have their value taken from the mutation range (defined by the parameters `random_mutation_min_val` and `random_mutation_max_val`) instead of using the parameters `init_range_low` and `init_range_high`.
10. The `summary()` method returns the summary as a single-line string. Just log/print the returned string it to see it properly.
11. The `callback_generation` parameter is removed. Use the `on_generation` parameter instead.
12. There was an issue when using the `parallel_processing` parameter with Keras and PyTorch. As Keras/PyTorch are not thread-safe, the `predict()` method gives incorrect and weird results when more than 1 thread is used. #145 ahmedfgad/TorchGA#5 ahmedfgad/KerasGA#6. Thanks to this [StackOverflow answer](https://stackoverflow.com/a/75606666/5426539).
13. Replace `numpy.float` by `float` in the 2 parent selection operators roulette wheel and stochastic universal. #168 1 parent 30dd023 commit 6659d5d
File tree
18 files changed
+1359
-2590
lines changed- docs/source
18 files changed
+1359
-2590
lines changedLines changed: 7 additions & 8 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
14 | 14 |
| |
15 | 15 |
| |
16 | 16 |
| |
17 | - | ||
18 | - | ||
19 | - | ||
20 | - | ||
17 | + | ||
18 | + | ||
19 | + | ||
20 | + | ||
21 | 21 |
| |
22 | 22 |
| |
23 | 23 |
| |
| |||
76 | 76 |
| |
77 | 77 |
| |
78 | 78 |
| |
79 | - | ||
79 | + | ||
80 | 80 |
| |
81 | 81 |
| |
82 | 82 |
| |
| |||
164 | 164 |
| |
165 | 165 |
| |
166 | 166 |
| |
167 | - | ||
167 | + | ||
168 | 168 |
| |
169 | 169 |
| |
170 | 170 |
| |
| |||
280 | 280 |
| |
281 | 281 |
| |
282 | 282 |
| |
283 | - | ||
283 | + | ||
284 | 284 |
| |
285 | 285 |
| |
286 | 286 |
| |
| |||
331 | 331 |
| |
332 | 332 |
| |
333 | 333 |
| |
334 | - |
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1 | 1 |
| |
2 | 2 |
| |
3 | - | ||
3 | + |
Lines changed: 99 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
852 | 852 |
| |
853 | 853 |
| |
854 | 854 |
| |
855 | - | ||
855 | + | ||
856 | 856 |
| |
857 | 857 |
| |
858 | 858 |
| |
| |||
891 | 891 |
| |
892 | 892 |
| |
893 | 893 |
| |
894 | - | ||
894 | + | ||
895 | 895 |
| |
896 | 896 |
| |
897 | 897 |
| |
| |||
1119 | 1119 |
| |
1120 | 1120 |
| |
1121 | 1121 |
| |
1122 | - | ||
1122 | + | ||
1123 | 1123 |
| |
1124 | 1124 |
| |
1125 | 1125 |
| |
| |||
1185 | 1185 |
| |
1186 | 1186 |
| |
1187 | 1187 |
| |
1188 | - | ||
1188 | + | ||
1189 | 1189 |
| |
1190 | 1190 |
| |
1191 | 1191 |
| |
1192 | 1192 |
| |
1193 | 1193 |
| |
1194 | + | ||
1195 | + | ||
1196 | + | ||
1197 | + | ||
1198 | + | ||
1199 | + | ||
1200 | + | ||
1201 | + | ||
1202 | + | ||
1203 | + | ||
1204 | + | ||
1205 | + | ||
1206 | + | ||
1207 | + | ||
1208 | + | ||
1209 | + | ||
1210 | + | ||
1211 | + | ||
1212 | + | ||
1213 | + | ||
1214 | + | ||
1215 | + | ||
1216 | + | ||
1217 | + | ||
1218 | + | ||
1219 | + | ||
1220 | + | ||
1221 | + | ||
1222 | + | ||
1223 | + | ||
1224 | + | ||
1225 | + | ||
1226 | + | ||
1227 | + | ||
1228 | + | ||
1229 | + | ||
1230 | + | ||
1231 | + | ||
1232 | + | ||
1233 | + | ||
1234 | + | ||
1235 | + | ||
1236 | + | ||
1237 | + | ||
1238 | + | ||
1239 | + | ||
1240 | + | ||
1241 | + | ||
1242 | + | ||
1243 | + | ||
1244 | + | ||
1245 | + | ||
1246 | + | ||
1247 | + | ||
1248 | + | ||
1249 | + | ||
1250 | + | ||
1251 | + | ||
1252 | + | ||
1253 | + | ||
1254 | + | ||
1255 | + | ||
1256 | + | ||
1257 | + | ||
1258 | + | ||
1259 | + | ||
1260 | + | ||
1261 | + | ||
1262 | + | ||
1263 | + | ||
1264 | + | ||
1265 | + | ||
1266 | + | ||
1267 | + | ||
1268 | + | ||
1269 | + | ||
1270 | + | ||
1271 | + | ||
1272 | + | ||
1273 | + | ||
1274 | + | ||
1275 | + | ||
1276 | + | ||
1277 | + | ||
1278 | + | ||
1279 | + | ||
1280 | + | ||
1281 | + | ||
1282 | + | ||
1283 | + | ||
1284 | + | ||
1285 | + | ||
1286 | + | ||
1287 | + | ||
1288 | + | ||
1194 | 1289 |
| |
1195 | 1290 |
| |
1196 | 1291 |
| |
|
0 commit comments