Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Idea: var distributor that is based on most constraints affected #91

Open
pvdz opened this issue Jun 29, 2016 · 0 comments
Open

Idea: var distributor that is based on most constraints affected #91

pvdz opened this issue Jun 29, 2016 · 0 comments

Comments

@pvdz
Copy link
Contributor

pvdz commented Jun 29, 2016

The main idea of solving domains is to reduce them as fast as possible. Often one step of the search affects only one or two constraints, especially after the first couple of nodes. We should add a var distributor that picks its next var based on how many constraints it affects. The more constraints are affected by a choice, the higher the number of changes should (or at least could) be in the same search node.

  • The list of constraints per var is already generated
  • Runtime can still be tricky since we don't want to maintain an active list of constraints per var per search node.
    • Maybe this count is static throughout the search as long as the variable is unsolved?
    • Propagators can solve before its operand variables solve, like lt is solved when the max of the left var is lower than the min of the right var (since there are no values that could falsify left<right).
  • There's no guarantee that directing the search based on this distribution actually means finding a solution faster. If the key to a solution is only affected by one propagator, which may have been picked quickly before, it may now take a much longer time as it's suddenly the last one to be evaluated. But this is always a potential problem.
  • Many test cases rely on a particular search order. Changing them would mean a lot of updates in the tests.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant