一、SLIME SAT Solver

1.关注变元的赋值时一项重要工作

(1)在重启阶段考虑规划所有变元的极性,使之最接近目标赋值。采用的方法比较特殊。

We improve the restart stage with a reconfiguration of
preassigned polarities, via HESS black-box algorithm (Relaxed),
in this case with a MaxSAT Oracle, that improve
the reassignment of polarities with a approximate MaxSAT
solution, based on the current assignment.

 

(2)A. HESS black-box algorithm

HESS black-box algorithm use the ”The Monty Hall Problem”
[2] to approximate values from an Oracle, In this case
a MaxSAT oracle get a complete assignment and return the
number of falsified clauses, for CDCL use the native and
learnts clauses.

译文:MaxSAT oracle得到一个完整的赋值,并返回伪子句的数量,因为CDCL使用native和learnt子句

 

(3)B. HESS º1 order (Relaxed)

   Create an initial boolean array (bit0; bit1 : : : bitn) based
on current assignment


   Set the current value to 1, and i to 0.


   Change the state of i-th boolean variable


   Get Oracle(p)
1) less than current value, reassign and retain the
current assignment, and continue with next variable.


2) if greater, change the variable to original state, and
continue with next variable.


3) if equal, reassign the polarities to p, and exit.


 Continue with execution of CDCL.

 

(以上步骤是在一个随机局部求解器中完成的吗?)

 

SLIME: A Minimal Heuristic to Boost SAT Solving


On CDCL Based SAT Solvers the trail size is strictly related to progress or to the total conflicts on the current assignment, such that if the trail size is the same that the number of variables, then current assignment is valid. On the other hand, in the selection of the current variable it is necessary to assign a predetermined polarity to the resulting literal, which in most implementations is a predefined value. SLIME implement a simple heuristic with minimal complexity, that correlated the trail size and the polarity of the current variable to assign. The selection of variable is not related to trail size, this decouple the both concepts.
 

以上文字来源于:https://maxtuno.github.io/slime-sat-solver/

 

译文:另一方面,在选择当前变量时,有必要将一个预先确定的极性赋给产生的文字,在大多数实现中这是一个预先定义的值。

译文:SLIME实现了一个简单的启发式算法,其复杂性最小,将trail大小与要分配的当前变量的极性关联起来。

变量的选择与trail size无关,这将两个概念分离开来。

 

2.确定策略切换标准为冲突数或重启数--不在使用时间值

  为保证求解过程的确定性,不在使用随机量;

We replace the pseudo-random calls with the conflicts counter, this allow
a deterministic execution on each instance.

 

3.关注求解过程中段以后阶段--the stage of the solver VSID or not-VSID

 

4.We add a parameter ”massive” used on the SLIME Cloud, that produce

a initial random assignment of polarities.

 

5.第一次见到专有名词: BOOST Heuristic--应该指的是变元活跃度累计策略

improve the BOOST Heuristic—— 

We improve the BOOST Heuristic from competition 2019 and 2020, with
alternate behaviour, i.e. this alternate the zone of execution
according the stage of the solver VSID or not-VSID. 

 

6.针对样例集进行求解得出对比图。样例可以从benchmark的描述中清楚地知道。

7.代码解读

 

1.组织架构

可以查看makefile文件,了解调用关系。

(1)三个文件夹:

  include--专门的头文件

  src--专门的cpp文件

  mtl--模板文件

(2)类定义

  基本类型定义--SolverTypes.h定义了文字、子句等

  Solver 及其派生类 SimpSolver

             其中,在Solver类中增加:

             

 1     // HACK to expose propagation for Open-WBO
 2     bool propagateLit(Lit l, vec<Lit> &implied) {
 3         cancelUntil(0);
 4 
 5         // literal is an unit clause
 6         if (value(l) != l_Undef) {
 7             return value(l) == l_False;
 8         }
 9         assert(value(l) == l_Undef);
10 
11         newDecisionLevel();
12         uncheckedEnqueue(l);
13         long a = trail.size();
14         CRef cr = propagate();
15         for (long i = a; i < trail.size(); i++) {
16             implied.push(trail[i]);
17         }
18         cancelUntil(0);
19         return (cr != CRef_Undef);
20     }

 

1 protected:
2     long local;//被使用在两个地方
3 long global; //被使用在两个地方
4 long cursor; //2021竞赛版本使用
5 vec<lbool> aux;//2021竞赛版本使用

被使用在pickBranchLit函数和search函数之中。

   
posted on 2021-07-27 10:57  海阔凭鱼跃越  阅读(319)  评论(0编辑  收藏  举报