Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in AI and Deep Learning by (50.2k points)

I am developing a 15 puzzle sliding puzzle game using JavaScript. As half of the combinations in a 15 puzzle is unsolvable I use the formula in http://mathworld.wolfram.com/15Puzzle.html to check the solvability. I am currently adding the option to switch to 8 puzzles (3x3). Are there unsolvable combinations in 8 puzzle too? If so can I use the same formula for it too?

1 Answer

0 votes
by (108k points)

You can find half of the configurations of an n-puzzle game are unsolvable as stated below: 

https://en.wikipedia.org/wiki/15_puzzle

The 14-15 Puzzle and other unsolvable problems are stated below:

http://www.math.ubc.ca/~cass/courses/m308-02b/projects/grant/fifteen.html

Browse Categories

...