A* Search

  Рет қаралды 436,968

John Levine

John Levine

Күн бұрын

Пікірлер: 348
@7sparksai
@7sparksai 6 ай бұрын
7 years later, this is still best video available
@miladnoori2098
@miladnoori2098 5 ай бұрын
i agree
@pranavdeshmukh311
@pranavdeshmukh311 4 ай бұрын
I agree
@nocredits8066
@nocredits8066 3 ай бұрын
i gree
@johnlevine2909
@johnlevine2909 3 ай бұрын
Thank you!
@a.m.4154
@a.m.4154 3 ай бұрын
He's the only one that got it right imo.
@NikosXouselas10
@NikosXouselas10 3 жыл бұрын
Absolute legend. This dude has literally been more helpfull than I could ever imagine! Insane work!
@jm.101
@jm.101 11 күн бұрын
Calm repetition of important facts/concepts is what makes this so helpful. It's like my Latin teacher always said: Repetitio est mater studiorum.
@tashijawed5472
@tashijawed5472 2 жыл бұрын
Great Explanation, as always. Just want to add one thing. at 9:43 When we reached node G2 with a cost of 13, we will stop the algorithm and won't go further with "E" node. Why? because it uses Priority Queue, the algorithm will stop once it finds a Goal node with a cost "less than or equal" to costs of other nodes. And it makes sense!! because once you reached G2 with a cost of 13, even if you have another node with the same cost, there's no point in checking it because it will only add to the cost.
@peterlawrence3505
@peterlawrence3505 Жыл бұрын
But if the heuristic was not admissible this would not be the case right?
@mostafakarimi1733
@mostafakarimi1733 5 жыл бұрын
One of the best explanation of A* algorithm I've ever seen, Thank you Sir and I hope you create more videos about AI
@terrycamerlengo5492
@terrycamerlengo5492 4 жыл бұрын
This channel with John Levine is awesome. What a great lecturer! Great channel! Thank you!
@whiningmachine
@whiningmachine 2 жыл бұрын
Thank you for this explanation. You have no idea how many pages and videos I had to go through before somebody explained that the heuristic indicates the estimated cost to a goal node. I had no idea why we only added the destination node's heuristic to the total (and not the other nodes' heuristics along the path), and now I know. Thanks!
@nitinneo7
@nitinneo7 5 жыл бұрын
The most coherent explanation of A* algorithm with an example. Thank you for saving our time and energy.
@Geek-jx3gw
@Geek-jx3gw 3 жыл бұрын
throwback 2 years ago, you helped me to pass my exam and understand this algorithm really well
@balochx
@balochx 3 жыл бұрын
How's life?
@Geek-jx3gw
@Geek-jx3gw 3 жыл бұрын
@@balochx Amazing
@balochx
@balochx 3 жыл бұрын
@@Geek-jx3gw stay amazing!
@Geek-jx3gw
@Geek-jx3gw 3 жыл бұрын
@@balochx i didnt know what to answer but, life is not organized or as i wanted but it is better now 2 years before I was a stressed person, stressed about a lot of things including my future, grades, etc now, i am older and i changed into a better version of me i guess, less stressed, i love my struggles, i love to help people as much as i can, I’m trying my best to be good enough for me and my family so yeah life is amazing now🙌🏻
@balochx
@balochx 3 жыл бұрын
@@Geek-jx3gw thank you so much for sharing. and yes, ups and downs are a part of life. no one is completely satisfied with his/her life, we just have to embrace it and strive for the good. helping people for no agenda brings out huge happiness. and it was nice knowing about your story. I love hearing common people rather than famous people who are faking everything. Stay blessed 🙌
@tollwutpinguin
@tollwutpinguin 11 ай бұрын
Thank you for providing free educational content of such high quality! The world needs more lecturers like yourself
@dennissaluaar9103
@dennissaluaar9103 5 жыл бұрын
I am studying an introductory course in Artificial Intelligence here in Gothenburg, this short lecture made the A* very clear to me. Thank you!
@Leyan_leyuna
@Leyan_leyuna 13 күн бұрын
calm,simple and interestig video.......... i liked it Thanks alot
@KuliahInformatika
@KuliahInformatika 2 жыл бұрын
I love the way you explain the algorithm... easy to understand...
@dushanrathnayake5007
@dushanrathnayake5007 3 жыл бұрын
Just brilliant! Thank you so much! At 5:53 the A* score for A is 17 (5 + 3 +2 + 7) instead of 20 I think.
@johnlevine2909
@johnlevine2909 3 жыл бұрын
Thank you, and well spotted!
@coxixx
@coxixx 7 жыл бұрын
the best teacher on the web
@johnlevine2909
@johnlevine2909 7 жыл бұрын
Thanks. Glad you liked it.
@abhishekravichandran6965
@abhishekravichandran6965 4 жыл бұрын
kzbin.info/door/M-yUTYGmrNvKOCcAl21g3w she is the best bruh
@runneypo
@runneypo 4 жыл бұрын
@@abhishekravichandran6965 she has no video on a star though
@vakiljay8686
@vakiljay8686 3 жыл бұрын
@@abhishekravichandran6965 S I M P
@heer1359
@heer1359 3 жыл бұрын
@@abhishekravichandran6965 S I M P
@NinaHProductions1
@NinaHProductions1 6 жыл бұрын
You are the best teacher and provide the cleanest of explanations - at 5:53 the A* score for A is 17 (5 + 3 +2 + 7) instead of 20 I think?
@que_93
@que_93 6 жыл бұрын
It should be 17, not 20.
@ngusumakofu1
@ngusumakofu1 6 жыл бұрын
Indeed it should be 17
@JackyShaw
@JackyShaw 6 жыл бұрын
I agree too.
@know_how5661
@know_how5661 6 жыл бұрын
yup... its 17
@sussananukem7101
@sussananukem7101 5 жыл бұрын
Nope... He's correct. He readded the path cost from A to B since we are revisiting A. That is: 5+3+(3)+2+7 =20
@mohammadvasegh1754
@mohammadvasegh1754 4 жыл бұрын
in our country, today is teacher's day good sir. thank you for all of your clarification and examples that you've solved and happy teacher's day to you
@johnlevine2909
@johnlevine2909 4 жыл бұрын
Thank you Mohamad! I'm really glad you find the videos useful.
@HafizAsimNawaz
@HafizAsimNawaz 7 жыл бұрын
I love this man...... you rocked sir... hats off
@johnlevine2909
@johnlevine2909 7 жыл бұрын
Thank you! Glad you found it useful.
@koibathekingofgames8522
@koibathekingofgames8522 Жыл бұрын
The best exemplification that I found until now, It`s worth watching.
@nihilrocks
@nihilrocks Жыл бұрын
Truly a godsend! Saved me 5 marks on my A levels 15mins before the exam. Couldn't have explained it better!
@breadsteeth2562
@breadsteeth2562 2 жыл бұрын
Love from China. Clear explanation and it helps me a lot. Thank you!
@niled.r.1639
@niled.r.1639 2 жыл бұрын
What to consider when defining the heuristic values? ...or how to calculate these values? - (Normally?) the "costs" represent distances or times, what other examples have you seen?
@prakashbhattarai947
@prakashbhattarai947 Жыл бұрын
If both heuristic and cost of paths are guranteed to be positive, is it necessary to store A* score in visited list ? 2:12
@AsomyTraiget
@AsomyTraiget 5 ай бұрын
Thank you very much for these efforts, greetings from Libya
@Dr.SamirKumarSadhukhan-jw1wk
@Dr.SamirKumarSadhukhan-jw1wk 18 күн бұрын
Sir, I request you to make another video on the state-of-the-art bidirectional heuristic search BAE*.
@zaid_marridi
@zaid_marridi 7 жыл бұрын
Thank you for this simple and great explanation... You're simply the best at this. Clean, clear, easy and very informative What else could someone ask for?!!!
@555to_infinity
@555to_infinity 5 жыл бұрын
Wow. Perfect lecture on A* search. Highly recommended!
@MohammadAwad-s8y
@MohammadAwad-s8y 11 ай бұрын
Hello Prof John, I want to thank you for the great and clear explanation! I just have one question, shouldn't the total A* score at @5:58 be (5+3+2)+7 = 17 instead of 20?
@therealajmelmuadz
@therealajmelmuadz 8 ай бұрын
I was thinking the exact same thing! Glad I'm not the only one who was wondering if this is an error. Still not sure why he said 20 instead of 17.
@husseinsylla4850
@husseinsylla4850 2 жыл бұрын
Hello Sir, Best tutorial I have covered on A* algorithms. Clear and complete, include all explanations for f(n)=g(n)+h(n) and over-estimations of theoritical heuristics. Brilliant. Thank you so much.
@bars5762
@bars5762 3 жыл бұрын
I'm not very good in English but your explaination is very easy to listen and understand. Thank you very much!
@iampujan
@iampujan 6 жыл бұрын
Loved the video. Clear and Understandable. Thanks Professor John. Looking forward for more videos.
@willardmakinishi6980
@willardmakinishi6980 3 жыл бұрын
Thank you so much Mr. Levin. Trust me these things did not make any sense in the first encounter with my Lecturer with due respect to him. I have just watched the first minute and i Have decided to download the tutorial. Hopefully I will find your explanations on all the search Algorithms. God bless you and I hope to understand these things before June for my exams
@SiEmG
@SiEmG 4 жыл бұрын
Hello Mr. John Levine and the rest of the people IN THE COMMENTS :). Mr. Levin thank you very much for your help. You give totally clear instructions!! :) My only question is this: is G node visited also? I think in A* goal state is also added in the visited list, right?
@mahwashshahid2499
@mahwashshahid2499 9 ай бұрын
@johnLevine Kindly share assessment problem as well with accurate heuristics.
@OsamaAlmas
@OsamaAlmas 7 жыл бұрын
This is amazing, You deserve more subscribers!!!
@vivekpadman5248
@vivekpadman5248 10 ай бұрын
Where do we get the heuristics from?
@TheSophiaLight
@TheSophiaLight 3 жыл бұрын
Clear, patient, simple. Thank you.
@siddarvind6410
@siddarvind6410 Жыл бұрын
A godsend. This is saving me in my CS Discrete Math class, thank you so much!
@sagartalagatti1594
@sagartalagatti1594 2 ай бұрын
God level explanation of the concept!!!
@TheWheen
@TheWheen 6 жыл бұрын
For the most left line which is ignored, as B3 -> A7 from 5:45 in the video, the cost is not 20 as said, should it be 5+3+2+7=17? How the heuristic is known ?
@뚝딱-q8j
@뚝딱-q8j 3 жыл бұрын
How is the goal state considered in a situation with ties? If using alphabetical order, do goal states count as the alphabet G?
@AnsumanMohanty
@AnsumanMohanty 6 жыл бұрын
Clear and concise. But could you share any resource as to why the heuristic should underestimate the cost ?
@mvvkiran
@mvvkiran 4 жыл бұрын
So, two points I believe worth mentioning for the General Public's information sake: 1. The Search considered here is a GRAPH Search - NOT a Tree search. John Levine generally considers all Graph Search for all Search Algorithms - at least in the Uninformed & this A* Algs, so far 2. The REASON why the Heuristic MIGHT BE LESS THAN the Actual Cost of Reaching of a Goal is Because the Basic Heuristic considered for an A* Search is a Straight Line Distance - SLD. And we a know a PATH is NOT ALWAYS a Straight Line. How much ever Better a Heuristic you introduce, you'll never get the Actual Cost of Reaching a Goal State to be less than it. The Best Heuristic will Predict the EXACT cost of reaching a Goal State (only with ZERO Path Costs of course as A* Cost = Path Cost + Heuristic Cost) Hope this helps.
@Astronomy.532lifenspace
@Astronomy.532lifenspace 3 ай бұрын
Thank you. I want to know why considering only one path as the goal state. I have a burning assignment.
@saiprasad8311
@saiprasad8311 5 жыл бұрын
Good example. Makes it so easy to understand admissibility issue.
@rishavlalshrestha9755
@rishavlalshrestha9755 7 жыл бұрын
Amazing video. Learned very much. Thank you. But on what basis heuristic are measured as it alters the way tree flows ?
@johnlevine2909
@johnlevine2909 7 жыл бұрын
The heuristic function h(Si) is a quick-to-compute estimate of the cost to get from state Si to a goal state. The function you use is dependent on the problem being solved - for example, in robot navigation, you might use the Euclidean distance between the point that the robot is at and the goal state. The heuristic function has to have certain properties in order to work well - for A*, the most important is that it must be admissible - that is it must never over-estimate the cost. Hope this helps!
@rishavlalshrestha9755
@rishavlalshrestha9755 7 жыл бұрын
Thank You John.😀
@Alex_Yong
@Alex_Yong Жыл бұрын
A question is why the visited nodes don't need to be visited again, I think it may skip the node of the optimal path...
@nilsmartel2295
@nilsmartel2295 4 жыл бұрын
you're a most talented teacher. Thank you
@simongrome9073
@simongrome9073 Жыл бұрын
These videos are super helpful in explaining stuff I didn't get from my textbook! Thank you!
@nethmagunathilaka
@nethmagunathilaka 5 жыл бұрын
Best place to learn A*. U save my day!
@lianghaoquan
@lianghaoquan 4 жыл бұрын
Thank you for this great video! Love your clear explanation and your voice!
@shreengul6488
@shreengul6488 6 жыл бұрын
Great job sir!!! You explain things very clearly and unambiguously . No need to watch any other vedio after watching this.
@cuchuoisalay9263
@cuchuoisalay9263 7 жыл бұрын
I would like to say thanks to you. Your tutorial about A* is very exciting!
@YUMYUMINMYTUMTUM
@YUMYUMINMYTUMTUM 4 күн бұрын
Still the best video available on A* search!
@sibusisondimande5209
@sibusisondimande5209 6 жыл бұрын
Thanxxxx John. You're the best !!!!!
@zhenyufan8988
@zhenyufan8988 6 жыл бұрын
It's a great illustration!! But can u give us a example of how to decide the estimate value from certain node to a goal node?
@coderlife2706
@coderlife2706 3 жыл бұрын
This is the Professor we need, but don't deserve.
@LarryP248
@LarryP248 Жыл бұрын
This is important content. A related book I read was also significant. "Game Theory and the Pursuit of Algorithmic Fairness" by Jack Frostwell
@Peter-bg1ku
@Peter-bg1ku 3 жыл бұрын
Your explanation is amazing. Thank you!
@pantepember
@pantepember 4 жыл бұрын
5:51 Did you ignore A because it was already visited or it would cost more (20) than in its first appearance (12)? 10:25 Shouldn't have we finished the search at G2 (13) instead of going on with E (13)? 11:15 You ended the search by choosing G2 (13) this time while we still had F (21). Was that because F cost more than G2 did? Thank you for the video.
@anirvangoswami
@anirvangoswami Жыл бұрын
1. Because it was already visited. 2. We are following the alphabetical order as a tie-breaker. 3. Yes, we give priority to the lowest-cost node in the fringe.
@flienky
@flienky 4 жыл бұрын
Does the condition that the heuristic value of a node should be bigger than the distance to the goal, apply to the starting node as well? Or it only applies for the intermediate nodes?
@SaifUlIslam-di5xv
@SaifUlIslam-di5xv 4 жыл бұрын
It's a treat watching this as an introduction to what A* is. :D
@ecekucukpehlivan9779
@ecekucukpehlivan9779 5 жыл бұрын
These videos are very educational and useful. Thank you so much!
@drc-ek2zu
@drc-ek2zu 3 жыл бұрын
AT 10:00, don't you mean 15? where or why did it go to 21? In the end, we can see that the path was right, but I give pause to arithmetic in error in any of these examinations. And if we have these errors, should we just overlook them? I believe a correction is in order if not just to settle the masses who found the error.
@robs939
@robs939 3 жыл бұрын
John the Goat! Thanks man!
@melihekinci7758
@melihekinci7758 2 жыл бұрын
Very good explanation.. thank you
@adeelali8417
@adeelali8417 2 жыл бұрын
Where do you get the initial node heuristics from or do you estimate them?
@tanle7317
@tanle7317 Жыл бұрын
You said that if we encountered a visited node, we can ignore it if it has the higher A* score than the previous. What about when it has lower A* score? Are we supposed to draw that node again on the tree with the lower score?
@zijunliu7765
@zijunliu7765 6 жыл бұрын
You explained way better than my professor! Thank you! Now I finally understand it.
@harpreetset
@harpreetset 7 жыл бұрын
really insightful. I am learning AI and have been reading about agent searches for a while. This one is quite helpful. Can you also cover big O notations for time and space for these algorithms? it will help in analyzing in what environments it makes sense to apply them.
@johnlevine2909
@johnlevine2909 7 жыл бұрын
Thanks. I'm planning to do a video comparing the algorithms, including the time and space requirements, in due course.
@AshutoshSingh-do4ts
@AshutoshSingh-do4ts 3 жыл бұрын
Thank you sir for the explanation, it helped me a lot to understand the A* algorithm.
@franchello1105
@franchello1105 6 жыл бұрын
If 2 active nodes are tied, can you break the tie with the actual cost? Instead of alphabetical order?
@nandudara3845
@nandudara3845 4 жыл бұрын
This is a perfect video for understanding A* algorithm
@NARAYAN-vf9kx
@NARAYAN-vf9kx Ай бұрын
amazing job sir!!!
@LucasofAppalachia
@LucasofAppalachia 6 жыл бұрын
Absolutely phenomenal explanation. Thank you for this.
@vqvinh0405
@vqvinh0405 Ай бұрын
this is the best video for A* algorithm
@Mousta_alpha94
@Mousta_alpha94 5 жыл бұрын
thanks Mr john levine your explanation is excellnt
@muinmohammadmozammel281
@muinmohammadmozammel281 4 жыл бұрын
Short and to the point explanation. Thanks.
@alibrahim4686
@alibrahim4686 7 жыл бұрын
You are fantastic. Please make more videos.
@justafreak15able
@justafreak15able 6 жыл бұрын
wawo you explained it very simply and quickly.
@Alyson7924
@Alyson7924 Жыл бұрын
A* is beautiful
@LowellBoggs
@LowellBoggs Жыл бұрын
This is an excellent presentation, thank you very much. I am tempted to code it up. A question: if the graph nodes are on an xy grid, should the heuristic actually be the real word Pythagorian distance, or the distance along allowed paths?
@EddieMasseyIII
@EddieMasseyIII Жыл бұрын
Typically euclidean distance, manhattan distance, or great circle distance.
@LowellBoggs
@LowellBoggs Жыл бұрын
@@EddieMasseyIII thanks
@LowellBoggs
@LowellBoggs Жыл бұрын
Another question if you don't mind. Since the video said that the heuristic doesn't have to be perfect, but must be an underestimate: suppose you don't know the actual heuristic , but can search the graph for some fixed maximum distance from the start node in all valid directions, and if you don't find an endpoint , you can return the fixed maximum in liew thereof. Would this work? And would the performance decay to being somewhat worse than Dykstra?
@nishantagrawal6244
@nishantagrawal6244 6 жыл бұрын
What, if we encounter a visited node again with less A* score??
@ramiyousif8024
@ramiyousif8024 Жыл бұрын
Best video for Heuristic algorithm!! Thank you !!
@alfianabdulhalin1873
@alfianabdulhalin1873 7 ай бұрын
Thanks John. This video is a lifesaver. BTW, I've a question. Say I want to drive to the nearest city, and he wants to choose between 3 cities on a map (i.e. 3 goals states/nodes). So does this mean I have to calculate the A* score of each goal state, and then choose the smallest one? Thanks!
@piotrptak5507
@piotrptak5507 7 жыл бұрын
Truly the best explanation of this algorithm we can find
@rashidafoodcornervlog654
@rashidafoodcornervlog654 3 жыл бұрын
Brilliant man you should make more videos
@maxharris6926
@maxharris6926 3 жыл бұрын
Great Video, thank you for explaining A*. For clarification if you find a node that has been visited, but the current path's A* score is less than the cost in the visited set, would you continue on the path and update the A* score in the visited set?
@ComputerGuru-tk2hg
@ComputerGuru-tk2hg 3 ай бұрын
This is well explained thank you sir better explained than my prescribed textbook
@ShinnyxAKAvincent
@ShinnyxAKAvincent 6 жыл бұрын
very clear speech, awesome explanation. Thanks a lot!
@cieslak4004
@cieslak4004 6 жыл бұрын
THANK YOU! Greetings from Poland
@faox7565
@faox7565 7 жыл бұрын
what a clean teaching you are the best
@jamesthuo8763
@jamesthuo8763 6 жыл бұрын
Your videos are the best. Please do Greedy and other topics
@Imhotep1278
@Imhotep1278 7 жыл бұрын
very nice explanation and example, indeed
@muhammadhabib3442
@muhammadhabib3442 7 жыл бұрын
Great Tutorial, Please also Make another tutorial on the Optimality proof of A∗
@johnlevine2909
@johnlevine2909 7 жыл бұрын
Many thanks, and thanks for the suggestion - I think that's a great idea.
@MuhammadUsman-ry6tp
@MuhammadUsman-ry6tp 5 жыл бұрын
One of the best teacher i ever seen
@cemozen7074
@cemozen7074 5 жыл бұрын
Did you have to look at E(13) before G(13) ? Since heuristic always underestimates the actual cost, I guess there was no need to expand the E(13) node. However, it was great explanation of A*. Thank you.
@ArunkrishnaMurugan
@ArunkrishnaMurugan Жыл бұрын
19.09 minute, In G2 (13) already goal has been found. then why we need to do F(21)?
@johnlevine2909
@johnlevine2909 Жыл бұрын
The algorithm says that the goal state is recognised only when the node is selected for possible expansion, and this guarantees that we get the least costly path to the goal state. So we have to add G2 (13) to the agenda first - for example, if the cost of A-G1 was 7 rather than 9, then S-A-G1 (12) would need to be selected next, before looking at S-D-C-G2 (13).
@kuanghuang2773
@kuanghuang2773 6 жыл бұрын
very clear, very smooth, I like the teaching! thanks!
@abdolvakilfazli2488
@abdolvakilfazli2488 5 жыл бұрын
Insanely clear explanation. Hope you add more details about completeness, optimality and complexity
Uniform Cost Search
10:23
John Levine
Рет қаралды 424 М.
Minimax with Alpha Beta Pruning
13:44
John Levine
Рет қаралды 354 М.
Chain Game Strong ⛓️
00:21
Anwar Jibawi
Рет қаралды 41 МЛН
VIP ACCESS
00:47
Natan por Aí
Рет қаралды 30 МЛН
To Brawl AND BEYOND!
00:51
Brawl Stars
Рет қаралды 17 МЛН
When you have a very capricious child 😂😘👍
00:16
Like Asiya
Рет қаралды 18 МЛН
The hidden beauty of the A* algorithm
19:22
Polylog
Рет қаралды 910 М.
2024's Biggest Breakthroughs in Math
15:13
Quanta Magazine
Рет қаралды 482 М.
Depth First Search
7:16
John Levine
Рет қаралды 106 М.
Pathfinding - Understanding A* (A star)
12:52
Tarodev
Рет қаралды 140 М.
A* Pathfinding (E01: algorithm explanation)
11:39
Sebastian Lague
Рет қаралды 2,1 МЛН
How Dijkstra's Algorithm Works
8:31
Spanning Tree
Рет қаралды 1,4 МЛН
Graph Data Structure 6. The A* Pathfinding Algorithm
16:48
Computer Science Lessons
Рет қаралды 113 М.
Chain Game Strong ⛓️
00:21
Anwar Jibawi
Рет қаралды 41 МЛН