Skip to content

truist/puzzle

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Calibron 12 solver

This is a JavaScript / node.js tool that finds the solution to the Calibron 12 puzzle. The internet also has a great overview of the origins of the puzzle, some ways people have approached solving it, and how the puzzle has changed over the years.

To run this, run node puzzle.js.

This is a brute-force solver that simply searches for a solution via iteration, but it does it very efficiently. Even though there are 12! (479,001,600) permutations possible, this tool can find the solution in 65ms on an Apple Silicon M1 (and it's single-threaded JavaScript!). It can find all variations of the solution (i.e. rotations and swaps) (i.e. evaluate the entire search space) in 13 seconds.

I'm not going to publish the solution, but I'll send it to anyone who asks for it.

To run the tests:

npm install
node_modules/.bin/mocha

Releases

No releases published

Packages

No packages published