Python Sudoku Solver Tutorial with Backtracking p.1

preview_player
Показать описание
This Sudoku solver tutorial uses python and the backtracking algorithm to find a solution to any solvable sudoku board. In this part of the tutorial I explain how backtracking works and how we will use it to accomplish our goal of finding a solution.

◾◾◾◾◾
💻 Enroll in The Fundamentals of Programming w/ Python

◾◾◾◾◾◾

⚡ Please leave a LIKE and SUBSCRIBE for more content! ⚡

Tags:
- Tech With Tim
- Sudoku Solver Python
- Python sodoku sovler tutorial
- Python sodoku
- Soudku solver with backtracking
- Python Tutorials
Рекомендации по теме
Комментарии
Автор

Dude I have been struggling to understand backtracking for a long time now. You just made it so simple to understand. Thanks for the video

BigFatSandwitch
Автор

Tim explains the backtrack algo really well, and I give him credit for writing the code on the fly instead of having it pre-canned. He is a real programmer's programmer. I am going to follow alone but I want to tweak it a bit and use a RANDOM function to pick the an empty square. And then do a monte carlo simulaton with time lapse to compare. I am going to make my CPU work! Good job.

edwardwong
Автор

Thank you so much for this series, I will definitely finish it. I have always been intimidated by algorithms and AI-related topics, but this video helped me become more comfortable with that.

hdxcxnd
Автор

By the way, 9^81 is very much above trillions (10^12). In fact, it is nine hundred quinvigintillion

oneeyedjack
Автор

very interesting. Will be a good series. Thanks Tim.

officesuperhero
Автор

thanks Tim it's the best one I saw

estevanmaidaa
Автор

You are killing it. Really you are inspiring me to learn programming. Maybe this isn't the vauu thing to learn but I fell that I am learning something. ( Not wasting time ) Thanks a lot

ramizquliyev
Автор

Thank you for putting the mistakes in, it helps a new learner like me!

melbbb
Автор

That was fun. On to the next one. Cool vid. Thx

stuartjacobs
Автор

You could avoid having things like 'range(len(bo[0]))' and 'bo[i][j]' by using the enumerate() function, which takes an iterable (in this case bo) and returns an enumerate object which can be iterated over for index- value pairs. In code you'd write:

for i, row in enumerate(bo):
for j, val in enumerate(row):
if val == 0:
return (i, j)

It's a very useful function if you need to iterate over both the index and the value at that index.

ninesquared
Автор

Great video! keep upload more code using different algorithms :)

LawZist
Автор

Just the series I've been looking for man!
Thanku

mortenb
Автор

Thank you Tim! I finally understood it! :D

rock
Автор

Hey Tim! I'm Brasilian but i love ur videos. I'm starting now at python.

Plengueiraa
Автор

I found your explanation on backtracking really useful!

flamexc
Автор

Hey Tim, love your videos! Thanks for making them. What would be the best way to randomly generate a partially solved Sudoku puzzle as an array of lists like you have in this video?

trenttagestad
Автор

Lovely bro !
Thanks a lot for your donations for others.

ThePzr
Автор

You make really awesome and interesting and useful videos sir

avvn
Автор

I survived my BSc thanks to this chanell, now it's saving my life in masters, Thank you!

Krieananas
Автор

Great video! 9^81 assumes every square has 9 options but every correctly placed number significantly decreases the number of possible numbers. The actual number is surprisingly not as big as you would expect. Nevertheless it is much better to use the backtracking approach.

dylanroberts