loco icon indicating copy to clipboard operation
loco copied to clipboard

Allow the specification of different search strategies

Open hadronzoo opened this issue 10 years ago • 3 comments

Rather than always defaulting to minDom_LB, would it be possible to specify other strategies?

hadronzoo avatar Nov 10 '15 04:11 hadronzoo

Other strategies are on the radar. Thanks for submitting.

On Monday, November 9, 2015, Joshua Griffith [email protected] wrote:

Rather than always defaulting to minDom_LB, would it be possible to specify other strategies?

— Reply to this email directly or view it on GitHub https://github.com/aengelberg/loco/issues/11.

aengelberg avatar Nov 10 '15 05:11 aengelberg

Choco also allows users to define their own search strategy (variable and value ordering, http://choco-solver.org/user_guide/4_advanced.html#defining-its-own-search-strategy). For complex CSPs a good custom strategy can greatly speed up the search process, or help to find a better first solution.

Thanks!

Torsten

tanders avatar Apr 01 '16 20:04 tanders

Exposing custom strategies through a Clojure interface would be tough, especially while keeping the Choco solve performant. A strategy is basically a function that takes an array of variables and returns a variable. It would be confusing for the Loco user to declare constraints with keyword variables and then have to manipulate Choco variable objects at solve-time. I'll have to give it more thought.

I'm definitely going to add in the existing Choco built-in strategies when I get the chance (and it's low-hanging fruit for anyone who wants to contribute).

aengelberg avatar Apr 08 '16 07:04 aengelberg