QBF Modeling: Exploiting Player Symmetry for Simplicity and Eﬃciency

.


Introduction
The automated propositional reasoning community has come a long way since the development of the first practical propositional satisfiability algorithms (SAT solvers) nearly a decade ago.SAT solvers have been successfully used on realworld problems from a variety of areas like hardware and software verification, planning, and scheduling.Quantified Boolean Formula (QBF) reasoning extends the scope of SAT to domains requiring adversarial analysis, like conditional planning [17], unbounded model checking [16,3], and discrete games [7].In the simplest case, consider a two-player game.Here a winning strategy is a partial game tree that, for every possible game play of the opponent, indicates how to proceed so as to guarantee a win.This is more complex than the single-agent reasoning SAT solvers offer, and requires modeling and analyzing adversarial actions of another agent with competing interests.The QBF approach thus supports a much richer setting.However, it also poses new and sometimes unforeseen challenges.In terms of worst-case complexity, deciding the truth of a QBF is PSPACEcomplete [18] whereas SAT is "only" NP-complete. 1 Even with very few quantification levels, the explosion in the search space is tremendous in practice.Further, as the winning strategy example indicates, even a solution to a QBF may require exponential space to describe, causing practical difficulties [2].
Nonetheless, several tools for deciding the truth of a given QBF (QBF solvers) have been developed, such as Quaffle [20], sKizzo [3], Quantor [4], QuBE [8], Semprop [10], Evaluate [5], Decide [15], and QRSat [13].Most of these tools extend the concepts underlying many successful SAT solvers, which use the DPLL procedure [6] as their backbone.As a result, they inherit conjunctive normal form (CNF) as the input representation, which has been the standard for SAT solvers for over a decade.Internally, many solvers also employ disjunctive normal form (DNF) in order to cache partial solutions for efficiency [21].
While the performance of QBF solvers has been promising, translating a QBF into a (much larger) SAT specification and using a good SAT solver is often faster in practice -a fact well-recognized and occasionally exploited [4,3].This motivates the need for further investigation into the design of QBF solvers and possible fundamental weaknesses in the modeling methods used.
The main contribution of this paper is a new generic QBF modeling technique that uses a dual CNF-DNF representation and, with a fairly straightforward adaptation of a modern QBF solver, improves the state of the art by two orders of magnitude on a set of computationally challenging benchmarks.The dual representation splits problem constraints into a CNF and a DNF part in a natural manner based on a game-theoretic view.Note that we do not go to fully nonclauses encodings, which also have promise but are unable to directly exploit rapid advances in CNF-based SAT solvers.We also differ from an independent dual CNF-DNF approach recently proposed [19] in that we do not convert a full CNF encoding into a logically equivalent full DNF encoding and provide both to the solver.Our approach exploits the representational power of DNF to simplify the model while addressing the issues associated with pure CNF representations.
We think of a problem P as a two-player game G with a bounded number of turns.This is different from the standard interpretation of a QBF as a game [14]; in our approach, one must formulate the higher level problem P as a game G before modeling it as a QBF.The sets of "rules" to which the players of G are bound may differ from one player to the other.In general, any QBF reasoning task has a natural game playing interpretation at a high level, which we exploit.We illustrate this correspondence with a circuit minimization problem [cf. 14] that underlies practical QBF benchmarks involving adder circuits and sorting networks [12], a graph coloring problem, and a chess-like problem [11,1].
The key idea underlying our approach is to exploit a dichotomy between the players: we model rules for the existential player as CNF clauses, (the negations of ) rules for the universal player as DNF terms, and split game state information equally into clauses and terms.This symmetric dual format places "equal responsibility" on the two players, in stark contrast with current QBF encodings which tend to leave most work for the existential player.We are able to avoid many pitfalls of current techniques while increasing the reasoning efficiency.In particular, we bring to QBF solvers unit propagation across quantifiers which has been a stumbling block so far.We are also able to completely avoid the use of the so-called auxiliary indicator variables and the associated illegal search space issue inherent in the translation of QBF problems into pure CNF form [1]. 2We evaluate our approach with Duaffle (short for dual-Quaffle), our QBF solver for the dual encoding.It is an adaptation of the solver Quaffle, which already supports DNF terms for solution learning.Our empirical evaluation on computationally difficult chess-based instances shows that Duaffle consistently outperforms the best solvers by several orders of magnitude.More generally, this paper demonstrates that by taking a step back and re-thinking basic modeling techniques, one can significantly extend the reach of QBF reasoning systems.

Preliminaries
We begin by discussing how adversarial tasks can be treated as games, and then describe our QBF notation and a systematic way of encoding games as QBF.

Treating Adversarial Tasks as Games
Most discrete adversarial tasks have a natural albeit somewhat non-traditional game playing interpretation with an existential and a universal player.Interestingly, the rules for the existential player are often different from those of the universal player.We illustrate this with two simple but concrete examples.
Example 1.The Circuit Minimization Problem: Given a Boolean circuit C, is there a smaller circuit that computes the same function as C? Observe that the answer is yes iff there exists a circuit C E such that size(C E ) < size(C) and for all inputs ρ, C E (ρ) = C(ρ).This problem lies in the complexity class Σ P 2 , which is believed to be beyond NP and is characterized by QBFs with exactly two levels of quantification beginning with the existential [cf.14].
We can think of circuit minimization as a game with two turns.First, the existential player E commits to a circuit C E by specifying the type its gates, their connections, and the output line.The rules for E are that C E must be a legal circuit with size(C E ) < size(C).Second, the universal player U produces an input ρ and the polynomial-size computations of C E and C on ρ.The rule for U is that it must correctly compute C E (ρ) and C(ρ).The goal of E is to ensure that C E (ρ) = C(ρ) no matter how ρ is chosen.We can again think of this as a game between E and U .First, E produces a coloring σ of the vertices of H.The rule for E is that σ must be a legal k-coloring respecting the edges of H. Second, U produces a second coloring τ of the vertices of H.The rule for U is that τ must be a legal (k − 1)-coloring of H. E wins iff she is able to produce a valid σ and U is not able to produce a valid τ . 2

Quantified Boolean Formulas
Let V = {x 1 , . . ., x n } be a set of n propositional (Boolean, true-false, 1-0) variables.A conjunctive normal form or CNF formula over V is a conjunction of clauses, where each clause is a disjunction of literals, and a literal is a variable or its negation.A disjunctive normal form or DNF formula is a disjunction of terms (sometimes called cubes), where each term is a conjunction of literals.A Quantified Boolean Formula (QBF) is a Boolean formula in which variables are quantified as existential (∃) or universal (∀).We will use the term QBF for totally quantified Boolean formulas in prenex form beginning with ∃: where M is a Boolean formula referred to as the matrix of F , x j i above are distinct and include all variables appearing in M , and and using associativity within each level of quantification, we can simplify the notation to F = ∃V 1 ∀V 2 ∃V 3 . . .QV k M .A QBF solver is an algorithm that determines the truth value of such formulas F , i.e., whether there exist values of variables in V 1 such that for every assignment of values to variables in V 2 , and so on, M is satisfied (set to true).
For two Boolean formulas G and G , G = G will denote syntactic equality (they "look" the same) and G ≡ G will denote semantic equality (they evaluate to the same truth value for every variable assignment).For two QBFs F and F , F = F will denote syntactic equality, while F ≡ F will denote semantic equality between the matrices (i.e., the Boolean parts) of F and F .

QBF and Two-Player Games
A QBF F = ∃V 1 ∀V 2 . . .QV k M has a natural interpretation as a two-player game G (see standard texts, e.g.[14]).The idea is to have an existential player E and a universal player U , who take turns setting variables in V 1 , V 2 , . . ., V k in order.If M is satisfied after all variables are set, E wins.Otherwise, U wins.
Our interest in this work, however, is in going the other direction, that is, treating arbitrary adversarial tasks as discrete games and modeling them as QBF.Given a discrete two-player game G with players E and U , a bound k on the total number of turns, and the guarantee that after k turns either E or U will be declared a winner (i.e., there is no "draw"), we can construct a QBF F = ∃V 1 ∀V 2 . . .QV k M that models G in the following manner. 3 We will follow the systematic framework described by Ansotegui et al. [1].It is based on a highly successful technique used in SAT-based planning [9] and can be applied to any well-defined discrete game G without draws.The variables of F model the possible moves of E and U as well as global state information maintained about the game as it is played.The possible moves in the i th turn naturally correspond to variables in V i .The rules and goal of G are formulated as follows: (1) precondition and effect axioms for each move in relation to the game state before and after the move, (2) mutual exclusion axioms restricting a player to one move per turn, (3) frame axioms ensuring that parts of the game state not affected by the current move stay unchanged, (4) initial state axioms, and ( 5) goal axioms stating the winning conditions for one of the players chosen arbitrarily.With no draws, it clearly suffices to describe one player's goals.
The transition axioms for the i th turn are the conjunction of the precondition, effect, mutual exclusion, and frame axioms for that turn, denoted by  k) , where odd (k) and even(k) denote the largest odd and even integers up to k, respectively.Let I denote the initial state axioms and G E the goal axioms for E. The following Boolean formulas represent two alternative formulations of G: In general, the choice of the formulation is dictated by the requirements of the game being modeled.Formulation M 1 has the property that it evaluates to true on a variable assignment iff (a) E adheres to all her rules and (b) either E achieves her goal or U violates his rules.This fits the game interpretations of the circuit minimization and graph coloring examples we saw in Sect.2.1.In graph coloring, for instance, E must adhere to her rules of producing a valid k-coloring of H irrespective of whether U is able to produce a (k − 1)-coloring.On the other hand, M 2 evaluates to true iff either (a) E adheres to all her rules and achieves her goal, or (b) U violates his rules.This relieves E of all 3 Interestingly, without the possibility of a draw, exactly one of E and U is guaranteed to have a winning strategy even before they start playing the game.This is because if E does not have a choice of moves that will make her win irrespective of the moves of U , then U 's winning strategy is simply the "witness" of this fact.This corresponds to the only two possible evaluations of the QBF F , namely, true and false.
responsibility if U violates a rule.This formulation fits games like chess where E doesn't even need to continue playing the game according to her rules if U makes an illegal move; she is immediately declared the winner.While chess may also be formulated as M 1 , using M 2 increases the reasoning efficiency.Let S i denote the state variables for G during the i th turn, A i the move or action variables, and I i a set of auxiliary "indicator" variables [1] used to detect when the formula may be declared satisfiable.Assuming k is odd, the complete CNF-based QBF formulation of G is given by: where i ∈ {1, 2} is chosen based on the requirements of G.

A New QBF Modeling Technique
In this section, we present a new QBF modeling technique based on a gametheoretic view the underlying problem and a dual CNF-DNF representation.
We also describe a QBF solver that uses this dual representation.We begin with the motivation behind using DNF.CNF is the generally accepted input format for SAT solvers, and for two good reasons.First, many problems of interest are naturally expressed as a conjunction of several constraints.Second, before SAT solvers reach their goal of finding any one satisfying assignment, they typically encounter many falsifying assignments.It is therefore extremely beneficial for them to be able to deduce locally from a single CNF clause that all extensions of the current partial assignment will be falsifying.This forms the basis of DPLL-based backtrack search as well as heuristics for local search.On the other hand, due to universal quantification, a QBF solver must continue its search even after one satisfying assignment is found.It must therefore also detect satisfiability quickly.While the satisfaction of a CNF formula is a global property (all clauses must be satisfied), the satisfaction of a DNF formula can be guaranteed locally by evaluating an individual term.
This fact is exploited by QBF solvers that implement "solution learning" [21].We take this observation a step further, using a combination of CNF and DNF as part of the input formula itself.Interestingly, adding DNF-based solution learning to the solver Quaffle, while theoretically natural and desirable, has limited practical impact on many problem instances over and above what "conflict clause" learning already achieves.In fact, the "conditional" variant of Quaffle called QuaffleC [1], which outperforms all state-of-the-art QBF solvers on our benchmarks, doesn't even use solution learning and DNF because of technical reasons.On the other hand, using DNF as part of the problem specification itself, as we will see, can be extremely effective.
Our modeling technique is based on the interpretation of adversarial tasks as games as discussed in Sect.2.1.For modeling games as QBF, recall the generic framework of Sect.2.3 and, in particular, the matrices 1) and the variable quantification in Eqn.(2).Two crucial observations about this representation of games motivate our modeling approach.(A) The implications Tr U → . . . in M 1 and M 2 must be translated into a CNF formula by either expanding it out, which is typically costly, or adding new auxiliary variables, which cause problems with unit propagation and lead to the illegal search space issue.This is discussed in detail by Ansotegui et al. [1] and is handled using a fairly intricate machinery of individual and grouped "indicator" variables that flag the violation of any rule by U and "propagate" this information globally to all clauses.This makes the model undesirably complex.(B) The variable quantification in Eqn.(2) clearly depicts the "unequal treatment" of E and U .While U only decides actions at even-numbered turns, E is left with the responsibility of deciding actions at oddnumbered turns, maintaining the correct game state at every turn, and setting and propagating appropriate indicator variables when U violates a rule.

Modeling Games in a Dual CNF-DNF Form
Representing games as QBF in the framework of Sect.2.3 boils down to specifying the initial state, the rules of the game, and the goal for a player as a Boolean formula, and quantifying appropriately over its variables.In our approach, we model the rules for the existential player E as a CNF formula G and, unlike existing encoding techniques, model (the negations of ) the rules for the universal player U as a DNF formula H, respecting the following behavior: violation of a rule by E should directly falsify a clause of G and violation of a rule by U should directly satisfy a term of H.The dual formula will encode the winning conditions for E.
Before going into the details for the general setting, we illustrate the complete dual encoding for the chromatic number problem described earlier.
for the rules of the universal player U .Semantically, x i,j (or y i,j ) is true iff E (or U , respectively) assigns color j to vertex i.
We construct a CNF formula F CNF such that it is satisfied by a variable assignment iff the x variables form a legal k-coloring of H.The first set of clauses in F CNF will say that every vertex must be assigned some color by x, the second set will say that a vertex can get only one color, and the third set will say that if two vertices share an edge, then they do not get the same color.Formally, We now construct a DNF formula F DNF which is satisfied by an assignment iff the y variables do not form a legal (k − 1)-coloring of H.The first set of terms in F DNF will say that some vertex is not assigned any color by y, the second set will say that two different colors are assigned to a single vertex, and the third set will say that two adjacent vertices are assigned the same color.Formally, (y i,j ∧ y i ,j ) Finally, the dual QBF encoding of the chromatic number problem is given by The game playing interpretation implies that More generally, we begin by thinking of the rules for E and U as standard clauses encoding various axioms like preconditions and effects for each turn, as defined in Sect.2.3.For E, these directly become part of the CNF portion.For U , we negate each of these clauses to obtain DNF terms, which directly become part of the DNF portion.The overall QBF encoding is created from the perspective of E by encoding conditions under which E would win.We illustrate the translation of rules into clauses and terms with a simple example.
Example 4. The Game of Chess: We use standard chess notation, with board columns a-g and rows 1-8.A typical set of precondition axioms would be: if the white player moves a rook from square b2 to square b4 at step s, then (a) that rook must be at b2 to begin with, (b) b3 must be empty, and (c) there must not be a white piece at b4. Treated as clauses, these translate into: C1 = (NOT move-wRook-b2-b4-s OR at-wRook-b2-s) C2 = (NOT move-wRook-b2-b4-s OR empty-b3-s) C3 = (NOT move-wRook-b2-b4-s OR NOT at-wPiece1-b4-s) C4 = (NOT move-wRook-b2-b4-s OR NOT at-wPiece2-b4-s) The clause C 1 , for instance, says that the CNF formula is immediately falsified if a white rook tries to move from square b2 to b4 without actually being there at step s.When modeling the white player as the existential player E, we use the above set of clauses.The axioms for the black player modeled as the universal player U state the converse, i.e., the conditions under which it violates a rule or fails to reach its goal, causing E to win.These are the negations of the standard axiom clauses, and are modeled as DNF terms of the form: D1 = (move-bRook-b2-b4-s AND NOT at-bRook-b2-s) D2 = (move-bRook-b2-b4-s AND NOT empty-b3-s) D3 = (move-bRook-b2-b4-s AND at-bPiece1-b4-s) D4 = (move-bRook-b2-b4-s AND at-bPiece2-b4-s) The term D 2 , e.g., says that the DNF formula is satisfied if a black rook attempts to move from b2 to b4 and the intermediate square b3 is non-empty. 2 Given this symmetric way of encoding the rules for E and (the negations of) the rules for U as a collection of clauses and terms, respectively, we are ready to state the complete new encoding in the generic framework of Sect.2.3.Recall Eqn.(1) describing two possible matrices M 1 and M 2 of the QBF formulation of a game G.Note that since there is no draw, G U ≡ ¬G E .We rewrite M 1 and M 2 in the following manner, which immediately suggests a natural split into CNF and DNF parts and how to logically combine them.We use M i to emphasize the syntactic difference with M i , i ∈ {1, 2}; semantically We see that while M 1 combines the CNF and DNF parts with the and operator, M 2 uses the or operator.Which one of M 1 and M 2 is chosen for a particular game G at hand is dictated by the requirements of G as discussed in Sect.2.3.Particularly, if the game stops as soon as U violates a rule, M 2 is preferred.
Recall that Tr U is the conjunction of transition clauses for even-numbered turns, so that ¬Tr U is naturally expressed as a DNF formula with terms corresponding to negated original clauses: 3) is the heart of our dual representation.All that remains to be specified is variable quantification.As in Sect.2.3, we use S i for state variables and A i for move or action variables during the i th turn.(Indicator variables I i are not used.)The complete dual CNF-DNF encoding of G is: where i ∈ {1, 2}.Intuitively, this quantification says that given the initial state, E makes her move A 1 and brings G to state S 2 while obeying her rules, U then makes his move A 2 and brings G to state S 3 while obeying his rules, and so on, for k turns.Contrasting this with the original quantification in Eqn.(2) immediately highlights our symmetric treatment of the two players.

Duaffle: A QBF Solver using the Dual Encoding
We adapted the QBF solver Quaffle to create a new solver Duaffle (short for dual-Quaffle) that determines the truth value of QBF formulas in the dual CNF-DNF form described above.The input format for Duaffle is a straightforward extension of the standard QDIMACS format [cf.12].Specifically, the formula is specified as a collection of CNF clauses and DNF terms along with variable quantification, as defined in Eqns.( 3)-( 4) and illustrated in Example 3.
In addition, Duaffle takes as input a parameter specifying which of M 1 and M 2 in Eqn. ( 3) is used in the problem formulation.We identify these two formulations with the Boolean operator that is used to combine the corresponding CNF and DNF parts, namely, and and or.
In general, the behavior of a QBF solver with a mix of CNF and DNF as input is defined by what we call its solver policy: the actions it takes when it encounters any of the nine combinations of the CNF and DNF parts being undetermined (denoted U), falsified (F), or satisfied (T) by a partial variable assignment.The possible actions include declaring the current branch unsatisfiable (UNS), declaring it satisfiable (SAT), or continuing to branch further by setting more variables (BRN).Duaffle implements two policies that correspond to the and and or dual formulations.These are given in Figure 1 Quaffle assumes certain restrictions on the CNF and DNF formulas it operates on, most notably that the DNF part logically implies the CNF part (because DNF terms are added only through solution learning).Besides resulting in a different solver policy than what we need, this also makes Quaffle's constraint propagation mechanism unsuitable for Duaffle.Consider a simple quantified DNF term: ∀x∃y (x ∧ y).Let F = F CNF ∧ F DNF be the complete formula.In the game-playing interpretation, the goal of the universal player U is to make F false.If U sets x = true, the existential player E can set y = true, so that F DNF = true.When F DNF → F CNF (the working assumption of Quaffle), this implies F CNF = true, so that F itself is satisfied and U loses.Therefore, U can safely infer from the DNF term (x ∧ y) that x must be set to false.In general, Quaffle can ignore variables with deeper existential (universal) quantification when performing standard unit propagation on a universal (existential, resp.)variable in a term (clause, resp.), achieving faster propagation.
In Duaffle, where F DNF → F CNF , such inference by U would be incorrect.When x = true and E sets y = true to satisfy the DNF term (x ∧ y), this could make a clause in F CNF false, so that F is falsified and U still wins.One must therefore ignore quantification levels and revert back to a simpler SAT-type notion of unit propagation: a universal (or existential) variable is implied by a term (or clause, resp.)iff all other literals in it are true (or false, resp.).Fortu-nately, the cost incurred by the removal of quantifier-sensitive unit propagation is more than paid off by the benefits of the dual model, such as propagation across quantifiers (see Sect.Optimization: Figure 1(c) depicts an optimization to Duaffle when using the or formulation (i.e., matrix M 2 ) on "pure" games.Recall that M 2 can be used for any game in which E immediately wins as soon as U violates a rule.Such games are typically pure in the sense that they also follow the converse: U immediately wins if E violates a rule.This converse is not captured by the or connective in M 2 .The optimization for the solver policy is the following: if the DNF part is still undetermined but the CNF part is false, declare the branch to be UNS and backtrack.The correctness of this relies on the top-down structure of Quaffle, which sets variables respecting the quantification order.As a result, the DNF part being undetermined and the CNF part being false imply that the game has indeed already been played according to the rules till the current turn.

Experimental Results
We evaluated our approach on a challenging set of QBF formulas encoding a rich variant of the game of chess.This game fits well in the M 2 dual formulation using the or connective.
The Game xChess: xChess is based on Evader-Pursuer, a chess-like game introduced as a QBF benchmark by Madhusudan et al. [11] and later extended to several pieces [1].We generalize it further by introducing more refined movements of various pieces.The input is an n × n chess board with an initial configuration consisting of some white and black pieces, the rules defining legal moves of each piece, the maximum number k of turns, and the goal square g.The players take alternating turns as usual, starting with white.The white player wins iff the white king, K w , is placed at g at or before step k.K w is always part of the initial board configuration.We assume that k is odd.
The rules for the moves, which are part of the problem input for xChess, are defined as follows.The sets of legal moves for pawns and knights are defined as an arbitrary subset of their possible moves in standard chess.The set of legal moves for every other piece is defined by an 8-tuple, which denotes the maximum number of squares the piece can move in each of the eight directions (horizontal, vertical, and diagonal).Thus, one can create new kinds of pieces by appropriately defining the rules for their moves, yielding a fairly rich setting.Table 1 summarizes the results obtained on several xChess instances on a 550 MHz 8 processor Intel Pentium III Linux machine with 4 GB shared memory.The first set of instances encode an unreachability argument based on the number of moves (details in Sect.5).The second and third sets have a mix of wins for white and black, and range in hardness from being solved in a few seconds to several minutes to hours.These instances have an average of 7 quantifier alternations.We compare the performance of five state-of-the-art QBF solvers on a pure CNF encoding against Duaffle − (Duaffle without solution-or conflict-learning) with the pure games optimization on the dual encoding with the or formalism.The solvers used are the conditional solver QuaffleC [1], Quaffle [20], sKizzo version 0.8.1 [3], Semprop version 010604 [10], and Quantor version 2004.01.25 [4].These were among the top five solvers in QBF Evaluation 2005 [12].
The results clearly show that the benchmark suite of xChess instances is challenging for the best available QBF solvers.While Semprop, sKizzo, and Quaffle solve many of the instances in a few minutes, QuaffleC performs the best on the pure CNF encoding.Surprisingly, Quantor was unable to solve any of the instances of xChess we considered.As the last column of the table shows, by using the dual encoding along with Duaffle − optimized for pure games, we consistently achieve two orders of magnitude improvement even over QuaffleC.
The first set of xChess instances, conf-r1 to conf-r6, highlight an important benefit of the dual encoding, namely, fast unit propagation across quantifiers, which previous approaches did not achieve.The net effect is that while QuaffleC needs thousands of branching decisions and conflict-learning to solve these instances, Duaffle solves them during its preprocessing stage by simple constraint propagation without even a single explicit branch.This is explained as follows.These instances are based on an "unreachability" argument, namely, the white player simply has one too few steps to make the white king, K w , reach the goal square g, and therefore must lose.In our framework, this can be inferred by constraint propagation across quantifiers: if the distance between K w and g after the white player's turn t is d (denoted dist(K w , g, t) = d), then dist(K w , g, t + 1) = d, dist(K w , g, t + 2) ≥ d − 1, dist(K w , g, t + 3) ≥ d − 1, dist(K 2 , g, t + 4) ≥ d − 2, and so on, till dist(K w , g, k) ≥ 1, where k is the total number of allowed turns.These distance inequalities manifest themselves in the sets of falsified location variables capturing squares at which K w cannot be after t turns.
For the above inference to work, state information from turn t to t + 2 to t + 4, and so on, must be carried across intermediate turns of the black player through frame axioms (Sect.2.3), which involve universal variables.Technically, a CNF clause can never imply and fix the value of universal variables at steps t + 1, t + 3, etc., hindering the process of determining the locations not reachable by K w .With pure CNF, a solver must branch on intermediate universal variables and later learn that this was irrelevant.In the dual encoding, universal state variables for K w are instead implied and set by DNF terms encoding frame axioms, bridging state information between consecutive existential layers.
Note also that the number of variables in the dual encodings of xChess instances is roughly a half of pure CNF encodings because auxiliary variables are not needed.Variables in the dual encoding correspond precisely to the set of possible moves and locations for each piece, making the QBF model very clean.The "rules" are split into CNF clauses and DNF terms in proportion to the richness of the sets of pieces the two players have in each instance.

Conclusion
This paper demonstrates that by using a well-designed combination of CNF and DNF formulas as the input for QBF solvers, one can avoid many issues traditionally associated with QBF reasoning.Most tasks one intends to model as QBF have natural interpretations as generalized two-player games.Such tasks fit well into our game-theoretic formalism and translate into our dual representation.In addition to being simpler and avoiding the illegal search space issue, the dual model enhances in QBF solvers an essential technique that has made SAT solvers highly successful, namely, constraint propagation, which is now achieved across quantifiers.Our solver Duaffle outperforms state-of-the-art solvers by orders of magnitude.Finally, we believe that the full potential of solution learning techniques, which were inhibited by a pure CNF input highly biased towards conflict learning, will be unveiled once learning is re-integrated into Duaffle − .
With a bound k on the total number of turns in G, all transition axioms for the existential player E and the universal player U can be grouped together as Tr E = Tr 1 ∧ Tr 3 ∧ . . .∧ Tr odd(k) and Tr U = Tr 2 ∧ Tr 4 ∧ . . .∧ Tr even(

Example 3 .
Dual Encoding of the Chromatic Number Problem: Let (H, k) be the problem input.Let n = |V (H)| and [m] denote {1, 2, . . ., m}.Recall the game playing interpretation of this problem from Sect.2.1.The corresponding dual QBF encoding has nk existential variables x i,j with i ∈ [n], j ∈ [k] for the rules of the existential player E, and n(k − 1) universal variables y

Fig. 1 .
Fig. 1.Solver policies of Duaffle and the optimization for pure games 4).Partly due to these reasons, the experimental results we report are based on Duaffle − , a restricted version of Duaffle with no conflict learning or solution learning.If today's SAT and QBF solvers are any indication, the performance of Duaffle − can only improve by re-integrating learning. 2

Table 1 .
QBF solvers on xChess instances.T/F indicates formula is true (white wins) or false (black wins).Run-time is in seconds.-denotes time-out after 1 hour, -m-denotes out of memory, and -e-denotes runtime error related to stack overflow.