Closed engintoklu closed 1 year ago
Merging #44 (0f35c54) into master (b92d9bb) will increase coverage by
0.71%
. The diff coverage is78.14%
.
@@ Coverage Diff @@
## master #44 +/- ##
==========================================
+ Coverage 77.05% 77.77% +0.71%
==========================================
Files 47 49 +2
Lines 6533 7319 +786
==========================================
+ Hits 5034 5692 +658
- Misses 1499 1627 +128
Impacted Files | Coverage Δ | |
---|---|---|
src/evotorch/core.py | 74.48% <0.00%> (+0.84%) |
:arrow_up: |
src/evotorch/algorithms/ga.py | 66.85% <57.14%> (+3.63%) |
:arrow_up: |
src/evotorch/tools/structures.py | 79.50% <79.50%> (ø) |
|
src/evotorch/algorithms/mapelites.py | 83.69% <83.69%> (ø) |
|
src/evotorch/tools/misc.py | 86.36% <90.00%> (+0.09%) |
:arrow_up: |
src/evotorch/operators/real.py | 93.00% <91.93%> (+11.39%) |
:arrow_up: |
src/evotorch/algorithms/__init__.py | 100.00% <100.00%> (ø) |
|
src/evotorch/operators/__init__.py | 100.00% <100.00%> (ø) |
|
src/evotorch/tools/__init__.py | 100.00% <100.00%> (ø) |
|
... and 3 more |
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.
I've gone through the code and I'm generally happy. My only request is that maybe we can add an example that uses MAPElites? Although this could be added in a separate PR, I would appreciate a 'sensible use case' of the algorithm to play around with + verify it @engintoklu @pliskowski
This pull request aims to improve the API related to genetic algorithm and its operators. The improvements are as follows:
GeneticAlgorithm
. The classSteadyStateGA
remains, but is now an alias toGeneticAlgorithm
.elitist
toGeneticAlgorithm
. When set as False, the genetic algorithm will adopt a generational behavior, where the best-performing children always replace the worst-performing parents.OnePointCrossOver
operator toMultiPointCrossOver
where the number of points is configurable.OnePointCrossOver
remains as an alias with the number of points fixed as 1. Another alias isTwoPointCrossOver
.PolynomialMutation
.operators
toGeneticAlgorithm
as the recommended way to to specify which operators are to be applied on the population at each generation.MAPElites
algorithm which, similar toGeneticAlgorithm
, allows one to define the operators to be applied at each generation via the keyword argumentoperators
.Co-authored-by: Nihat Engin Toklu engin@nnaisense.com Co-authored-by: Pawel Liskowski pawel@nnaisense.com