feat: Semantic Minimisation during Conflict Analysis#406
Draft
ImkoMarijnissen wants to merge 47 commits intomainfrom
Draft
feat: Semantic Minimisation during Conflict Analysis#406ImkoMarijnissen wants to merge 47 commits intomainfrom
ImkoMarijnissen wants to merge 47 commits intomainfrom
Conversation
… in semantic minimiser
This reverts commit b99b962.
Contributor
|
This sounds great! Those are nice reductions in conflict. We can discuss next week. Quick points.
|
…tive minimiser when when replaced
Comment on lines
+10
to
+14
| #[derive(Debug, Clone, Default)] | ||
| pub(crate) struct IterativeMinimiser { | ||
| domains: KeyedVec<DomainId, IterativeDomain>, | ||
| replacement_with_equals: bool, | ||
| } |
Comment on lines
+337
to
+345
| while lower_bound != i32::MIN | ||
| && let Some((lb_updated, _)) = self.domains[domain].holes.get(&(lower_bound - 1)) | ||
| && *lb_updated | ||
| && context.get_checkpoint_for_predicate(predicate!(domain != lower_bound - 1)) | ||
| == Some(0) | ||
| { | ||
| lower_bound -= 1; | ||
| context.explain_root_assignment(predicate!(domain != lower_bound)); | ||
| } |
Contributor
There was a problem hiding this comment.
If I understand this correctly, it introduces
Contributor
Author
There was a problem hiding this comment.
It only introduces the hole(s) when we have an element
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #397.
After discussing with @maartenflippo, I implemented a very simple implementation of the
conjoinfunction from "Semantic Learning for Lazy Clause Generation - Feydy et al.".Some anecdotal examples of the effect:
For an RCPSP instance (
01.dzn), the number of failures goes from 3,711 to 3,376 and for another instance (J120_60_5), the number of failures to get to a solution of 108 is reduced from 28,303 to 27,855. Forfoxgeesecorn, the number of failures to get to an objective of 32 goes from 114,811 to 81,268.There are a few things which are not entirely clear to me:
conjoinfunction is underspecified, and it is somewhat unclear what exactly it does; for now, we assume that the elements in the working nogood are in the left side of the rewrite rules, and the added propagation reasons are on the right side of the rewrite rules. It was unclear to us what the reason for this is, but it appears to create incorrect nogoods otherwise.TODOs