Coder Social home page Coder Social logo

rubiks_sudoku's Introduction

This software is released in the public domain.  See LICENSE.

This software was originally written in 2013 by Allen Hubbe.

I wrote this simple solver because I received a Sudoku cube as a gift.

Thanks Philip!

A Sudoku cube is like a Rubik's cube, except each square has a number, and the
cube is solved by having each number appear exactly once on each side.

Let's not get too picky about names here, but yes Rubik's is a brand name, and
not all cubes are made by Rubik's.  When I talk about Rubik's cubes, I mean
cubes that look like and can be manipulated the same way a traditional Rubik's
cube.

To use the program, yes you do need to edit the source code, because I didn't
write any support for reading start states from a file.  The start state is
coded in search.py, for searching, and sudoku.py, for solving the goal state.
Getting the start state coded right can be tricky!  If the solver can't find a
solution, try putting the Rubik's equivalent problem in one of the faster
Rubik's solvers, then walk through the solution with walk.py.  That's what I
did the first time :).  There are some good Rubik's solvers out there.

Each number also has an orientation (i.e. which side should be up), so this is
equivalent to a Rubik's picture cube.  This solver uses the orientation to
quickly find the goal state, then uses bidirectional search to find an optimal
solution.  The solution doesn't track orientation, so it is possible to arrive
to a solution where the center squares on each side are oriented wrong.  In
this case, you can find instructions on the web for rotating the center squares
on a picture cube.

rubiks_sudoku's People

Contributors

allenbh avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.