Skip to main content
QUICK REVIEW

[논문 리뷰] Solving Rubik's Cube Using SAT Solvers

Jingchao Chen|arXiv (Cornell University)|2011. 05. 07.
Formal Methods in Verification참고 문헌 5인용 수 3
한 줄 요약

이 논문은 루빅스 큐브를 최적해로 해결하기 위해 SAT 솔버를 처음으로 성공적으로 적용한 것으로, 288개에서 96개로 변수를 줄이는 데에 사용된 새로운 SAT 인코딩 기법과 층 기반 이동 인코딩을 통해 구현되었다. 저자들은 PrecoSAT를 개선하여 ALO(최소한 하나) 해결 전략과 부분 문제 분해를 도입함으로써, 큰 검색 표를 필요로 하지 않고도 합리적인 시간 내에 길이 20의 최적해를 찾을 수 있도록 하였다.

ABSTRACT

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 (\emph{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.

연구 동기 및 목표

  • 루빅스 큐브에 대한 효율적인 SAT 인코딩을 개발하기 위해, 최적 성질이 알려져 있지 않은 고전적인 계획 문제에 대해 연구한다.
  • 루빅스 큐브와 같은 복잡한 상태 전이 퍼즐을 해결할 때 기존 SAT 솔버의 한계를 극복한다.
  • 퍼즐의 구조에 맞게 최적의 해를 찾을 수 있도록 특화된 새로운 SAT 해결 전략을 설계한다. 이는 큰 검색 표를 사용하지 않고도 가능하다.
  • SAT 솔버가 문제 특화 최적화와 결합될 경우, 루빅스 큐브와 같은 어려운 조합 퍼즐을 해결할 수 있음을 입증한다.

제안 방법

  • 면각각에 대해 6변수 인코딩을 사용하는 기존 방식을 2또는 3변수 인코딩으로 대체하여 부울 변수 수를 288개에서 96개 또는 144개로 줄인다.
  • 18종의 이동 유형을 6종의 기본 회전 유형으로 나누어 층 기반 인코딩을 사용함으로써 절차 수를 줄이고 확장성을 향상시킨다.
  • 두 단계 알고리즘의 1단계 목표 상태를 CNF 공식에 추가 제약 조건으로 도입하여 탐색을 안내한다.
  • AMO 제약 조건 변수를 기반으로 부분 문제로 분해하는 새로운 ALO(최소한 하나) 해결 전략을 구현한다.
  • AMO 절차에 참여하는 决책 변수 선택 기반으로 PrecoSAT를 개선하고, 부분 문제를 별도로 해결한다.
  • 두 단계 알고리즘의 힌트 정보를 CNF 인코딩에 통합하여 탐색 공간을 줄인다.

실험 결과

연구 질문

  • RQ1현대의 SAT 솔버는 상태 공간 복잡도가 높은 잘 알려진 계획 문제인 루빅스 큐브에 효과적으로 적용될 수 있는가?
  • RQ2루빅스 큐브 표현에서 변수 수와 절수를 최소화하기 위한 최적의 SAT 인코딩 전략은 무엇인가?
  • RQ3큰 검색 표나 패tern 데이터베이스에 의존하지 않고도 SAT 솔버가 최적의 해(길이 20)를 찾을 수 있는가?
  • RQ4두 단계 알고리즘의 구조를 어떻게 CNF에 인코딩하여 해결 효율을 향상시킬 수 있는가?
  • RQ5ALO와 부분 문제 분해를 결합한 하이브리드 SAT 해결 전략이 이 퍼즐에서 표준 SAT 해결 방식보다 뛰어난 성능을 보일 수 있는가?

주요 결과

  • 제안된 SAT 인코딩은 부울 변수 수를 288개에서 96개로 줄여 문제 크기를 크게 감소시켰다.
  • ALO 전략과 부분 문제 분해를 통합한 개선된 SAT 솔버는 합리적인 시간 내에 길이 20의 최적해를 성공적으로 찾았다.
  • 10개의 임의로 생성된 큐브 상태에 대해, 솔버는 7,000초 이내에 길이 ≤20의 해를 찾았으며, 일부는 100초 이내였다.
  • 1단계 길이가 사전에 알려져 있을 경우(예: 13수), 솔버는 310초 이내에 최적의 20수 해를 찾을 수 있었다.
  • 이 방법은 오직 10MB의 RAM만을 사용하여, 검색 표 기반 방법에 비해 매우 낮은 메모리 사용량을 보였다.
  • 검색 표 기반 알고리즘보다 느리지만, 거대한 사전 계산된 데이터베이스가 필요로 하지 않는다는 점에서 장점이 있다.

더 나은 연구,지금 바로 시작하세요

논문 읽기부터 검토까지, 연구 시간을 획기적으로 줄여보세요.

카드 등록 없음 · 무료 플랜 제공

이 리뷰는 AI가 만들고, 인간 에디터가 검토했습니다.