A* Pathfinding (E01: algorithm explanation)

A* Pathfinding (E01: algorithm explanation)

Sebastian Lague

9 лет назад

2,091,145 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

@SuperMaDBrothers
@SuperMaDBrothers - 05.01.2024 23:49

Bro didn’t even use a heap

Ответить
@GDhatenal
@GDhatenal - 20.12.2023 17:47

thanks im going to now code this with geometry dash triggers and a binary turing machine

Ответить
@jonayedmohiuddin538
@jonayedmohiuddin538 - 10.12.2023 19:38

how do you code these simulation with numbers on them in unity ?? i have no idea ... anyone any ideas?? TIA

Ответить
@ruebytuesday
@ruebytuesday - 05.12.2023 12:47

Thank you for explaining everything visually like this. It was exactly what I needed to finish wrapping my mind around this algorithm.

Ответить
@hikolanikola8775
@hikolanikola8775 - 03.12.2023 02:13

Any chance you can make a video about Q*?

Ответить
@NeverduskX
@NeverduskX - 26.11.2023 23:24

This video was so well-explained that I was able to get A* in my game from the explanations and pesudocode alone. I'll definitely still watch the rest of the series, especially for anything I might have missed or further optimizations.

Ответить
@pedroantonio9284
@pedroantonio9284 - 13.11.2023 22:49

Mto bom, eu sou seu discípulo 🙏🙏🙏🤫

Ответить
@namename2215
@namename2215 - 08.11.2023 23:10

Basic question: why is the diagonal movement cost 14? In contrast to straight movement cost of 10. Thanks in advance!

Ответить
@matthewschickler6695
@matthewschickler6695 - 08.11.2023 17:09

Beautifully demonstrated and explained.

Ответить
@logandunlap9156
@logandunlap9156 - 04.11.2023 18:45

i thought the thumbnail was the periodic table

Ответить
@tematoscybersage5626
@tematoscybersage5626 - 01.11.2023 21:32

I am sure it is not correct explanation of A* algorithm, it is much more complicated then on video and gives more optimized calculations. The one simple argument is that here was not used parents in nodes(cells) and this is necessary key feature of A* algorithm without which it is not A*(maybe here was explained another simpler pathfinding algorithm).

Ответить
@isdamful
@isdamful - 30.10.2023 21:10

Sorry to say this but I am more confused, how does it all work under the hood, how does it decide with such a big set of values, it would have to constantly keep comparing other values as well.

Ответить
@archilberaia9675
@archilberaia9675 - 25.10.2023 19:49

Watching this in 2023. Young Sebastian has so friendly voice.

Ответить
@satyamedh
@satyamedh - 12.10.2023 08:40

8 years later still one of the best resources out there, THANKS!

Ответить
@megumin_lyq
@megumin_lyq - 28.09.2023 05:32

List<Node> discovered
List<Node> source
Node start;
Character character;
discovered.Remove(start);
source.add(start);
f_cost //current lowest f_Cost

var current=start;
do{


current.GetNeighbors().Where(x=>x.CanMove(this.character)&&!discovered.Contains(x))
.Foreach(node=>{
??
//?? new path to neighbour is shorter or neightbor is not in source
//Calculate G and H
node.CalculateFCost();
//?? set parent of neighbour to current

discovered.TryAdd(node)
}



current=source.Min(node=>node.Fcost).Min(node=>node.HCost)


}

Ответить
@shawnx.1238
@shawnx.1238 - 27.09.2023 00:58

Hi, I got a question. If the path has been changed into another trajectory, how can you sustain the parent node of the current node?

Ответить
@UltronZX
@UltronZX - 22.09.2023 10:10

Really nice and logical explanation, this is really the video i had been looking for 👍

Ответить
@user-rl9xy4lh6o
@user-rl9xy4lh6o - 15.09.2023 15:40

How come the distance between the nodes are 1

Ответить
@victorchen6537
@victorchen6537 - 30.08.2023 17:51

Please, what is the program used in the video to visualize the algorithm? I have a homework where I need to make a video on demonstrating how the algo works, this program would be really useful

Ответить
@shadowlordalpha
@shadowlordalpha - 06.08.2023 03:14

Its been years and I still come back to reference this video

Ответить
@erfanamkh7220
@erfanamkh7220 - 28.07.2023 22:04

Thanks, Great Video.

Ответить
@Gawain-hi5pd
@Gawain-hi5pd - 14.07.2023 07:22

can you do video on jps?

Ответить
@michaelellis2959
@michaelellis2959 - 04.07.2023 21:19

Great video, thanks for taking the time

Ответить
@huntie1608
@huntie1608 - 29.06.2023 16:13

its weird. his voice was so different back then

Ответить
@RigelOrionBeta
@RigelOrionBeta - 15.06.2023 02:39

This was a fantastic explanation. Ive watched three videos on this algorithm and this is by far the best explanation.

Ответить
@cybermats2004
@cybermats2004 - 23.04.2023 01:37

I still dont understand why at the beginning he gives the points 14

Ответить
@Manarox2142
@Manarox2142 - 04.04.2023 17:32

actually I don't understand how computer count for G and H value.

Ответить
@reverberateios5942
@reverberateios5942 - 27.03.2023 12:34

ur mom

Ответить
@reverberateios5942
@reverberateios5942 - 27.03.2023 12:34

gday

Ответить
@unchaynd7266
@unchaynd7266 - 18.03.2023 20:25

Man... I'm finally starting to understand it.

Ответить
@psi2255
@psi2255 - 16.03.2023 16:45

Literally made an entire library in like 2.5 hours with this explanation, the delivery and visuals were perfect.

Ответить
@lvaedho5283
@lvaedho5283 - 27.02.2023 14:54

where i can get some calculating file / program just like in the video ?

Ответить
@shahnawazabdulrehman526
@shahnawazabdulrehman526 - 17.02.2023 00:05

Brother you are life saver❤

Ответить
@stellar4677
@stellar4677 - 13.02.2023 08:47

i know im 8 years late.. (love all of ur new vids btw!!!) but that pseudocode and explanation was exactly what i needed!! thank you for your great videos a decade later!

Ответить
@FernandoGomez-hg4rn
@FernandoGomez-hg4rn - 07.02.2023 06:47

Brilliant, really.

Ответить
@Aloisio_PN
@Aloisio_PN - 05.02.2023 00:15

Good night Sebastian.

I know your video is a few years old, but it never hurts to try!

I'm developing a project and I'm using your teaching with A* Pathfinding.

I really need your help!

Could you add an extra video teaching how enemies can avoid other enemies when the path is generated?

Thank you very much for all the knowledge and big hug!

Ответить
@thebluetropics
@thebluetropics - 27.01.2023 16:09

I am confused how can we calculate the H cost, someone tell me please...

Ответить
@montana3918
@montana3918 - 21.01.2023 01:36

Awesome explanation mate. Big Like from me.

Ответить
@donatellodonini3147
@donatellodonini3147 - 08.01.2023 02:07

Your h costs are not right: for example the one on the right of node A as a H cost of 52 and the diagonal between that square is sqrt(3^2+4^2), which is exactly 5.0, if you multiply it by ten it should remain 50, not 52

Ответить
@kozavr
@kozavr - 18.12.2022 15:42

The tutorial is perfect, thatks a lot.
The only thing that isn't clear is where do we store the final path, the shortest one. There has to be some kind of a List

Ответить
@PiYouFree
@PiYouFree - 14.12.2022 02:11

I'm really grateful for the tutorial! It helped me during 12th puzzle of Advent of Code 2022 :D

Ответить
@5hadow0f1ife
@5hadow0f1ife - 13.12.2022 06:46

After watching other tutorials I thought that pathfinding is hell, but this one is perfectly simple, took less than 2 hours to implement it for my game

Ответить
@Infinity868
@Infinity868 - 09.12.2022 20:12

So the H cost is always the exact distance from the end node, but the G cost is the distance from the current node + the current node's G cost? Is that how that's calculated?

Ответить
@silviuvaipan7850
@silviuvaipan7850 - 27.11.2022 00:02

Great video! Thanks!

Ответить
@jamesbradford870
@jamesbradford870 - 05.11.2022 04:08

The answer to life is 42. Taking the first step is the right answer, even if it's the wrong way.

Ответить
@JaguarProJoe
@JaguarProJoe - 17.10.2022 21:53

TYSM!! You actually helped me understand it now, I really needed this for a sort of road pathfinding

Ответить
@Ramash440
@Ramash440 - 23.09.2022 08:39

I think I've watched this tutorial like 3 times already. 4th time's the charm because I finally understand A*, it's so satisfying when things just click in your head. Now I just need to actually implement the graphs for my game...

Ответить