Simulated Annealing Explained By Solving Sudoku - Artificial Intelligence

  Рет қаралды 82,510

Challenging Luck

Challenging Luck

Күн бұрын

Code - github.com/challengingLuck/yo...
Check this out for good luck: bit.ly/2Z1uzKM
Paper on which my work was based on: link.springer.com/content/pdf...
If you want to send me a tip. You absolutely don't have to!
Etherium: 0xae6b07d67301d4f5aed36254b19f05cc593732cb
Music by Vincent Rubinetti
Download the music on Bandcamp:
vincerubinetti.bandcamp.com/a...
Stream the music on Spotify:
open.spotify.com/album/1dVyjw...
Thank you to u/ElMaaNordos on Reddit for showing me how to draw sudoku using Manim

Пікірлер: 88
@freyappari
@freyappari 9 ай бұрын
I love how you talked about finding the initial temperature, this is often overlooked.
@ChallengingLuck
@ChallengingLuck 9 ай бұрын
Thanks for noticing :)
@victoryfile
@victoryfile 3 жыл бұрын
This is very, very good. Thanks CL! Would've appreciated this a month back when I didn't yet understand there Metaheuristics.
@ChallengingLuck
@ChallengingLuck 3 жыл бұрын
I love hearing this! Glad you found the video helpful now :) Thank you for the kind words!
@ramnarasimhan1499
@ramnarasimhan1499 3 жыл бұрын
Very well explained. I thank you for taking the time to create this video. Wishing you 100s of views. Keep going!
@ChallengingLuck
@ChallengingLuck 3 жыл бұрын
Thank you. I really appreciate it!
@Samedhi1
@Samedhi1 3 жыл бұрын
Shoot, I clicked with force and not gently. I'll do better next time.
@heltichound
@heltichound 3 жыл бұрын
Loved the video! Crazy how you don't have more subs - looking forward to more content :)
@ChallengingLuck
@ChallengingLuck 3 жыл бұрын
Thank you for the kind words and support!
@ericlove7415
@ericlove7415 3 жыл бұрын
Very well done! Keep up the grat work!
@gabrielcesar568
@gabrielcesar568 3 жыл бұрын
What a good video. Concise and right to the point explanation! Thanks for posting
@ChallengingLuck
@ChallengingLuck Жыл бұрын
Glad it was helpful
@LiebsterFeind
@LiebsterFeind Ай бұрын
Simulated congealing at the low temperature phase. :) Great video, thanks!
@goganii
@goganii 3 ай бұрын
thank you, you helped me a lot for my assignment !
@ericevans3351
@ericevans3351 2 жыл бұрын
This code is niccccce. Big ups to you guys. Freakin brilliant
@ChallengingLuck
@ChallengingLuck Жыл бұрын
Thank you so much.
@user-os5il2pc1s
@user-os5il2pc1s 3 жыл бұрын
I can recognise 3b1b here :D Nice video ;)
@ChallengingLuck
@ChallengingLuck 3 жыл бұрын
I was using the library that he made. It’s called Manim :D
@bobbobson4030
@bobbobson4030 2 жыл бұрын
@@ChallengingLuck Was about to ask this!
@swayson5208
@swayson5208 Жыл бұрын
Good explanation. Visualisations are fantastic
@MMarcuzzo
@MMarcuzzo 3 жыл бұрын
I am a fan of simulated annealing since I've read the original paper and have seem how useful it can be! Applying it can be tricky, but wonderful to see when working. Really cool!
@ChallengingLuck
@ChallengingLuck Жыл бұрын
Totally agree!
@aidanrabinowitz8155
@aidanrabinowitz8155 4 ай бұрын
Awesome video!
@EvertonPortela
@EvertonPortela 3 жыл бұрын
Maravilha, ótima explicação e compreensão da solução. Me ajudou muito
@andresescamilla4130
@andresescamilla4130 5 ай бұрын
Great video! thank you so much!
@mayureshharihar2557
@mayureshharihar2557 Жыл бұрын
How simple and great explanation it is... Very interactive!!
@ChallengingLuck
@ChallengingLuck 9 ай бұрын
Thank you! 😃
@hernanpatricioleivatorres1860
@hernanpatricioleivatorres1860 2 жыл бұрын
Thanks broo, for the video and for the Code, greetings from Chile
@ChallengingLuck
@ChallengingLuck Жыл бұрын
Glad to know you found it helpful.
@CreativePuppyYT
@CreativePuppyYT 3 жыл бұрын
Why 2 separate functions? And what does temperature mean in this situation? And a cooling rate
@ChallengingLuck
@ChallengingLuck 3 жыл бұрын
Temperature is just a term used in simulated annealing. It comes from metal work. When the temperature is high, more random moves are allowed. As the temperature decreases, the algorithm will only accept a configuration that’s better than the previous one. Good question!
@roel250
@roel250 3 жыл бұрын
This helped a lot, thank you!
@ChallengingLuck
@ChallengingLuck Жыл бұрын
This makes me very happy to hear.
@dmanrox2
@dmanrox2 Жыл бұрын
Would have been nice to see a comparison between the steps in simulated annealing vs. brute force backtracking. Brute force backtracking can also solve sudoku very quickly since it isn't that hard of a problem space
@ChallengingLuck
@ChallengingLuck Жыл бұрын
Backtracking is computationally faster than SA for solving sudo.
@pauljones9150
@pauljones9150 2 жыл бұрын
Very cool. Short, well written script
@ChallengingLuck
@ChallengingLuck Жыл бұрын
Thanks for the kind words.
@arulandu
@arulandu Жыл бұрын
Is there a reason why you don't also sum the duplicates in each 3x3 square of the sudoku? A valid solution with distinct numbers in each column and row does not guarantee a sudoku solution, correct? Also at 0:57 shouldn't the temperature graph have # of states checked on the x-axis? This confused me a little bit, but Wikipedia set me straight. Regardless, it was a pretty helpful video, and I liked the 3b1b music :)
@ChallengingLuck
@ChallengingLuck Жыл бұрын
When the 3x3 squares are randomly built, I make sure that there are no duplicates. That's the reason why I only check rows and columns for duplicates.
@arulandu
@arulandu Жыл бұрын
Ah ok, makes sense.
@chuchiyin0425
@chuchiyin0425 Жыл бұрын
Thankyou for your sharing. It is helpful to me. :)
@ChallengingLuck
@ChallengingLuck Жыл бұрын
Great to hear!
@angelvillegas2056
@angelvillegas2056 3 жыл бұрын
Great video! 😃
@ChallengingLuck
@ChallengingLuck 3 жыл бұрын
Thanks! 😃
@thaizaloiola7538
@thaizaloiola7538 Жыл бұрын
👏very clear!
@ChallengingLuck
@ChallengingLuck Жыл бұрын
Glad it was helpful!
@kabira8283
@kabira8283 3 жыл бұрын
what paper did you use as a basis for the code?
@ChallengingLuck
@ChallengingLuck 3 жыл бұрын
Check the description of the video :)
@kabira8283
@kabira8283 3 жыл бұрын
@@ChallengingLuck thanks
@littlebeantheboss423
@littlebeantheboss423 5 ай бұрын
This looks like the same animation style as 3 blue 1 brown. Is there a specific software you use?
@ChallengingLuck
@ChallengingLuck 4 ай бұрын
Python library in python called Manim
@thomasbradley2916
@thomasbradley2916 Жыл бұрын
Class video , thanks
@ChallengingLuck
@ChallengingLuck Жыл бұрын
No problem 👍Thanks for the kind words.
@yuxiang3147
@yuxiang3147 2 жыл бұрын
Why don't you simply reject the actions/flips that increase the system energy and accept the ones that decrease the energy? Why use the probability (i.e. shouldn't the probability just be 100% and 0%)?
@ChallengingLuck
@ChallengingLuck 2 жыл бұрын
Good question. The reason for that is because even though some actions might reduce the energy you could reach a local minimum, not a global minimum. In the Sudoku case you could reach a point where you only have 2 errors let's say but in order to solve the puzzle you need to shuffle more than just those two numbers. In that just going with the option that decreases energy would get you stuck. Hope this helps.
@yuxiang3147
@yuxiang3147 2 жыл бұрын
@@ChallengingLuck Ah makes sense. Thank you.
@sohaybelyaktini4806
@sohaybelyaktini4806 3 ай бұрын
merciiii infiniment
@MexxProtect
@MexxProtect 2 жыл бұрын
You never explained at what point the temperature is lowered and by what amount. Also, how do you get the initial temperature value?
@ChallengingLuck
@ChallengingLuck 2 жыл бұрын
Thanks for the question! The temperature is continuously dropping from the moment the algorithm starts. As the algorithm runs, the temperature drops at a constant rate. I explain how I set the starting temperature at minute 4:33.
@tayyabikhlaq5354
@tayyabikhlaq5354 2 жыл бұрын
very good explanation
@ChallengingLuck
@ChallengingLuck Жыл бұрын
Thanks for liking
@sabaabuarar7509
@sabaabuarar7509 3 жыл бұрын
Thank you
@ChallengingLuck
@ChallengingLuck 3 жыл бұрын
You're welcome! New video coming soon!
@guledaaydemir
@guledaaydemir Жыл бұрын
Thank you
@ChallengingLuck
@ChallengingLuck Жыл бұрын
You're welcome
@conorwalsh4618
@conorwalsh4618 2 жыл бұрын
Brilliant explanation!
@ChallengingLuck
@ChallengingLuck Жыл бұрын
Thank you!
@user-wo5uy1pk6w
@user-wo5uy1pk6w Жыл бұрын
Assume a column or a row is like 1 2 3 2 5 6 2 8 9. What's the cost of the column or the row?
@ChallengingLuck
@ChallengingLuck Жыл бұрын
The cost would be 3.
@nilakshkashyap8936
@nilakshkashyap8936 5 ай бұрын
@@ChallengingLuck shouldn't the cost be 2 considering there are 2 duplicates of "2" and 1 is original.
@anassbakkali6442
@anassbakkali6442 3 жыл бұрын
thanks i think the total cost is 39 and not 38 as the number of duplicates in row 4 is 2 and not 1
@ChallengingLuck
@ChallengingLuck Жыл бұрын
True. That was a typo.
@GOODBOY-vt1cf
@GOODBOY-vt1cf 2 жыл бұрын
3:13
@ChallengingLuck
@ChallengingLuck Жыл бұрын
Thanks for the timestamp
@quantumboss500yearsago2
@quantumboss500yearsago2 Жыл бұрын
Is there a evidence that this is better than just local search algorithm
@ChallengingLuck
@ChallengingLuck Жыл бұрын
Didn't make any such claims.
@TheZ10Z
@TheZ10Z 3 жыл бұрын
this video is quite confusing. Some suggestions: -You should write on screen almost everything you say. -You should mark which is point fx1, fx2, and so on...
@ChallengingLuck
@ChallengingLuck 3 жыл бұрын
Thanks for the suggestions. I totally agree with naming fx1 and fx2 to make it clearer in the graph. I appreciate the feedback!
@farhanrafid8584
@farhanrafid8584 3 жыл бұрын
Manim
@ChallengingLuck
@ChallengingLuck Жыл бұрын
Absolutely
@Leon-pn6rb
@Leon-pn6rb Жыл бұрын
This video was too hard to follow, dropped off at 2:10 👎
@ChallengingLuck
@ChallengingLuck Жыл бұрын
Reach out to me and I’ll give you a free 1h session where I explain SA.
@saganandroid4175
@saganandroid4175 3 жыл бұрын
Seems inefficient.
@ChallengingLuck
@ChallengingLuck 3 жыл бұрын
The goal of the video was to explain Simulated Annealing. You can solve Sudoku faster using backtracking. Feel free to watch my video on backtracking.
@sallerc
@sallerc 2 ай бұрын
It was not clear which point was x1 & x2 @ 2:20, when you look at youtubes replay-graph it seems I was not alone :)
@josbexerra8115
@josbexerra8115 Жыл бұрын
Muy bien explicado Mister Luck.....saludos de los andes peruanos
@ChallengingLuck
@ChallengingLuck Жыл бұрын
Thanks for the comment. Glad you found it helpful.
@sallerc
@sallerc 2 ай бұрын
"Tap the like button gently" 😀
Genetic Algorithms Explained By Example
11:52
Kie Codes
Рет қаралды 319 М.
Simulated Annealing
17:45
Adam Gaweda
Рет қаралды 11 М.
Sigma Kid Hair #funny #sigma #comedy
00:33
CRAZY GREAPA
Рет қаралды 40 МЛН
小蚂蚁被感动了!火影忍者 #佐助 #家庭
00:54
火影忍者一家
Рет қаралды 30 МЛН
ПРОВЕРИЛ АРБУЗЫ #shorts
00:34
Паша Осадчий
Рет қаралды 7 МЛН
Эффект Карбонаро и нестандартная коробка
01:00
История одного вокалиста
Рет қаралды 10 МЛН
The simulated annealing algorithm explained with an analogy to a toy
11:16
A Sudoku Secret to Blow Your Mind - Numberphile
6:08
Numberphile
Рет қаралды 1,6 МЛН
Generative AI in a Nutshell - how to survive and thrive in the age of AI
17:57
The Most Metal Algorithm in Computer Science
6:47
SciShow
Рет қаралды 249 М.
Algorithms Explained - minimax and alpha-beta pruning
11:01
Sebastian Lague
Рет қаралды 1 МЛН
Hill Climbing Algorithm & Artificial Intelligence - Computerphile
7:20
The Knapsack Problem & Genetic Algorithms - Computerphile
12:13
Computerphile
Рет қаралды 227 М.
319 - What is Simulated Annealing Optimization​?
14:17
DigitalSreeni
Рет қаралды 2 М.
Solving Wordle using information theory
30:38
3Blue1Brown
Рет қаралды 10 МЛН
The Traveling Salesman Problem: When Good Enough Beats Perfect
30:27
Sigma Kid Hair #funny #sigma #comedy
00:33
CRAZY GREAPA
Рет қаралды 40 МЛН