Остановка по повтореням лучшего значения

This commit is contained in:
2025-10-09 12:25:23 +03:00
parent b7f2234bff
commit 745cfea282
7 changed files with 44 additions and 7 deletions

View File

@@ -11,14 +11,15 @@ config = GARunConfig(
x_min=np.array([-5.12, -5.12]),
x_max=np.array([5.12, 5.12]),
fitness_func=fitness_function,
max_generations=200,
pop_size=25,
pc=0.5,
pm=0.01,
max_generations=200,
max_best_repetitions=10,
minimize=True,
seed=17,
fitness_avg_threshold=0.05,
save_generations=[1, 2, 3, 5, 7, 10, 15],
save_generations=[1, 2, 3, 5, 7, 9, 10, 15, 19],
log_every_generation=True,
)
result = genetic_algorithm(config)