Skip to main content

QBF Solving Using Best First Search

  • Conference paper
  • First Online:
Computers and Games (CG 2022)

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 13865))

Included in the following conference series:

  • 200 Accesses

Abstract

Quantified Boolean Formula or QBF is similar to a two-player strategy game on a theoretical level. While most search-based QBF solvers are based on a depth-first search based QDPLL procedure, many game solvers use best-first search algorithms such as proof number search. In this paper, we examine how to design a best-first search based QBF solver that combines some well-known QBF solving techniques such as backjumping and clause learning. We evaluate the performance of the resulting algorithm on a set of standard QBF benchmarks.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 44.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 59.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Notes

  1. 1.

    If pure literal elimination is enabled, assignments may also contain pure literals [5], and branching variables in an assignment are those that are neither unit nor pure.

  2. 2.

    This property is folklore in the context of SAT and it is easy to establish it for QBF.

  3. 3.

    The resolvent corresponds to each satisfied node is a \(\mu \)-entailed cube in this case because we are not doing any cube learning.

References

  1. Cadoli, M., Giovanardi, A., Schaerf, M.: An algorithm to evaluate quantified Boolean formulae. AAAI/IAAI 98, 262–267 (1998)

    MathSciNet  MATH  Google Scholar 

  2. Ederer, T., Hartisch, M., Lorenz, U., Opfer, T., Wolf, J.: Yasol: an open source solver for quantified mixed integer programs. In: Winands, M.H.M., van den Herik, H.J., Kosters, W.A. (eds.) ACG 2017. LNCS, vol. 10664, pp. 224–233. Springer, Cham (2017). https://doi.org/10.1007/978-3-319-71649-7_19

    Chapter  Google Scholar 

  3. Ewalds, T.V.: Playing and solving Havannah. Master’s thesis, University of Alberta, Canada (2012)

    Google Scholar 

  4. Gent, I., Giunchiglia, E., Narizzano, M., Rowley, A., Tacchella, A.: Watched data structures for QBF solvers. In: SAT, pp. 25–36 (2003)

    Google Scholar 

  5. Giunchiglia, E., Narizzano, M., Tacchella, A.: Backjumping for quantified boolean logic satisfiability. AI 145(1–2), 99–120 (2003)

    Google Scholar 

  6. Giunchiglia, E., Narizzano, M., Tacchella, A.: Clause/term resolution and learning in the evaluation of quantified Boolean formulas. JAIR 26, 371–416 (2006)

    Article  MathSciNet  MATH  Google Scholar 

  7. Goffinet, J., Ramanujan, R.: Monte-Carlo tree search for the maximum satisfiability problem. In: CP, pp. 251–267 (2016)

    Google Scholar 

  8. Goldwaser, A., Thielscher, M.: Deep reinforcement learning for general game playing. In: Proceedings of the AAAI Conference on Artificial Intelligence, pp. 1701–1708. AAAI Press, New York (2020)

    Google Scholar 

  9. Ishitobi, T., Plaat, A., Iida, H., van den Herik, J.: Reducing the seesaw effect with deep proof-number search. In: ACG, pp. 185–197 (2015)

    Google Scholar 

  10. Janota, M., Klieber, W., Marques-Silva, J., Clarke, E.: Solving QBF with counterexample guided refinement. In: SAT, pp. 114–128 (2012)

    Google Scholar 

  11. Keszocze, O., Schmitz, K., Schloeter, J., Drechsler, R.: Improving sat solving using monte Carlo tree search-based clause learning. In: IWSBP, pp. 107–133 (2020)

    Google Scholar 

  12. Kishimoto, A., Winands, M.H., Müller, M., Saito, J.T.: Game-tree search using proof numbers: the first twenty years. ICGA J. 35(3), 131–156 (2012)

    Article  Google Scholar 

  13. Lonsing, F., Bacchus, F., Biere, A., Egly, U., Seidl, M.: Enhancing search-based QBF solving by dynamic blocked clause elimination. In: LPAR, pp. 418–433 (2015)

    Google Scholar 

  14. Lonsing, F., Biere, A.: Depqbf: a dependency-aware QBF solver. JSAT 7(2–3), 71–76 (2010)

    Google Scholar 

  15. Lonsing, F., Egly, U., Van Gelder, A.: Efficient clause learning for quantified Boolean formulas via QBF pseudo unit propagation. In: SAT, pp. 100–115 (2013)

    Google Scholar 

  16. Marques-Silva, J.: The impact of branching heuristics in propositional satisfiability algorithms. In: EPIA, pp. 62–74 (1999)

    Google Scholar 

  17. Mayer-Eichberger, V., Saffidine, A.: Positional games and QBF: the corrective encoding. In: SAT, pp. 447–463 (2020)

    Google Scholar 

  18. Pawlewicz, J., Lew, Ł.: Improving depth-first PN-search: 1+ \(\varepsilon \) trick. In: CG, pp. 160–171 (2006)

    Google Scholar 

  19. Plaat, A.: Mtd (f), a minimax algorithm faster than negascout. arXiv preprint arXiv:1404.1511 (2014)

  20. Previti, A., Ramanujan, R., Schaerf, M., Selman, B.: Monte-Carlo style UCT search for boolean satisfiability. In: AI*IA, pp. 177–188 (2011)

    Google Scholar 

  21. Saffidine, A.: Solving games and all that. Ph.D. thesis, Université Paris Dauphine-Paris IX (2013)

    Google Scholar 

  22. Schlöter, J.: A monte Carlo tree search based conflict-driven clause learning SAT solver. In: INFORMATIK 2017, pp. 2549–2560 (2017)

    Google Scholar 

  23. Seo, M., Iida, H., Uiterwijk, J.W.: The PN2217-search algorithm: application to tsume-shogi. AI 129(1–2), 253–277 (2001)

    Google Scholar 

  24. Shukla, A., Biere, A., Pulina, L., Seidl, M.: A survey on applications of quantified Boolean formulas. In: ICTAI, pp. 78–84 (2019)

    Google Scholar 

  25. Xu, R., Lieberherr, K.: Solving QSAT problems with neural MCTS. arXiv:2101.06619 (2021)

  26. Zhang, L., Malik, S.: Towards a symmetric treatment of satisfaction and conflicts in quantified Boolean formula evaluation. In: CP, pp. 200–215 (2002)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding authors

Correspondence to Yifan He or Abdallah Saffidine .

Editor information

Editors and Affiliations

A Correctness Discussion of the BFS Based CDCL Solver

A Correctness Discussion of the BFS Based CDCL Solver

There is a critical problem we have not explained in algorithm 1, which is the reusability of the resolvent. We have mentioned in the paper that during backpropagation when we want to query the resolvent corresponding to a node, we only need to consider two cases. In the appendix, we would explain 1) why this is necessary, and 2) why this is correct. Recall that, we let \(\phi [t]\) represent the QBF expression at iteration t. According to the definition of a BFS node, at iteration t each node i has an assignment \(\mu ^{i}_{t}\) associated with it. If we only execute backjumping (i.e. CBJ + SBJ), the formula does not change during the solving procedure, hence for any t and \(t'\) when node i is visited we have \(\mu ^{i}_{t}~=~\mu ^{i}_{t'}\). Note that with careful implementation, even if we activate pure literal elimination, this property would hold. However, when CDCL is enabled, this property might no longer hold. We have discussed that in the backpropagation phase, we would use the resolvent we store in the children to derive the resolvent of the current node. However, in BFS each node can be visited more than once, and more clauses might be added to the formula which could create more unit propagation. In other words, suppose node i is visited in iteration t and \(t'\), it is possible that \(\mu ^{i}_{t}~\ne ~\mu ^{i}_{t'}\). When we attempt to derive the resolvent associated with a node i with the resolvents we stored in its children, it is possible that the resolvent we stored in the children corresponds to a different assignment. For example, suppose the left child was solved in iteration \(t'~<~t\) and the information associated with the node is \((i^{l}, h^{l}_{t'},v^{l},\mu ^{l}_{t'}, R^{l}_{t'})\). When we want to calculate the resolvent of node i with state \((i, h,v,\mu _{t}, R)\), we need to make a query of the resolvent of the left child \(i^{l}\) which corresponds to the assignment \(\mu ^{l}_{t}=\mu _{t};v;U(\phi [t]_{\mu _{t};v})\). However, because of the additional unit propagation caused by clause learning, it is possible that \(\mu ^{l}_{t'}~\ne ~\mu _{t};v;U(\phi [t]_{\mu _{t};v})\), hence, we can no longer use \(R^{l}_{t'}\) as a valid resolvent for the left child! We would update the resolvent we have previously stored in a node as follows:

  • If \(\phi [t]_{\mu ^{l}_{t}}\) contains a contradicted clause, we can recalculate \(R^{l}_{t}\) based on the conflict in linear time [6].

  • Otherwise, we can reuse \(R^{l}_{t'}\) as a resolvent for node \(i^{l}\).

The correctness of this update method does not always hold, however, in our implementation of the generalized Schloeter’s method proposition 1 holds. With this proposition, we should realize the following two lemmas related to the \(\mu \)-contradicted clause and \(\mu \)-entailed cube trivially holds.

Lemma 1

For a QBF expression \(\phi \), if C is a \(\mu \)-contradicted clause, and \(\mu '\) is an assignment such that \(A[\mu ']=A[\mu ]\) and \(S(\mu )~\subseteq ~ S(\mu ')\), then C is also a \(\mu '\)-contradicted clause.

Proof

By the definition of \(\mu \)-contradicted clause, we must show that for any literal \(l~\in ~C\), \(l~\notin ~\mu '\), and for each existential literal \(l~\in ~C\), we have \(\lnot {l}~\in ~\mu '\). We consider two cases: 1) \(l~\in ~C\) and l is existential. Then, since C is \(\mu \)-contradicted, we have \(\lnot {l}~\in ~\mu \). Because \(S(\mu )~\subseteq ~S(\mu ')\), we have \(\lnot {l}~\in ~\mu '\) as well. In addition, since \(\mu '\) is an assignment, whenever \(\lnot {l}~\in ~\mu '\), \(l~\notin ~\mu '\).

2) Suppose \(l~\in ~C\) and l is universal. Then, because \(A[\mu ']=A[\mu ]\), we can easily show that \(l~\notin ~\mu '\).

By definition 2, we conclude that C is also a \(\mu '\)-contradicted clause.

Lemma 2

For a QBF expression \(\phi \), if T is a \(\mu \)-entailed cube, and \(\mu '\) is an assignment such that \(A[\mu ']=A[\mu ]\) and \(S(\mu )~\subseteq ~ S(\mu ')\), then T is also a \(\mu '\)-entailed cube.

Proof

Analog to the proof of lemma 1, the lemma trivially holds by the definition of \(\mu \)-entailed cubes.

Note that in iteration t, if \(\phi [t]_{\mu ^{l}_{t}}\) contains a contradicted clause, we can easily replace \(R^{l}_{t}\) with the contradicted clause. Otherwise, because of the consequence of proposition 1, we have

$$\begin{aligned} S(\mu ^{l}_{t'})~\subseteq ~S(\mu ^{l}_{t}) \end{aligned}$$
(2)

and,

$$\begin{aligned} A(\mu ^{l}_{t'})~=~A(\mu ^{l}_{t}) \end{aligned}$$
(3)

Since we only execute conflict-driven clause learning and solution-driven backjumping, the resolvent we initialized for a node is \(\mu \)-contradicted or \(\mu \)-entailed at the time it is calculated. According to lemma 1 and lemma 2, the \(\mu ^{l}_{t'}\)-contradicted clause (resp. \(\mu ^{l}_{t'}\)-entailed cube) we have calculated previously is still a \(\mu ^{l}_{t}\)-contradicted clause (resp. \(\mu ^{l}_{t}\)-entailed cube). Therefore, as long as \(\phi [t]_{\mu ^{l}_{t}}\) does not contain a contradicted clause, we can reuse the reason we have calculated in a previous iteration, and the method we have discussed just now is correct.

Note that this discussion also explains the exact difficulty of combining BFS with SDCL. When SDCL is activated, universal unit propagation comes in, proposition 1 does not hold anymore, because when a node is visited more than once, it is possible that \(A(\mu _{t'})~\ne ~A(\mu _{t})\) due to universal unit propagation. If this condition is falsified, lemma 1 does not hold, and the resolvent we previously stored in a node might not be reused.

Rights and permissions

Reprints and permissions

Copyright information

© 2023 The Author(s), under exclusive license to Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

He, Y., Saffidine, A. (2023). QBF Solving Using Best First Search. In: Browne, C., Kishimoto, A., Schaeffer, J. (eds) Computers and Games. CG 2022. Lecture Notes in Computer Science, vol 13865. Springer, Cham. https://doi.org/10.1007/978-3-031-34017-8_7

Download citation

  • DOI: https://doi.org/10.1007/978-3-031-34017-8_7

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-031-34016-1

  • Online ISBN: 978-3-031-34017-8

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics