r/Python • • Feb 19 '20

I Made This Backtracking algorithm visualized with Sudoku

1.6k Upvotes

67 comments sorted by

View all comments

141

u/cyberrod411 Feb 19 '20

Cool

I had a computer science prof that always gave us assignments that involved solving puzzles. This was back in the 1980's and the language was PASCAL.

41

u/pumkinboo Feb 19 '20

Thanks I just did this one for fun, it was inspired by a post on here a few days ago of someone solving the same problem.

47

u/BovineLightning Feb 19 '20 edited Feb 20 '20

Computerphile has a video on solving sudoku in python as well

Edit link for those interested

14

u/[deleted] Feb 20 '20

[removed] — view removed comment

14

u/wsppan Feb 20 '20

You will run into a wall when the puzzles get hard or you want to solve 16x16 boards. Take a look at Norvig's solution or even better Knuth's Dancing Links for raw brilliance and beautiful if you visualize the links as they dance.