chocoteam / choco-solver

An open-source Java library for Constraint Programming
http://choco-solver.org/
BSD 4-Clause "Original" or "Old" License
687 stars 137 forks source link

Remove randomness by default of BBox strategies #1066

Closed cprudhom closed 11 months ago

cprudhom commented 11 months ago

The main idea is to define how ties are broken in black-box strategies. Previously, ties were broken randomly, which is a kind of admission of powerlessness. I propose, with this PR, to make possible to declare a tie-breaker if needed or let the default one which is based on lexical ordering (=variables input order). Note that this change has few mainly an impact on fresh start when no score are recorded, but as it drives the search to different search space, it may have a huge impact (+ or -) on efficiency. However, now, we can tweak it.

cprudhom commented 11 months ago

I think we should revert the PR and wait for the checks to pass. @ArthurGodet What do you think?

ArthurGodet commented 11 months ago

Yes, I do agree that we should revert the PR until the tests have been updated.

It seems that the 5 failing tests are all based on testing the number of solutions encountered during the search (which is not surprising that they might fail with the new code that break ties).