Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

A small DLX based Sudoku Solver in Ruby. Comes with a general purpose DLX implementation

branch: master

Links in README fixed

latest commit 973cfd7740
Mathias Biilmann Christensen authored May 28, 2009
Octocat-spinner-32 README.md
Octocat-spinner-32 dlx.rb First commit May 28, 2009
Octocat-spinner-32 examples.rb First commit May 28, 2009
Octocat-spinner-32 sudoku_solver.rb
README.md

Ruby DLX Based Sudoku Solver

This is a small DLX based sudoku solver made in Ruby. DLX, or Dancing Links X is an algorithm for solving exact cover problems by brute force, taking advantage of a clever way of juggling around with the pointers in a sparse matrix of doubly linked list.

The original paper is available at arxiv.org.

The two important files in this repository is dlx.rb - a general implementation of the DLX constraint solving algorithm, and sudoku_solver.rb - which does the setup of the sparse matrix for a given sudoku and translates from the dlx result to a sudoku solution.

The solver (extracted into a C extension) is used to generate the sudokus at my simple sudoku challenge challenge page.

Something went wrong with that request. Please try again.