diff --git a/src/evomo/algorithms/bige.py b/src/evomo/algorithms/bige.py index c3fb15c..4c5b752 100644 --- a/src/evomo/algorithms/bige.py +++ b/src/evomo/algorithms/bige.py @@ -109,7 +109,7 @@ def step(self) -> None: # 2. Variation offspring = simulated_binary(self.pop[mating_idx], pro_c=1.0, dis_c=20.0) - offspring = polynomial_mutation(offspring, self.lb, self.ub, pro_m=1.0 / self.lb.numel(), dis_m=20.0) + offspring = polynomial_mutation(offspring, self.lb, self.ub, dis_m=20.0) offspring = clamp(offspring, self.lb, self.ub) # 3. Evaluation diff --git a/src/evomo/algorithms/cmoea_ms.py b/src/evomo/algorithms/cmoea_ms.py index 64aaa8c..bf74a07 100644 --- a/src/evomo/algorithms/cmoea_ms.py +++ b/src/evomo/algorithms/cmoea_ms.py @@ -115,7 +115,7 @@ def step(self) -> None: if self.op_type == 1: off_pop = simulated_binary(parents, pro_c=1.0, dis_c=20.0) - off_pop = polynomial_mutation(off_pop, self.lb, self.ub, pro_m=1.0 / self.lb.numel(), dis_m=20.0) + off_pop = polynomial_mutation(off_pop, self.lb, self.ub, dis_m=20.0) else: # DE logic: current-to-best style or similar # Using parents as a base for variation diff --git a/src/evomo/algorithms/cmopso.py b/src/evomo/algorithms/cmopso.py index 5e875b6..270aaf8 100644 --- a/src/evomo/algorithms/cmopso.py +++ b/src/evomo/algorithms/cmopso.py @@ -112,7 +112,7 @@ def step(self) -> None: off_pop = clamp(off_pop, self.lb, self.ub) # Polynomial Mutation - off_pop = polynomial_mutation(off_pop, self.lb, self.ub, pro_m=1.0 / D, dis_m=20.0) + off_pop = polynomial_mutation(off_pop, self.lb, self.ub, dis_m=20.0) # 4. Evaluation off_fit = self.evaluate(off_pop) diff --git a/src/evomo/algorithms/efr_rr.py b/src/evomo/algorithms/efr_rr.py index 54d9197..1b02840 100644 --- a/src/evomo/algorithms/efr_rr.py +++ b/src/evomo/algorithms/efr_rr.py @@ -93,7 +93,7 @@ def step(self) -> None: # Variation crossovered = simulated_binary(self.pop[mating_pool], pro_c=1.0, dis_c=20.0) - offspring = polynomial_mutation(crossovered, self.lb, self.ub, pro_m=1.0 / self.lb.numel(), dis_m=20.0) + offspring = polynomial_mutation(crossovered, self.lb, self.ub, dis_m=20.0) offspring = clamp(offspring, self.lb, self.ub) # 2. Evaluation diff --git a/src/evomo/algorithms/knea.py b/src/evomo/algorithms/knea.py index 234b3ab..ac1a337 100644 --- a/src/evomo/algorithms/knea.py +++ b/src/evomo/algorithms/knea.py @@ -138,7 +138,7 @@ def step(self) -> None: # Variation crossovered = simulated_binary(self.pop[mating_pool], pro_c=1.0, dis_c=20.0) - offspring = polynomial_mutation(crossovered, self.lb, self.ub, pro_m=1.0 / self.pop.shape[1], dis_m=20.0) + offspring = polynomial_mutation(crossovered, self.lb, self.ub, dis_m=20.0) offspring = clamp(offspring, self.lb, self.ub) # 2. Evaluation diff --git a/src/evomo/algorithms/maoea_css.py b/src/evomo/algorithms/maoea_css.py index d812c80..adc822a 100644 --- a/src/evomo/algorithms/maoea_css.py +++ b/src/evomo/algorithms/maoea_css.py @@ -160,7 +160,7 @@ def step(self) -> None: # 2. Variation off_pop = simulated_binary(self.pop[final_idx], pro_c=1.0, dis_c=20.0) - off_pop = polynomial_mutation(off_pop, self.lb, self.ub, pro_m=1.0 / self.dim, dis_m=20.0) + off_pop = polynomial_mutation(off_pop, self.lb, self.ub, dis_m=20.0) off_pop = clamp(off_pop, self.lb, self.ub) off_fit = self.evaluate(off_pop) diff --git a/src/evomo/algorithms/nsga2_sdr.py b/src/evomo/algorithms/nsga2_sdr.py index ff7661d..e877aaa 100644 --- a/src/evomo/algorithms/nsga2_sdr.py +++ b/src/evomo/algorithms/nsga2_sdr.py @@ -204,7 +204,7 @@ def step(self) -> None: # 2. Variation crossovered = simulated_binary(self.pop[mating_pool], pro_c=1.0, dis_c=20.0) - offspring = polynomial_mutation(crossovered, self.lb, self.ub, pro_m=1.0 / self.lb.numel(), dis_m=20.0) + offspring = polynomial_mutation(crossovered, self.lb, self.ub, dis_m=20.0) offspring = clamp(offspring, self.lb, self.ub) # 3. Evaluation diff --git a/src/evomo/algorithms/ts_nsga2.py b/src/evomo/algorithms/ts_nsga2.py index b464d7d..c423058 100644 --- a/src/evomo/algorithms/ts_nsga2.py +++ b/src/evomo/algorithms/ts_nsga2.py @@ -86,7 +86,7 @@ def step(self) -> None: """ mating_pool = tournament_selection_multifit(self.pop_size, [self.d2, self.front_no.float()], tournament_size=2) offspring = simulated_binary(self.pop[mating_pool], pro_c=1.0, dis_c=20.0) - offspring = polynomial_mutation(offspring, self.lb, self.ub, pro_m=1.0 / self.lb.numel(), dis_m=20.0) + offspring = polynomial_mutation(offspring, self.lb, self.ub, dis_m=20.0) offspring = clamp(offspring, self.lb, self.ub) # 2. Evaluation diff --git a/src/evomo/algorithms/ts_sparseea.py b/src/evomo/algorithms/ts_sparseea.py index 18bf93b..b5dfeaf 100644 --- a/src/evomo/algorithms/ts_sparseea.py +++ b/src/evomo/algorithms/ts_sparseea.py @@ -210,7 +210,7 @@ def step(self) -> None: # 3. Dec Variation (SBX + PM) parent_pop = self.pop[mating_pool] off_pop_dec = simulated_binary(parent_pop, pro_c=1.0, dis_c=20.0) - off_pop_dec = polynomial_mutation(off_pop_dec, self.lb, self.ub, pro_m=1.0 / D, dis_m=20.0) + off_pop_dec = polynomial_mutation(off_pop_dec, self.lb, self.ub, dis_m=20.0) off_pop_dec = clamp(off_pop_dec, self.lb, self.ub) # 4. Match Operator (The Core Logic - Bug #29) diff --git a/src/evomo/algorithms/wof.py b/src/evomo/algorithms/wof.py index 17e512e..6e02361 100644 --- a/src/evomo/algorithms/wof.py +++ b/src/evomo/algorithms/wof.py @@ -150,7 +150,7 @@ def step(self) -> None: mating_pool = tournament_selection_multifit(N, [-dist, rank.float()], tournament_size=2) offspring = simulated_binary(self.pop[mating_pool], pro_c=1.0, dis_c=20.0) - offspring = polynomial_mutation(offspring, self.lb, self.ub, pro_m=1.0 / self.dim, dis_m=20.0) + offspring = polynomial_mutation(offspring, self.lb, self.ub, dis_m=20.0) offspring = clamp(offspring, self.lb, self.ub) fit_off = self.evaluate(offspring)