Тёмный

A* (A Star) Search Algorithm - Computerphile 

Computerphile
Подписаться 2,4 млн
Просмотров 1,2 млн
50% 1

Опубликовано:

 

28 сен 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 683   
@undead890
@undead890 7 лет назад
I have actually wanted Computerphile to talk about A* for a long time. It's so fascinating how it works.
@chrisdrew1768
@chrisdrew1768 7 лет назад
I love how simple an improvememt A* is over Djikstra
@mrben9058
@mrben9058 7 лет назад
In addition, once you got A*, you can recreate Dijkstra by setting all heuristics to the same value.
@chrisdrew1768
@chrisdrew1768 7 лет назад
Benjamin Collet bruh
@chillbro1010
@chillbro1010 7 лет назад
To a non-technical person like me, the simple explanation looks like Double Djikstra, one from each end. The measure of distance is basically giving a weight to the roads from the end state, as in making it choose things based on how close it is to the finish. -- The only problem I see is you can't do things "as the crow flies" because that might put you on the other side of a river because its so close, while a bridge across the river is a long way away. Basically, in some instances it would follow to the bottom of a "cup", fill the entire "cup" trying to access nodes on the other side simply because the nodes are close, before spilling over the edges, where a regular djikstra might not go into the cup, and if it does it would quickly "drop" entire sections of the cup for being too "far/hard/slow" I guess it depends on the strength of the "closeness" but it seems like a single setting doesn't account for concave search spaces.
@StreamlineDeet
@StreamlineDeet 7 лет назад
(Almost) any cup that would be filled up by A* would also be filled up by Djikstra's. Remember, A* is still factoring in the distance travelled to get to a given node, so any path that is extremely long will be ignored, unless it brings it substantially closer to the destination. Meanwhile, Djikstra's would check out every node in the cup the moment those paths are shorter than the path it is taking around the cup.
@user-ob8ww5cf7s
@user-ob8ww5cf7s 4 года назад
8:41 "You know what? I'm just going to leave the lids off" 8:50 *Puts lid back on*
@ojussinghal2501
@ojussinghal2501 3 года назад
8:41 FOR MARKERS 8:50 FOR PEN
@gacsizclickon
@gacsizclickon 2 года назад
muscle memory
@aaronsalenga3221
@aaronsalenga3221 4 года назад
Never in my life did I think that I'd be cracking up at a video about an A* Search Algorithm implementation. An entertaining video for sure 😂 I have a project due in less than 24 hours where we need to code A* from scratch, so thanks for reducing my stress and while teaching me this algorithm. I feel a lot better now.
@justinernest2363
@justinernest2363 8 месяцев назад
Was it part of a snake game? Like you know the snake searches for the apple etc?
@friewire
@friewire 7 лет назад
Exactly like having a smart friend in class explaining it to you! Amazing
@vinitvsankhe
@vinitvsankhe Год назад
One neat trick is to "prefer" one metric over another and use power notation to calculate overall heuristic. E.g. a node with distance 7 but weight 2, we added them as 7+2 = 9. But instead of that if we prefer shorter distance over smaller weight then weight should be the base raised to the power of distance. So this way we can choose easily between two nodes that would otherwise yield the same heuristic if we add them but with the new rule if one node is with weight of 2 and distance of 7 (2^7=128) and another has distance of 2 and weight of 7 (7^2 = 49) ... we chose the later as 49 < 128 because we preferred the one closer to the end node. Google maps often use this trick.
@mrBlagstock
@mrBlagstock 7 лет назад
Dr Mike Pound is fab - so watchable. A RU-vid star is born. Knows his stuff and a great explainer.
@IkonAndDiva690
@IkonAndDiva690 6 лет назад
I've been watching your videos over the last few days, in order to solve a Pacman algorithm of Ghosts taking the shortest route, and found your explanations and content to be very educational and easy to follow. Many thanks and keep up the great work! Fingers crossed that I can now implement my version of A* on an adjacent list of nodes I've created for the maze...
@RyanLucroy
@RyanLucroy 7 лет назад
Man, I could listen to this guy for ages. His way to present his topics is just amazing :)
@Infaviored
@Infaviored 2 года назад
Many thanks for the good video. However, I think you missed to highlight one thing: The heuristic *always underestimates* the distance. I saw people questioning why it can't be that the path through the right side is shorter when we did not calculate the cost. The actual shortest path is always longer than the heuristic distance. Here this lies in the nature of the problem, the euclidean distance (straight path) is always shorter than the lengths when driving zig-zag.
@lerneninverschiedenenforme7513
1st: '~ just adds a heuristic to dijktra' was the best statement!! Further, no usage of stupid unnecessary words like 'open list' and 'closed list'. Everythig nice and simple. Also, the animations help overcome handwriting. And the handwriting is there to keep the explaination realistic. 6 from 5 stars
@seelyw.4818
@seelyw.4818 5 лет назад
I like your unorthodox style of teaching. It's like a friend explains it to you. Thank you!
@HebaruSan
@HebaruSan 7 лет назад
Search from both ends at the same time and stop when the two searches meet. Instead of one search to depth N, now you have two searches to depth N/2. In a graph with many nodes and many connections, the number of nodes at each depth increases with the depth, so each search tree is less than half the size of the original, and the total number of nodes searched is reduced.
@hesgrant
@hesgrant 7 лет назад
Mike Pound is my favorite. What a brilliant communicator.
@egor.okhterov
@egor.okhterov 10 месяцев назад
I am here after Q* from OpenAI 😂
@ChadNierenhausen
@ChadNierenhausen 7 лет назад
Dr. Mike is one of the best presenters on this channel! Thanks for another fun one.
@seanfy9399
@seanfy9399 6 лет назад
Never thought I could actually understand A*, BUT this video do make everything clear enough, you are brilliant, thank you!!!
@vitaliypenkov
@vitaliypenkov 2 года назад
Love the content, but it's extremely super difficult to stay focused with camera jumping on and off the paper with the graph. I feel a little bit dizzy every 3 minutes, so had to take often breaks
@yukewang3164
@yukewang3164 5 лет назад
very vivid presentation of the graph algorithm helps me a lot to understand the process
@usptact
@usptact 5 лет назад
Finally somebody explains what A* actually does! It was bit rushed but I managed to follow (usually I get lost).
@thomasscanlan8624
@thomasscanlan8624 5 лет назад
this is the best explanation of this algorithm that I have found on youtube thus far! Excellent!
@C4rb0neum
@C4rb0neum 7 лет назад
I'm very close to having tears in my eyes from laughing when 'super sneaky' was introduced as 'not an official term you will find in the literature.' Brilliant side note.
@benjaminramsey4695
@benjaminramsey4695 4 года назад
This video primarily, plus a couple other sites I looked up after, helped me implement pathfinding in my game! Thanks!
@SimonBuggeSiggaard
@SimonBuggeSiggaard 7 лет назад
You can clearly tell that Mike practiced this explanation beforehand :P
@kwanarchive
@kwanarchive 7 лет назад
They do edit the videos you know.
@philips9042
@philips9042 7 лет назад
Simon Bugge Siggaard Just shows how much dedication he puts into this. Not saying the others were bad, but Dr Mike Pound is my favorite
@General12th
@General12th 5 лет назад
I'm sure every interviewee practices first. Also, I think Dr. Pound is a professor, so he's given this lecture before.
@xpaganda
@xpaganda 7 лет назад
"super sneak is not a technical term you see in the literature" LOL Never change, britbongs!
@mariusstefanscarlat2605
@mariusstefanscarlat2605 4 года назад
I am impressed by the algorithm which is slightly better than Dijkstra. I've almost understood the idea behind the algorithm but I don't really understand one thing: How are we gonna compute the distance from a node to the destination node when we implement the algorithm. By the way, an implementation of the algorithm would be nice in the description of the video.
@ruanluies5909
@ruanluies5909 5 лет назад
emphasis on heuristic, Dijkstra's algorithm guarantee solution quality, once the a node is explored, the minimum distance is known from the starting node to the current node. So A* doesn't address the problems of Dijkstra, it is a heuristic single source shortest path algorithm, while Dijkstra's algorithm, uses the principles of optimality, once the algorithm terminates, you have an optimal solution, e.g. min distance
@alexanderhugestrand
@alexanderhugestrand 5 лет назад
Maybe I've misunderstood something, but to me it seems like A* doesn't guarantee the shortest path. Apply it to the following graph: E
@thejoebegs
@thejoebegs 5 лет назад
These are the best. Thank you.
@skarnl
@skarnl 5 лет назад
Great example. But I'm wondering, what if the path from C -> E was a direct path, with just a cost of 1 ? That would mean it was much 'cheaper' than the path through B-H-G But you never expand C, so you'll never know. Or am I missing something?
@thomhughes4617
@thomhughes4617 5 лет назад
My thought as well, I’m about to try and implement this myself. Instinctively I’d say you’d probably have to expand every other node until you reach a higher combined weight than your initially optimised path. Because yes if C -> E had distance 8 and weight 8 it would be more efficient to go via C.
@Infaviored
@Infaviored 2 года назад
They were missing one important detail: The heuristic *always underestimates* the distance. So the actual shortest path is always longer than the heuristic distance. Here this lies in the nature of the problem, the euclidean distance (straight path) is always shorter than the lengths when driving zig-zag.
@blake8894
@blake8894 7 лет назад
oi, right on. I take a break from building a robot and you guys drop a video about the algorithm I was considering.
@kidpitch
@kidpitch 7 лет назад
Literally working on a homework that is coding this algorithm. Thanks for the tutorial
@d4m4s74
@d4m4s74 3 месяца назад
Just rewatched this because I need to solve a maze and didn't understand how a* works. Time to do some programming
@tumultuousgamer
@tumultuousgamer 2 года назад
Best explanation I found so far!! Thank you!
@IgnisDomini97
@IgnisDomini97 7 лет назад
Oh cool, my comment appeared in the video!
@erkanturan7215
@erkanturan7215 3 года назад
I love Computerphile as a cs student!
@roelvoort
@roelvoort 7 лет назад
WHY o' WHY inches.
@tychothorpe4515
@tychothorpe4515 7 лет назад
Probably because it would be smaller numbers
@gannebamm2
@gannebamm2 7 лет назад
so. The centimeter A* video should be placed on the numberphile channel than?
@modernkennnern
@modernkennnern 7 лет назад
or because the numbers themselves are larger on the measure itself.
@wierdalien1
@wierdalien1 7 лет назад
Florian Hoedt centimetre. whats a centimeter? what do you measure with a centi?
@gannebamm2
@gannebamm2 7 лет назад
A hundretst of a meter for example?
@NagaVigneshN
@NagaVigneshN 4 года назад
Let's say a node "P" does not lead to target E, what would be the heuristic of it? But we can only know if a node is leading to the destination or not by traversing it right.
@nickwoodward819
@nickwoodward819 7 лет назад
"I may have traced it" that smirk. lol XD
@supdawg7811
@supdawg7811 7 лет назад
Just to clarify, your heuristic isn't consistent. The path you took had lower cost than your heuristic was at the start node. It seems you have lucked out, though.
@MasterGeekMX
@MasterGeekMX 7 лет назад
Man, I'm studing computer sciences at college and I have the artificial intelligence subject now. Last friday was the exam and this came on it.
@BeansForBirds
@BeansForBirds 7 лет назад
It seems that if C-L, L-I, I-K, & K-E all had a weight of 1 and G-E had a weight of 3 the described method would have failed. Did he forget any steps or am I missing something? : \
@WhovianMinecrafter
@WhovianMinecrafter 7 лет назад
he said he would leave the lids off, then he immediately put it back on
@OFfic3R1K
@OFfic3R1K 7 лет назад
This guy is great!
@jakerutherford5716
@jakerutherford5716 6 лет назад
I wish this guy did the Fundamentals of Artificial Intelligence module at Nottingham instead of Dr Rong Qu.
@AlanTheBeast100
@AlanTheBeast100 3 года назад
"It depends on your implementation" is the difference between the project being 3 weeks late and 3 months late ....
@TheYanahma
@TheYanahma 7 лет назад
Mike Pound is 100x better than Mike Pence
@joealias2594
@joealias2594 5 лет назад
This joke did not get the recognition it deserved
@theshuman100
@theshuman100 5 лет назад
Waiting for the fabled mike quid
@MuradBeybalaev
@MuradBeybalaev 5 лет назад
Surely, the units you store for distance metric have to at least to be in the same ballpark as weights. Is there a way to calibrate them by range mapping and maybe multiplying instead of summing? Sounds like a loophole requiring manual tuning otherwise. Hrm...
@hedonisticzen
@hedonisticzen 5 лет назад
Should of used T for terminate instead of E for end. Just to make the letters a bit more tidy.
@mugambindwiga163
@mugambindwiga163 Год назад
You got coffee, Mike? Really? Not tea? Really?
@dileeprajendran3583
@dileeprajendran3583 7 лет назад
If the whole map is not known in advance, how can the A* algorithm be applied? Is this algorithm used by real robots to traverse the environment?
@FuZZbaLLbee
@FuZZbaLLbee 6 лет назад
But what If one of the last nodes is blocked? Distance to E will still be the shortest, but you can't get there. I guess you would have to alter the node distnces. and try again ore something like that
@caesarthatoast7501
@caesarthatoast7501 6 лет назад
I not understand how you don’t check the rest of the path past C. Maybe initially c is more expensive to go to but what if the rest of the nodes after C are very cheap? You have to check for that..?? Or is this algorithm only trying to find the destination node as fast as possible, not the shortest path?
@AdamHoelscher
@AdamHoelscher 7 лет назад
Is it true that this algorithm will sometimes find a path that is not necessarily the shortest if you choose a bad heuristic? For example, if I had a network with these nodes (Euclidean coordinates): X: (0,5) S: (0,4) A: (0,3) B: (0,2) C: (0,1) E: (0,0) and these (undirected) edges: X-S: 1 S-A: 1 A-B: 1 B-C: 1 C-E: 1 X-E: 1 If I use Euclidean distance as my heuristic, don't I end up with the path S-A-B-C-E with cost of 4, even though S-X-E has a cost of 2?
@jeangonzalez6039
@jeangonzalez6039 5 лет назад
Great Explanation. Thanks!
@KL-ii6dt
@KL-ii6dt 7 лет назад
What's the quickest route to get all of these pathfinding videos in a playlist?
@professorpoke
@professorpoke Год назад
4:42 what a wierd arrangement of this paper slips.
@toxicdesire8811
@toxicdesire8811 5 лет назад
Yeah, but what are the heuristics here? How do we know we are going in right direction ?
@Impromptu21
@Impromptu21 3 года назад
But how to take heuristic for nodes on graph as we dont have actual distance for them
@Pmkd42
@Pmkd42 5 лет назад
"It's mostly field, and sheep and stuff"
@BunnyFett
@BunnyFett 7 лет назад
I love this. Thank you!
@redbart6910
@redbart6910 6 лет назад
The problem that arose in my head is that, when you finish, there could be a node with a distance much shorter than the one currently for E but it's combined heuristic stops it from getting to the top, call this node X. There could be a very short path from X to E, say it is weighted 1. In the example of Google Maps, this could be a plane. Although X seems like it is not viable, it actually is. How could you fix this in your implementation (other than just using Dijkstra)?
@MarcelloDavideCaio
@MarcelloDavideCaio 7 лет назад
How can you add up green numbers and black numbers? They are in different units, aren't they? Black numbers are in inches, and green numbers are in some units of difficulty to move between the two nodes. How do you convert one into the other in order to take the sum? [as any mathematician would say: you can't add apples and oranges]
@Ghorda9
@Ghorda9 7 лет назад
there both the same unit, the green is just in negatives and the black positives
@dragunov87
@dragunov87 7 лет назад
no jumpcuts?? how do you do that? perfect flow m8
@jedigecko06
@jedigecko06 6 лет назад
Books on the shelf... _Security Engineering, 2nd Edition._ Ross Anderson; _Secrets and Lies._ Bruce Schneier; _The Elements of Statistical Learning._ Trevor Hastie, Robert Tibshirani, Jerome Friedman; _C++ The Complete Reference, 4th Edition._ Herb Schildt; _Cryptography and Network Security: Principles and Practice, 2nd Edition._ William Stallings; _Computers and Intractability; a guide to the theory of NP-Completeness._ David S. Johnson, Michael Garey; _Computer Security, 3rd Edition._ Dieter Gollmann; _Hacking: The Art of Exploitation._ Jon Erickson; _Database Systems: A Practical Approach to Design, Implementation, and Management, 5th Edition._ Carolyn E. Begg, Thomas M. Connolly; _The Manga Guide to Databases._ Mana Takahashi, Shoko Azuma; /* Yes! Really! */ _A Brief Guide to Cloud Computing._ Christopher Barnatt; _Pro WPF in C# 2010._ Matthew MacDonald; /* Ooh! Companion ebook available! */ /* * Whew! For any simple task, take your initial runtime estimate and double it. */
@williamwambua7710
@williamwambua7710 5 лет назад
Thanks i needed this
@jorandebraekeleer7557
@jorandebraekeleer7557 5 лет назад
@@williamwambua7710 Sarcasm?
@Mmustafa-v4j
@Mmustafa-v4j 4 года назад
Oh Great
@evanl5299
@evanl5299 4 года назад
FYI - Herb Schildt was the multi-keyboard in the rock band Starcastle.
@novikovPrinciple
@novikovPrinciple 4 года назад
The... I'm sorry, _The Manga Guide to_ *what* ?
@silaslancashire2879
@silaslancashire2879 7 лет назад
"sheep 'n' stuff"
@EgoShredder
@EgoShredder 7 лет назад
Sheep and Sheeple and Steeples! :-D
@Jacoomo
@Jacoomo 7 лет назад
"Let's move the books to be in the frame"
@scabbynack
@scabbynack 7 лет назад
Dr. Pound is great in his videos. He has a great on camera presentation and disposition. Thanks for these examples and explanations!
@bolerie
@bolerie 7 лет назад
Prefering to call a list a "data structure" is the sign of a true programmer
@sumitmomin5753
@sumitmomin5753 5 лет назад
Why ??
@hopko7579
@hopko7579 5 лет назад
@@sumitmomin5753 If I had to guess, abstraction?
@sumitmomin5753
@sumitmomin5753 5 лет назад
@@hopko7579 wat abstraction has 2 do wid it ?
@TurboWindex
@TurboWindex 5 лет назад
@@sumitmomin5753 IMO, it is because he's writing pseudocode so instead of using one particular data structure type (Vector, List, Map, etc ) and confuse anyone with "technical" programming terms, he's just saying "data structure" !
@lucaspeters-murphy2770
@lucaspeters-murphy2770 5 лет назад
@@TurboWindex I mean, technically the only example where Dijkstra/A* is possible is a weighted graph.
@kostyapesterew1068
@kostyapesterew1068 7 лет назад
why 'D' was 4+8=12? traveled distance is clearly 2+4=6 so... 6+8=14?
@EscapeMCP
@EscapeMCP 7 лет назад
yup
@Rachio666
@Rachio666 7 лет назад
kostya pesterew that's correct. it should have been 14
@ThaerRazeq
@ThaerRazeq 7 лет назад
To be honest, I was confused too @8:20, it should have been 14.
@NiraExecuto
@NiraExecuto 7 лет назад
I wouldn't call that annoying, because from what I've seen, the people not as talented can get seriously confused if the teacher makes a mistake, so in pointing it out, you're probably doing at least some of them a favor.
@comrade1912
@comrade1912 7 лет назад
exactly.. and I was not able to concentrate after that point... :P
@KarnKaul
@KarnKaul 7 лет назад
Extremely well done run-through! Dr. Pound is right: A* is incredibly fast; so much so that we use it generously in path-finding (in gameplay engineering). That's a subroutine that multiple NPC instances are executing, 60 times a second, along with all the other stuff (that's a LOT more intensive).
@jetardeshna3449
@jetardeshna3449 11 месяцев назад
Damn that's reallly efficient
@KarlFFF
@KarlFFF 7 лет назад
8:10 I like to live dangerously, I always shuffle my lists before storing!
@rafaelplugge3214
@rafaelplugge3214 7 лет назад
or even worse divide by 0! :O
@NZAnimeManga
@NZAnimeManga 6 лет назад
dividing by "0!"? - no problem ;)
@bfs7668
@bfs7668 6 лет назад
Dennis Fluttershy soooo divide by one Doable
@parktamaroon226
@parktamaroon226 6 лет назад
hahah... did you write “sorting” out of sequence?
@moellerdk93
@moellerdk93 6 лет назад
0! = 1 - google it
@johnsmithee6660
@johnsmithee6660 6 лет назад
There's a slight mistake - the distance from S-B-D is 2+4 = 6 and the D is 8 inches away from E, so the total for D is 6+8 = 14, not 12
@w47-p1e
@w47-p1e 5 лет назад
Its fixed
@ProBarokis
@ProBarokis 3 года назад
@@null3081 how bro
@itsCh4rl1e
@itsCh4rl1e Год назад
the description fella@@ProBarokis
@fablungo
@fablungo 7 лет назад
I think something important to note which was very only briefly suggested is that if your distance-to-goal heuristic always underestimates you will always find the shortest path, but if not then the path you get may not be the shortest (which for some problems may be suitable). If you underestimate too much then the benefits of A* diminish and you'll explore more and more of the graph. Additionally, Dijkstra is a generalisation of A* where the distance-to-goal is always underestimated as 0.
@ShaojunZhao
@ShaojunZhao 5 лет назад
I think it is the other way around: A* is a generalization of Dijkstra's algorithm, as Dijkstra's algorithm assumes the heuristic function to be zero.
@PHHE1
@PHHE1 3 года назад
Actually we saw an example for that in the video. We finished so fast in the end because the final distance was actually shorter than we expected only a step before. The heuristic being a overestimating one wouldn't have guaranteed to find the optimal path if there would have been a shorter ones in the right branch but it let us finish very fast
@redy55
@redy55 3 года назад
A* has its uses. You can program edge weights of ones you want your algorithm to avoid to be positive infinity or something if you want to be sure. Also, the euclidian distance based heuristic you pretty much only use when you have a 2 dimensional map aside from nodes on it. So there cant be a realistic situation, when the path where heuristic is bigger is actually shorter. If you are measuring weight on a different parameter (like, how many shops does the town have, and thats your criteria, not difficulies on the road itself) then you should use another heuristic function or another algorithm altogether :)
@amrsaber5457
@amrsaber5457 7 лет назад
"meh, finished data structure over here" 😂😂
@garethdean6382
@garethdean6382 7 лет назад
This is not to be confused with the Sagittarius A* search algorithm, used often in astronomical science. *That* method simply involves shoving everything together in one big pile so whatever you need is nearby.
@Anvilshock
@Anvilshock 7 лет назад
THIS JUST IN: POUND BACK, INCHES AHEAD, SHORTEST PATH TO BREXIT PACED
@philipjohansson3949
@philipjohansson3949 5 лет назад
Rest in peace, Dr. Nils Nilsson, coinventor of A*, 1933-2019
@glennzone12
@glennzone12 7 лет назад
1:55 On the bookshelf; "The Manga Guide to Databases"
@brunoalves-pg9eo
@brunoalves-pg9eo 7 лет назад
I had an advanced algorithm exam 2 weeks ago and this algorithm was part of the test, I passed but never understood the algorithm. Until now. Nice video
@tengkuizdihar
@tengkuizdihar 6 лет назад
bruno alves I too like to live dangerously.
@davidson2727what
@davidson2727what 6 лет назад
Yeah this guy saved me on dijkstra. Pre exam thankfully.
@aurelia8028
@aurelia8028 4 года назад
Should you have passed then?
@georgeborsa5346
@georgeborsa5346 3 года назад
@@aurelia8028 Yes, he should have passed. Most of the time those exams just test your memory. At that time he was only able to reproduce his college's explanation of the algorithm, after this video he's able to explain it with his own words (and maybe even implement it).
@diorcula
@diorcula 5 лет назад
He actually makes a mistake, writes down for: s->b->d: 8+4 = 12. although the actual value was 6+8 = 14 for D...
@xPROxSNIPExMW2xPOWER
@xPROxSNIPExMW2xPOWER 7 лет назад
This guy should just do all the videos tbh
@hattrickster33
@hattrickster33 5 лет назад
One question I had was, how do we know we can stop when E is removed from the priority queue? The answer is that every element removed from the priority queue is guaranteed to have the most efficient way to get back to the element before it in the path back to the start node S. So basically, once E is removed from the priority queue, we know there is a path from S to E, and all elements removed so far are part of the shortest path, or the path that minimizes the total heuristic cost.
@tabidots
@tabidots 3 года назад
The use of physical cards really helped make this explanation of the algorithm really clear. I was really struggling to follow purely written explanations, pseudocode, and actual code, because while I can code, I don't have a formal CS background.
@Sindoku
@Sindoku 8 месяцев назад
You not having a formal CS background has nothing to do with struggling with algos like this. That is simply b/c you aren't used to solving those types of problems, and 99% of universities do no prepare students adequately in DSA either, so most of them are struggling too.
@overflea
@overflea 7 лет назад
omg im actually first to comment third
@SuperNolane
@SuperNolane 7 лет назад
Important thing that was missed is that used heuristic must be less than cost of least path to node. Otherwise you can get wrong answer.
@rumfordc
@rumfordc 7 лет назад
he mentions that right before he starts using the tape measure
@SuperNolane
@SuperNolane 7 лет назад
He sad "for A* to work really well you have to have a consistent metric and you have to not overestimate of how far you've got to go". But it will not work at all if you have overestimating metric.
@rumfordc
@rumfordc 7 лет назад
won't it just return a less-than-optimal path?
@SuperNolane
@SuperNolane 7 лет назад
It will. But why to pick such intricate method to get wrong answer when you can just return random path?
@hendrikw4104
@hendrikw4104 6 лет назад
"not overestimating lengths" is called admissible. Every consistent heuristic is also admissible. Consistent means that h(n)
@DontTalkShite
@DontTalkShite 7 лет назад
This guy is brilliant.
@docwhogr
@docwhogr 7 лет назад
Adam Smith. stop trolling
@DontTalkShite
@DontTalkShite 7 лет назад
I wasn't
@CxC2007
@CxC2007 7 лет назад
Adam Smith is not brilliant. he did no invented this. he just study computer science, and he knows thing you don't.
@meinbherpieg4723
@meinbherpieg4723 7 лет назад
You don't have to invent something to be brilliant. Just being able to understand, accurately recall, and be able to explain this material in a way that enables other people - especially people who don't have a formal background in this material - to understand it is brilliant in and of itself.
@DontTalkShite
@DontTalkShite 7 лет назад
I just meant I really enjoy when he's hosting. He's brilliant at explaining things.
@dragoncurveenthusiast
@dragoncurveenthusiast 7 лет назад
finished pack... finished stack... finished list?... finished data structure! :-D gotta love this guy! 9:10
@spiderstheythem
@spiderstheythem 7 лет назад
I'd let Dr. Mike Pound me
@spiderstheythem
@spiderstheythem 7 лет назад
😉😘👌
@DJChiefX197
@DJChiefX197 6 лет назад
*the wedding band on his left hand glistens*
@AP-eh6gr
@AP-eh6gr 6 лет назад
i knew this one was coming......
@anren7445
@anren7445 3 года назад
at 8:39 shouldn't it be D: 6 | 14?, because you add (2+4) + 8
@nba2493
@nba2493 3 года назад
OMG. youre so clever :000 i wish
@omkar_sawant
@omkar_sawant 7 лет назад
I really appreciate Dr Mike taking the time out to not only host these videos but also make all the materials necessary for them. Being a professor must be definitely a busy job and all this must definitely take quite some effort. Appreciated!
@garvagarwal4005
@garvagarwal4005 6 лет назад
I know this is an old video, but hopefully someone sees this. At the end, you suggested that there could be other, perhaps better heuristics than Euclidian distance for A*. Could you give a few examples of other such heuristics?
@leonbishop7404
@leonbishop7404 5 лет назад
2+2 is 4, minus 1 that's three quick mafs
@russelllewis9215
@russelllewis9215 3 года назад
Let me nitpick just a little... You're correct that A* terminates when the destination node gets to the front of the queue *if* the heuristic is guaranteed to be a lower bound on the actual path length. But in this video, the physical distance doesn't actually correlate with the path lengths, and so you cannot actually exclude the possibility that the shortest path to E might go through C, or some other not-yet-examined node. But nonetheless, I loved the video, and it was a great explanation of the algorithm. Thanks!
@smal7812
@smal7812 4 года назад
My uni professor made this SO blurry - exact opposite of your explanation. Thanks a ton for restoring my interest in my major, kind sire.
@TheFrankvHoof
@TheFrankvHoof 4 года назад
My guess for satnav would be: if (distance > CITY_DISTANCE) { path = path_to_closest_city + load(path_between_cities) + path_from_city_to_dest; // Bend Path from Triangle-Wave towards Sinusoid // Done by looking for better directions onto the main road in the correct direction Bend(path, path_between_cities); } // Adjust path based on current traffic & closed roads ApplyTraffic(path); DISCLAIMER: I also don't work for a satnav-company.
@eccentriccode3158
@eccentriccode3158 2 года назад
You guys are saving cs students. Got an exam on A* and others soon so thanks (:
@Sindoku
@Sindoku 8 месяцев назад
His calculation for "D" in A* was off. D was S + B + D (0 + 2 + 4) or 6, and it had a heuristic of 8, so that is 14. He wrote down 12 in black. Not a major deal breaker here obviously, but just pointing it out b/c that's what us programmers do :). Thanks so much for the video!
@Sindoku
@Sindoku 8 месяцев назад
Nvm, they fixed it in the video description. Nice!
@Clashkh22
@Clashkh22 5 лет назад
I'd just like to note that you, Dr. Pound, are the most likeable Computer Science professor I've ever come across. This is coming from a student of one of Germany's top MINT universities.
@Nadox15
@Nadox15 5 лет назад
Ich auf einer der besten Universitäten (bezogen auf Naturwissenschaftliche Studiengänge) als Informatik-Student im Master, wäre mal gespannt zu hören über welche Universität du spricht? :) Das wäre mir neu, dass "MINT" Universitäten die besten in Informatik seien. Aber hey go ahead :)
@Clashkh22
@Clashkh22 5 лет назад
@@Nadox15Fernuni Hagen natürlich, was denn sonst, du neunmalkluger Sitzpisser
@Nadox15
@Nadox15 5 лет назад
​@@Clashkh22 hahahaha und du sagst, "one of the Germany's Top MINT Universities" wtf alter, von der habe ich noch nie gehört. Gute Unis sind, Tu-München, Humboldt-Universität zu Berlin oder auch Tu-Berlin. wat für Fernuni alter
@Clashkh22
@Clashkh22 5 лет назад
@@Nadox15 siehst auch den Wald vor lauter Bäumen nich, wa?
@TheDuckofDoom.
@TheDuckofDoom. 7 лет назад
I borrowed a freind's older tomtom sat-nav some years ago(2010-13 ish) and told it to find the best paths between Dallas and Tacoma, several minutes later it responds that "the path has dirt roads, would you like to avoid dirt roads?" I select yes and it goes back to calculate for several more minutes and says "destination is on a dirt road no path found" and reset with no results. A broken algorithm for sure I don't know why they would even release it to the public, it wouldn't take the preference before calculating so it had to calc twice, interpreted "avoid" as an absolute command of no dirt at all, then discards all the calculations. My home is 100meters onto a dirt road so some dirt is unavoidable, I just wanted it to minimize unpaved routes so it wouldn't route me down a 50 mile mountain service road. Which it attempted to do on several occations. Like the plant nursury that, like my home, was just off the end of the pavement, the tomtom routed me from the other side over 5 miles of winding dirt road, because it was shorter physically and had no speed data so was assumed the fastest route.(and in this case I was only traveling/calculating about 40 miles)
@kekik75
@kekik75 3 года назад
like these guys , I hate the sound, all their pen do on the paper, and how that is captured by the mic.
Далее
Dijkstra's Algorithm - Computerphile
10:43
Просмотров 1,3 млн
CORTE DE CABELO RADICAL
00:59
Просмотров 2,2 млн
Qalpoq - Amakivachcha (hajviy ko'rsatuv)
41:44
Просмотров 303 тыс.
Maze Solving - Computerphile
17:15
Просмотров 1,1 млн
The hidden beauty of the A* algorithm
19:22
Просмотров 864 тыс.
Object-Oriented Programming is Bad
44:35
Просмотров 2,3 млн
Binary Search Algorithm - Computerphile
18:34
Просмотров 161 тыс.
A* Pathfinding (E01: algorithm explanation)
11:39
Просмотров 2,1 млн
SHA: Secure Hashing Algorithm - Computerphile
10:21
Просмотров 1,2 млн
Has Generative AI Already Peaked? - Computerphile
12:48
10 weird algorithms
9:06
Просмотров 1,2 млн
Pathfinding - Understanding A* (A star)
12:52
Просмотров 129 тыс.
CORTE DE CABELO RADICAL
00:59
Просмотров 2,2 млн