In the Discord server there was a question about bounds in connection with iterated search. When I looked into it, I had the feeling the current behavior looks like a bug, but I'm not sure. I'm opening this issue to discuss whether there's need to change something.
So when using iterated search with the *pass_bound=true* option, it will always set the bound of its component search algorithms to *best_bound* which represents the cost of the best solution found in previous iterations. *best_bound* is initialized to the bound set for the iterated_search (infinity by default). Now if iterated search has no bound specified, but the first component search algorithm does, then the bound of the component is overwrtitten with infinity before the search starts. This seems confusing to me (and to the person asking on Discord, apparently). I argue we'd rather want to use the minimum of *best_bound* and the bound of the component in such a case. My suggested change is to change the condition under which the component bound is overwritten from
if (pass_bound) {
current_search->set_bound(best_bound);
}
to
if (pass_bound && best_bound < current_search->get_bound()) {
current_search->set_bound(best_bound);
}
(lines 66-68 of src/search/search_algorithms/iterated_search.cc in today's main branch).
Does this make sense? Or is there a good reason for the way it is implemented now?
|