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

Switch to average function, Introduce StageManager #161

Merged
merged 10 commits into from
Apr 2, 2022

Conversation

shnarazk
Copy link
Owner

@shnarazk shnarazk commented Feb 25, 2022

See #160

Design Decisions to be noted

  • Change the definition of ProgressASG. It counts the number of literals after restarts.
  • Rename lbd_of_dp to literal block entanglement. skipping inner-block glue clauses.

Dynamic control of restart threshold by StageManager and RestartManager

  • The restart module uses the accumulative sum of the trend of learnts' LBDs. instead of the trend itself. As a result, counters in the module were eliminated and the decision-making got simple. The blocking restart mechanism was retired.
  • The sum of the trend of LB distances is better than the sum of the trend of LB entanglement.
  • The stage-level stabilization doesn't seem to work.
  • The pre/in processor was demoted as an on-the-fly module.

@shnarazk shnarazk linked an issue Feb 25, 2022 that may be closed by this pull request
@shnarazk shnarazk added the type system Changes on types for safety or generality label Feb 26, 2022
@shnarazk shnarazk mentioned this pull request Feb 26, 2022
4 tasks
@shnarazk
Copy link
Owner Author

switch to splr-ema crate, using EMA2

$ sat-bench -3 -U 250 -m -s splr-014 splr
# 0.12.0, timeout:2000 on demorgan @ 2022-02-27T09:32:52
solver,       num,                       target,     time
# ~/.cargo/bin/splr-014 (0.14.0) @ 2021-11-01T21:56:28
"splr-014",     1,                 "UF250(100)",   76.285
"splr-014",     2,                "UUF250(100)",  218.389
"splr-014",     3,   "3SAT/360  S144043535-002",  126.902
"splr-014",     4,   "3SAT/360  S722433227-030",  120.995
"splr-014",     5,   "3SAT/360 S1459690542-033",    0.760
"splr-014",     6,   "3SAT/360 S2032263657-035",  126.902
"splr-014",     7,   "3SAT/360 S1293537826-039", 1399.708
"splr-014",     8,   "3SAT/360  S368632549-051",  972.926
"splr-014",     9,   "3SAT/360 S1448866403-060",   40.916
"splr-014",    10,   "3SAT/360 S1684547485-073",   19.332
"splr-014",    11,   "3SAT/360 S1826927554-087",   22.424
"splr-014",    12,   "3SAT/360 S1711406314-093",    2.654
"splr-014",    13,   "3UNS/360  S404185236-001", 1011.762
"splr-014",    14,   "3UNS/360 S1369720750-015",  184.504
"splr-014",    15,   "3UNS/360   S23373420-028", 1425.116
"splr-014",    16,   "3UNS/360  S367138237-029",  808.089
"splr-014",    17,   "3UNS/360  S305156909-031",  353.240
"splr-014",    18,   "3UNS/360  S680239195-053",  323.401
"splr-014",    19,   "3UNS/360 S2025517367-061", 1416.731
"splr-014",    20,   "3UNS/360  S253750560-086",  339.109
"splr-014",    21,   "3UNS/360 S1906521511-089",  331.556
"splr-014",    22,   "3UNS/360 S1028159446-096",  188.186
"splr-014",    23,                "SR2015/itox",    5.838
"splr-014",    24,                "SR2015/m283",   45.137
"splr-014",    25,                 "SR2015/38b",   31.175
"splr-014",    26,                 "SR2015/44b",  195.711
median,   186.345,                        total, 9787.748
# ~/.cargo/bin/splr (0.15.0-alpha1) @ 2022-02-27T09:32:42
"splr",         1,                 "UF250(100)",   75.502
"splr",         2,                "UUF250(100)",  216.458
"splr",         3,   "3SAT/360  S144043535-002",  145.312
"splr",         4,   "3SAT/360  S722433227-030",  139.582
"splr",         5,   "3SAT/360 S1459690542-033",    0.776
"splr",         6,   "3SAT/360 S2032263657-035",    9.466
"splr",         7,   "3SAT/360 S1293537826-039",  734.679
"splr",         8,   "3SAT/360  S368632549-051",  279.335
"splr",         9,   "3SAT/360 S1448866403-060",   42.320
"splr",        10,   "3SAT/360 S1684547485-073",   19.683
"splr",        11,   "3SAT/360 S1826927554-087",   23.064
"splr",        12,   "3SAT/360 S1711406314-093",    2.647
"splr",        13,   "3UNS/360  S404185236-001",  318.764
"splr",        14,   "3UNS/360 S1369720750-015",  182.520
"splr",        15,   "3UNS/360   S23373420-028",  744.512
"splr",        16,   "3UNS/360  S367138237-029",  821.207
"splr",        17,   "3UNS/360  S305156909-031",  357.182
"splr",        18,   "3UNS/360  S680239195-053",  326.771
"splr",        19,   "3UNS/360 S2025517367-061", 1386.609
"splr",        20,   "3UNS/360  S253750560-086",  339.828
"splr",        21,   "3UNS/360 S1906521511-089",  339.388
"splr",        22,   "3UNS/360 S1028159446-096",  191.236
"splr",        23,                "SR2015/itox",    6.201
"splr",        24,                "SR2015/m283",   45.131
"splr",        25,                 "SR2015/38b",   30.879
"splr",        26,                 "SR2015/44b",  192.023
median,   186.878,                        total, 6971.075

@shnarazk shnarazk linked an issue Feb 27, 2022 that may be closed by this pull request
…saving and vivification (#163)

* (reduce) implement dynamic reduction rate

* tweak processor parameters

* +Luby reduction

* keep very small learnt clauses after clause reduction

* (search) rename local variables

* the best

* probably better setting

* refactored and tweak parameters

* add splr-luby

* use splr_luby

* ditto

* select reduction targets based on Luby stabilization span; very fast against problems with small N

* new file:   src/solver/stage.rs; introduce StageManager

* splr-luby/src/lib.rs: add more methods

* refactor StageManager and State

* (reduce) revert some changes

* (RestartIF) s/set_stabilization/set_sensibility/

* tiny refactor

* (search) tiny changes

* (search) StageManager controls simplify invocation directly

* types.rs export SolverEvent; implement Instantiate for StageManager

* (StageManager) s/threshold/end_of_stage/

* (StageManager) reorganize local names

* more refactoring (#164)

* Cargo.toml: disable "dynamci_restart_threshold" temporally

* All generated clauses are supposed to be killed unless ...

* splr-ema: version 0.1.1; add `EmaIF::set_value` and `Ema::with_value`

* (search) fix type

* (trail_saving.rs) parameter tuning

* a bad direction

* quick fix

* (Eliminator::eliminate_combination_limit) delete and define as a local constant

* renamed:    src/processor/eliminator.rs -> src/processor/simplify.rs

* rename 'lbd of dp' to 'literal block entanglement'

* move Restarter::lbd to ClauseDB

* move Restarter::asg to AssignStack as `assign_rate`

* splr-ema::Ewa2: add a cache field to hold `1.0 - decay`

* restart.rs: reorganize `cfg(feature = "Luby_restart")`

* remove meaningless dereference of `as_view`

* tweak the initial values of `AssignStack::level` to set valid values to given clauses

* increase `ClauseDB:;lbd` when a new assignment is found

* update the initial value of `rst_lbd_thr` based on experimentation

* increase `ClauseDB:;lbd` when a new assignment is found (part 2)

* cargo test

* parameter tuning; use cfg! macro instead of cfg attribute

* rename 'depG' label to 'entg'

* (num_reducible) parameter tuning

* (num_reducible) tiny parameter change

* AssignStack: add stage_scale

* implement stage-controlled trail-saving

* implement stage-controlled var activity rescaling

* renamed:    misc/search.tex -> misc/algorithm.tex
@shnarazk shnarazk changed the title Switch to average function Switch to average function, Introduce StageManager Mar 12, 2022
@shnarazk shnarazk marked this pull request as ready for review April 2, 2022 13:34
@shnarazk shnarazk merged commit 1219143 into dev-0.15.0 Apr 2, 2022
shnarazk added a commit that referenced this pull request Apr 3, 2022
- Add `RestartManager` and Remove `GeometricStabilizer` #161
- Switch from a decision-making model to a simple dynamics model for restart #164 
- `RestartManager` is stored in `State`.
- revise the definition of 'literal block entanglement' to accumulate only inter-block clauses (1 < LBD).
- Move some EMAs in `rst` to `asg' and `cdb`. #164 
- Rescale var activity after the end of the 2nd-level cycle of the Luby series. #163 
- Restart stages change the trail-saving setting. #163 
- The pre/in processor was demoted as an on-the-fly module.
- Add `StageManager`, which compresses var activity after the end of each 2nd-level Luby cycle in order to diversify the direction of search. #161 
- Drop refinement on trail_saving; restarts reset dependency. It's enough. 
- Change the definition of `ProgressASG`. It counts the number of assigned literals after restarts instead of unassigned ones.
shnarazk added a commit that referenced this pull request May 15, 2022
- Define `EMA` and `LubySeries` as sub-modules under /primitive #161, #163
- Replace `GeometricStabilizer` with `StageManager` #161 #165
- Replace `Restarter` with `RestartManager` in `State` #168 #162
- Fix crash #174
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
experimental project type system Changes on types for safety or generality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Differentiate EMA lengths with restart cycles Compare average with EMA
1 participant