Repository navigation
Use pro_m=1 for polynomial mutation in ten algorithms (pro_m=1/D mutated each gene with probability 1/D²) - #47
Merged
Conversation
evox's polynomial_mutation already divides pro_m by the number of decision variables, so pro_m=1/D gave a per-gene mutation probability of 1/D^2 (1/900 on 30-variable ZDT1), almost no mutation. Use the default pro_m=1, i.e. 1/D per gene, which is PlatEMO's proM = 1 and what the other algorithms here use. Affects BiGE, CMOEA_MS, CMOPSO, EFRRR, KnEA, MaOEACSS, NSGAII_SDR, TSNSGAII, TSSparseEA and WOF.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
evox.operators.mutation.polynomial_mutationselects mutation sites withtorch.rand(n, d) < pro_m / d, sopro_mis the expected number of mutated genes per solution, and the defaultpro_m=1gives the usual 1/D per gene (PlatEMO'sproM = 1).Ten algorithms pass
pro_m=1.0 / D(asself.lb.numel(),D,self.dimorself.pop.shape[1]). That makes the per-gene probability 1/D²: 1/900 for 30-variable ZDT1, i.e. about one gene in thirty solutions. This PR drops the argument so they use the default, like the other algorithms in EvoMO:BiGE, CMOEA_MS, CMOPSO, EFRRR, KnEA, MaOEACSS, NSGAII_SDR, TSNSGAII, TSSparseEA, WOF.
IGD after 150 generations,
pop_size=100, seeds 0–2 (mean):ZDT1, which needs mutation to converge in 30 variables, improves 3–13× for most of them. DTLZ2 changes little either way. CMOPSO is slightly worse on both, since it relies mostly on its particle update.
* TSNSGAII on
mainhas the selection problems fixed in #46. With #46 applied, this change keeps DTLZ2 at 0.0541 (0.0540 without it) and brings ZDT1 from 0.0837 to 0.0198, so the DTLZ2 number above is an artefact of the unfixed selection.unit_test/algorithms/test_moea_generated.pypasses. Thetest_moea.pyfailures I see locally are the same eight compiled tests onmain(no MSVC fortorch.compilehere), all for algorithms this PR does not touch.ruff checkis clean.This was prepared with AI assistance (Claude); I reviewed and tested the change.