Skip to content

Python code to find all solutions of arbitrary 3x3x3 cube puzzles.

Notifications You must be signed in to change notification settings

lopeLH/pypuzzle3d

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

43 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

3x3x3 Cube Puzzle Solver

Package Installation Tests Python Linting

While having a coffee at UCLouvain's caffeteria with some colleagues, I saw a 3x3x3 wooden cube sitting on a table. When out of curiosity I grabed it, it fell apart into 6 pieces. Scared for breaking it, I looked at one of my colleagues who said:

-- "Don't worry. That puzzle is super easy to solve. In fact there are many different ways to assemble it."

That made me wonder exactly how many different solutions that puzzle had... so I created this automatic, pseudo brute-force puzzle solver to figure out.

This Python code is designed find all unique solutions of arbitrary 3x3x3 cube puzzles, exhaustively exploring the space of piece placement possitions, prunning the branches in which no solution can be found to make things faster. The solver takes the shape of the individual figures as the input.

drawing

Aside from standard libraries (numpy, matplotlib...), this code requires numba and seaborn libraries.

Solutions are saved as images in the following format:

alt text

About

Python code to find all solutions of arbitrary 3x3x3 cube puzzles.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published