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

SLS #192

Closed
wants to merge 29 commits into from
Closed

SLS #192

wants to merge 29 commits into from

Conversation

shnarazk
Copy link
Owner

@shnarazk shnarazk commented Oct 11, 2022

  • main objective: Stochastic Local Search in Splr #159
  • side effect: 'reluctant', memory pressure based reduction = delete a clause $C$ if $$A_{1} \times (\overline{LBD} + \overline{entanglement})^{0.5} + A_{2}\times|database|^{-0.5} < LBD_{C}$$
  • side effect: Luby reinitialization

base line

$ sat-bench splr-016
# 0.14.1, timeout:2000 on demorgan @ 2022-10-02T09:11:15
# ~/.cargo/bin/splr-016 (0.16.3) @ 2022-09-16T22:26:35
solver,       num,                       target,     time
"splr-016",     1,                 "UF250(100)",   61.353
"splr-016",     2,                "UUF250(100)",  197.929
"splr-016",     3,   "3SAT/360  S722433227-030",  169.532
"splr-016",     4,   "3SAT/360 S2032263657-035",    2.434
"splr-016",     5,   "3SAT/360  S368632549-051",    2.459
"splr-016",     6,   "3SAT/360 S1684547485-073",   12.344
"splr-016",     7,   "3SAT/360 S1711406314-093",   19.522
"splr-016",     8,   "3UNS/360 S1369720750-015",  172.912
"splr-016",     9,   "3UNS/360  S367138237-029",  617.952
"splr-016",    10,   "3UNS/360  S680239195-053",  259.947
"splr-016",    11,   "3UNS/360  S253750560-086",  194.485
"splr-016",    12,   "3UNS/360 S1028159446-096",  253.592
"splr-016",    13,   "[SAT] SR2015/m283,  3553",   46.279
"splr-016",    14,   "[SAT] SR2015/38b,    448",   58.293
"splr-016",    15,   "[SAT] SR2015/44b,    609",   86.086
"splr-016",    16,   "[SAT] SC21/b04_s_unknown",   90.473
"splr-016",    17,   "[SAT] SC21/quad_r21_m22 ",   49.054
"splr-016",    18,   "[SAT] SC21/toughsat_895s",  146.428
"splr-016",    19,   "[UNS] SC21/assoc_mult_e3",  224.545
"splr-016",    20,   "[UNS] SC21/dist4.c      ",  279.228
"splr-016",    21,   "[UNS] SC21/p01_lb_05    ",  237.824
"splr-016",    22,   "[UNS] SC21/shift1add    ",   22.143
med:   118.451, max:   617.952,           total: 3204.814

@shnarazk shnarazk self-assigned this Oct 11, 2022
@shnarazk shnarazk mentioned this pull request Oct 11, 2022
14 tasks
@shnarazk shnarazk linked an issue Oct 11, 2022 that may be closed by this pull request
7 tasks
@shnarazk shnarazk added the new scheme import some idea on papers label Oct 11, 2022
@shnarazk
Copy link
Owner Author

$ sat-bench splr
# 0.14.2, timeout:2000 on demorgan @ 2022-10-19T07:15:48
# ~/.cargo/bin/splr (0.17.0-alpha.3) @ 2022-10-18T23:16:14
solver,       num,                       target,     time
"splr",         1,                 "UF250(100)",  100.086
"splr",         2,                "UUF250(100)",  252.458
"splr",         3,   "3SAT/360  S722433227-030",   16.210
"splr",         4,   "3SAT/360 S2032263657-035",    3.162
"splr",         5,   "3SAT/360  S368632549-051",  419.085
"splr",         6,   "3SAT/360 S1684547485-073",   20.101
"splr",         7,   "3SAT/360 S1711406314-093",    5.807
"splr",         8,   "3UNS/360 S1369720750-015",  198.255
"splr",         9,   "3UNS/360  S367138237-029",  469.281
"splr",        10,   "3UNS/360  S680239195-053",  210.391
"splr",        11,   "3UNS/360  S253750560-086",  177.642
"splr",        12,   "3UNS/360 S1028159446-096",  187.147
"splr",        13,   "[SAT] SR2015/m283,  3553",   41.761
"splr",        14,   "[SAT] SR2015/38b,    448",   37.090
"splr",        15,   "[SAT] SR2015/44b,    609",  259.361
"splr",        16,   "[SAT] SC21/b04_s_unknown",  276.338
"splr",        17,   "[SAT] SC21/quad_r21_m22 ",  190.516
"splr",        18,   "[SAT] SC21/toughsat_895s",  437.878
"splr",        19,   "[UNS] SC21/assoc_mult_e3",  142.669
"splr",        20,   "[UNS] SC21/dist4.c      ",  268.590
"splr",        21,   "[UNS] SC21/p01_lb_05    ",  291.744
"splr",        22,   "[UNS] SC21/shift1add    ",   80.216
med:   188.832, max:   469.281,           total: 4085.788
# ~/Repositories/splr@10-19T07:45:44 7e3ebf68@20221011-SLS*

@shnarazk
Copy link
Owner Author

shnarazk commented Oct 19, 2022

greedy DB

--- a/src/cdb/db.rs
+++ b/src/cdb/db.rs
@@ -1025,7 +1025,9 @@ impl ClauseDBIF for ClauseDB {
         // there're exception. Since this is the pre-stage of clause vivification,
         // we want keep usefull clauses as many as possible.
         // Therefore I save the clauses which will become vivification targets.
-        let thr = (self.lb_entanglement.get_slow() + 1.0).min(self.lbd.get_fast().max(5.0)) as u16;
+        // let thr = (self.lb_entanglement.get_slow() + 1.0).min(self.lbd.get_fast().max(5.0)) as u16;
+        let extra = 100.0 / (self.num_learnt as f64).log2();
+        let thr = ((self.lb_entanglement.get_slow() + self.lbd.get_slow()).log2() + extra) as u16;
         for i in &perm[keep..] {
# 0.14.2, timeout:2000 on demorgan @ 2022-10-19T17:22:03
# ~/.cargo/bin/splr (0.17.0-alpha.3) @ 2022-10-19T14:07:39
solver,       num,                       target,     time
"splr",         1,                 "UF250(100)",   89.492
"splr",         2,                "UUF250(100)",  251.203
"splr",         3,   "3SAT/360  S722433227-030",    5.085
"splr",         4,   "3SAT/360 S2032263657-035",    2.559
"splr",         5,   "3SAT/360  S368632549-051",   84.813
"splr",         6,   "3SAT/360 S1684547485-073",    0.858
"splr",         7,   "3SAT/360 S1711406314-093",   35.819
"splr",         8,   "3UNS/360 S1369720750-015",  173.099
"splr",         9,   "3UNS/360  S367138237-029",  471.490
"splr",        10,   "3UNS/360  S680239195-053",  199.083
"splr",        11,   "3UNS/360  S253750560-086",  171.898
"splr",        12,   "3UNS/360 S1028159446-096",  170.747
"splr",        13,   "[SAT] SR2015/m283,  3553",    8.103
"splr",        14,   "[SAT] SR2015/38b,    448",   31.943
"splr",        15,   "[SAT] SR2015/44b,    609",  328.733
"splr",        16,   "[SAT] SC21/b04_s_unknown",  213.892
"splr",        17,   "[SAT] SC21/quad_r21_m22 ",  198.397
"splr",        18,   "[SAT] SC21/toughsat_895s",  353.960
"splr",        19,   "[UNS] SC21/assoc_mult_e3",  158.588
"splr",        20,   "[UNS] SC21/dist4.c      ",  244.254
"splr",        21,   "[UNS] SC21/p01_lb_05    ",  307.361
"splr",        22,   "[UNS] SC21/shift1add    ",   56.706
med:   171.322, max:   471.490,           total: 3558.083
# ~/Repositories/splr@10-19T17:42:37 09a1739f@20221011-SLS*

@shnarazk shnarazk added the idea My original idea label Oct 20, 2022
@shnarazk shnarazk closed this Nov 2, 2022
shnarazk added a commit that referenced this pull request Jan 30, 2023
- fix #188 
- feature 'reward_annealing' #187
- `Certificate` handles empty clauses correctly #191 
- fix stage calculations #194 
- a better clause reduction #195
- SolverError::OutOfRange -> SolverError::InvalidLiteral #198 
- SLS #159 #192 #199
- fix a build error without feature 'trail_saving' #202
- fix a build error without feature 'rephase' #205 
- two-mode reduction (#208)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
idea My original idea new scheme import some idea on papers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Stochastic Local Search in Splr
1 participant