Crossover bug for specific parameters of optimiser
The following error occurs in crossover:
How to reproduce:
is_closed = True
geometry = Geometry2D(is_closed=is_closed)
domain = Domain(allowed_area=[(0, 0),
(0, 300),
(300, 300),
(300, 0),
(0, 0)],
geometry=geometry,
max_poly_num=20,
min_poly_num=1,
max_points_num=20,
min_points_num=5,
is_closed=is_closed)
task_setup = Setup(domain=domain)
# Optimizing stage
start = timeit.default_timer()
optimized_structure = optimize(task_setup=task_setup,
objective_function=partial(multi_loss,
expected_poly_num=expected_poly_num),
pop_size=100,
max_gens=100)
Note:
bug occurs more frequently if max_poly_num is large.