-
Notifications
You must be signed in to change notification settings - Fork 33
feat: Add a new nogood management scheme, replacing the tiered system #455
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
base: main
Are you sure you want to change the base?
Changes from all commits
569fbbf
4d1f420
6da2a05
46efb60
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -6,34 +6,14 @@ pub struct LearningOptions { | |
| pub max_activity: f32, | ||
| /// Determines the factor by which the activities are divided when a conflict is found. | ||
| pub activity_decay_factor: f32, | ||
| /// The solver partitions the nogoods into three tiers. | ||
| /// | ||
| /// This limit specifies how many nogoods can be stored in the "high" LBD tier. | ||
| pub max_num_high_lbd_nogoods: usize, | ||
| /// The solver partitions the nogoods into three tiers. | ||
| /// | ||
| /// This limit specifies how many nogoods can be stored in the "mid" LBD tier. | ||
| pub max_num_mid_lbd_nogoods: usize, | ||
| /// The solver partitions the nogoods into three tiers. | ||
| /// | ||
| /// This limit specifies how many nogoods can be stored in the "low" LBD tier. | ||
| pub max_num_low_lbd_nogoods: usize, | ||
| /// Used to determine which tier a nogood belongs in. | ||
| /// | ||
| /// If the LBD of a nogood is higher than or equal to this threshold then it is considered to | ||
| /// be a "high" LBD nogood. | ||
| /// | ||
| /// If the LBD of a nogood is between [`LearningOptions::lbd_threshold_high`] and | ||
| /// [`LearningOptions::lbd_threshold_low`] then it is considered a "mid" LBD nogood. | ||
| pub lbd_threshold_high: u32, | ||
| /// Used to determine which tier a nogood belongs in. | ||
| /// | ||
| /// If the LBD of a nogood is lower than or equal to this value then it is considered to be a | ||
| /// "low" LBD nogood. | ||
| /// | ||
| /// If the LBD of a nogood is between [`LearningOptions::lbd_threshold_high`] and | ||
| /// [`LearningOptions::lbd_threshold_low`] then it is considered a "mid" LBD nogood. | ||
| pub lbd_threshold_low: u32, | ||
| /// The maximum number of nogoods that the solver stores. | ||
| pub current_max_num_nogoods: usize, | ||
| /// The factor by which the maximum number of nogoods is increased after each database | ||
| /// reduction. For the database to grow, it should be greater than 1. For example, the | ||
| /// default value of 1.1 means the database grows by 10% (e.g. 40_000 -> 44_000). | ||
| pub max_num_nogoods_increment: f32, | ||
| /// The upper limit for the number of stored nogoods. | ||
| pub num_nogoods_upper_limit: usize, | ||
| /// Specifies by how much the activity is increased when a nogood is bumped. | ||
| pub activity_bump_increment: f32, | ||
| } | ||
|
|
@@ -42,11 +22,9 @@ impl Default for LearningOptions { | |
| Self { | ||
| max_activity: 1e20, | ||
| activity_decay_factor: 0.99, | ||
| max_num_high_lbd_nogoods: 20000, | ||
| max_num_mid_lbd_nogoods: 7000, | ||
| max_num_low_lbd_nogoods: 100000, | ||
| lbd_threshold_high: 7, | ||
| lbd_threshold_low: 3, | ||
| current_max_num_nogoods: 40000, | ||
| max_num_nogoods_increment: 1.1, | ||
|
Comment on lines
+25
to
+26
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is there any reasoning for these numbers? Especially
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Initially, I chose these values as a blend of parameters used in several solvers. The fact that I also did a quick comparison of performance using different parameters: It turned out that the initial values were quite good. Potentially lowering |
||
| num_nogoods_upper_limit: 1_000_000_000, | ||
| activity_bump_increment: 1.0, | ||
| } | ||
| } | ||
|
|
||


There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be good to add the text that you added in the PR here, explaining hwo it is used