Solving Rubik's Cube Using SAT Solvers

05/07/2011
by   Jingchao Chen, et al.
0

Rubik's Cube is an easily-understood puzzle, which is originally called the "magic cube". It is a well-known planning problem, which has been studied for a long time. Yet many simple properties remain unknown. This paper studies whether modern SAT solvers are applicable to this puzzle. To our best knowledge, we are the first to translate Rubik's Cube to a SAT problem. To reduce the number of variables and clauses needed for the encoding, we replace a naive approach of 6 Boolean variables to represent each color on each facelet with a new approach of 3 or 2 Boolean variables. In order to be able to solve quickly Rubik's Cube, we replace the direct encoding of 18 turns with the layer encoding of 18-subtype turns based on 6-type turns. To speed up the solving further, we encode some properties of two-phase algorithm as an additional constraint, and restrict some move sequences by adding some constraint clauses. Using only efficient encoding cannot solve this puzzle. For this reason, we improve the existing SAT solvers, and develop a new SAT solver based on PrecoSAT, though it is suited only for Rubik's Cube. The new SAT solver replaces the lookahead solving strategy with an ALO (at-least-one) solving strategy, and decomposes the original problem into sub-problems. Each sub-problem is solved by PrecoSAT. The empirical results demonstrate both our SAT translation and new solving technique are efficient. Without the efficient SAT encoding and the new solving technique, Rubik's Cube will not be able to be solved still by any SAT solver. Using the improved SAT solver, we can find always a solution of length 20 in a reasonable time. Although our solver is slower than Kociemba's algorithm using lookup tables, but does not require a huge lookup table.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
07/02/2018

A SAT Encoding for the n-Fractions Problem

This note describes a SAT encoding for the n-fractions puzzle which is p...
research
09/23/2020

Efficient Incremental Modelling and Solving

In various scenarios, a single phase of modelling and solving is either ...
research
12/04/2012

An Empirical Evaluation of Portfolios Approaches for solving CSPs

Recent research in areas such as SAT solving and Integer Linear Programm...
research
10/07/2021

Solving Rep-tile by Computers: Performance of Solvers and Analyses of Solutions

A rep-tile is a polygon that can be dissected into smaller copies (of th...
research
10/27/2018

A comparison of encodings for cardinality constraints in a SAT solver

Cardinality constraints are important in many Sat problems; previous stu...
research
08/04/2013

On estimating total time to solve SAT in distributed computing environments: Application to the SAT@home project

This paper proposes a method to estimate the total time required to solv...
research
03/02/2011

Decentralized Constraint Satisfaction

We show that several important resource allocation problems in wireless ...

Please sign up or login with your details

Forgot password? Click here to reset