Skip to content
0:00 / 0:00

#sudoku#backtracking#recursion

Python Sudoku Solver - Computerphile

Computerphile

2.6M subscribers • 89 videos on Hallway

YouTube
  • Recommended by 2 people: 2 in engineering communities.
  • Presented by Thorsten Altenkirch, Professor

Beginner. No background in the topic needed.

1.2M views6 years ago2 recommendations

Computer scienceProgramming languagesPythonAlgorithmsData structures

Thorsten Altenkirch explains how to write a recursive backtracking Sudoku solver in Python.

Fun comes in many forms - playing puzzles, or writing programs that solve the puzzles for you. Professor Thorsten Altenkirch on a recursive Sudoku solver. facebook.com/computerphile twitter.com/computer_phile This video was filmed and edited by Sean Riley. Computer Science at the University of Nottingham: bit.ly/nottscomputer Computerphile is a sister project to Brady Haran's Numberphile. More at bradyharan.com

Why it's here

2 people recommend this

What people say. Recommended as a helpful guide for understanding backtracking and recursion when stuck on solving grid-based problems.

Moments people linked to

u/hugograntin r/compsci • Recommends

On “Projects that create things rather than solve things?”

If this is the first time you've been stuck like this, I wouldn't draw such a general conclusion. It's likely just a matter of inexperience. I'd recommend looking up a solution this time. Perhaps link to this video can help. Coming up on problems you don't know how to solve is a good sign! You should keep on it! In fact, knowing how you're going to solve everything or make the thing, it's a sign of stagnation, and you should try something new. This Sudoku project is a great example -- and I hope you find others.

u/amedeo39in r/rust • Recommends

On “Mutable 2d array not modified by called function”

You're right. I was sure that the error was in my rust knowledge because I actually copied the code from a Computerphile video: [video I just rewatched it and it says what you just wrote, I wasn't careful enough. Thank you
1View on Reddit

u/amedeo39in r/rust • Recommends

On “Mutable 2d array not modified by called function”

That assignment is necessary for backtracking, because to solve a sudoku you need to explore many different possible values for a cell; if the choice is wrong, you need to backtrack to where you made that wrong choice. The correct answer is here together with the video where i took my code from.
1View on Reddit