Makes me so happy to hear! You can start from the beginning here if you want to learn the coding part! czcams.com/users/shiffmanplaylists?flow=grid&view=50&shelf_id=14 czcams.com/users/shiffmanplaylists?sort=dd&view=50&shelf_id=2
I was searching for maze solution algorithms and found this video series & the channel. Watched all three videos in a breeze. Now I know how to implement the A* algorithm and also know the problems which I may encounter with. This channel is great, very entertaining & fun to watch, very very helpful and the videos are not dull as other channels' videos about this depth subjects. The first thing I checked about this channel was the date of your last video. And it was a couple hours ago. It was a superb relief =) Please let us know how to help & support to keep you making videos in the future. Keep up the good work! Best regards.
It took several hours of dealing with bugs (infinite loops are the worst; forgot to add noLoop() to the end condition), but I got it! Thank you for the walkthrough!
I've been interested in A* for quite some time and oh boy didn't you manage to make it even more interesting with the entertaining performance you put up there! ^^ Thanks for the video.
Must say it was exciting to watch how A* was changing over time and 3 videos were great startin booring but after some time it was awesome to watch and also good luck for next challenge
Could do this with a variation of 'wall' ... instead of wall being true/false make it be 'roughness' 0-10.0 , and then multiply the heuristic by the spot's roughness (oridifficulty to move through that spot) Then you will never get a blocked path, but it should find a path of least resistenence....
@@cancan2450 that approach sort of failed though a heuristic to get to the end doesn't know the net gradients along the path... you can weight it such that the path with least change is rewarded most.. and applying a logrithmic scalar to the height allows absolute heights to be avoided (ended up getting trapped about half the time not finding a rout anywhere because it's in the middle of infinities like you mentioned :)
Damn Dan[iel], when did you get 200k subs? Your channel is growing so fast! I was really glad when I first encountered your channel and started binge watching so many videos, but I felt bad that you only had about 10k subs when you obviously deserve more. Apparently the CZcams algorithm felt the same way. Congrats on [almost] 200k subs! Your videos are great.
Your videos are awesome Daniel Shiffman! Thank you for making these and please keep making more! Question: Is there a list someplace we may reference for upcoming topics and upcoming live streams?
The way that I used A* in the game I’m making is done in such a way is that it calculates the route and follows it every frame. The way that it works for frame based is that when it finds the route, it will trace it back to the last tile before it gets back to the object, and then gets the angle to move based off of which direction it traces back from. This lets it calculate the route and work every frame. It also has it to where if it gets too many tiles in the closed set, it will just use the angle to the player, which works to prevent frame drops. That threshold is going to be changeable in the AI settings so that you can change the tradeoff between good AI and CPU intensiveness.
Hey man love your videos, have you ever considered using Prolog? Especially for pathfinding and graph traversal algorithms like A*. I watch your videos as I enjoy your thought process to figuring out a solution, I'd love to see your thought process in a declarative language.
Hello everyone! :D Since I am just getting into programming(Java) I would like to ask how can this be translated into Eclipse (what to add/take)? So what are the main differences between Java and Processing, as I understand Processing is based on Java lingo - take away a bit of its less pretty syntax? Ps. Two videos in, I had to hit subs, his explanations and energy are so refreshing! Love these Coding Challenges!
Hi Daniel, learning and loving JS through your videos. I should join a local coding group or something (if that even exists): Need to share my pasion and excitement with someone.
Hi, this was awsome! How about implementing some code, to get to other optimal solutions. (If there are some) In most of the cases there will be more than one optimal path. I mean if on ur optimal way back home, there is a criminal waiting for you, which is not an obstacle, but sucks anyway, you will be really happy, if there is an other optimal path :D
i know this video is old but i would really like it if a tick speed was added, so that multiple steps can be taken in 1 frame, i know nothing about p5 but i have javascript skills so i might implement
Yes, I should do an updated one. Here are some recent and mostly still relevant ones: czcams.com/video/UCHzlUiDD10/video.html czcams.com/video/d3OcFexe9Ik/video.html
Do you teach coding on youtube? Cos i would really like to learn the basics before i actually go to school learning more coding next year. If so do you have a link or something?
In your opinion, what is better to learn, c++ or js. I am beginner and i don't know what is better. Thanks if you can answer me and sry for my bad english...
Thanks for the great vid. I was watching live and it was one of the best live vids I have seen. Very entertaining. - When I draw the vector line it does not get refreshed it seems. It just draw a new line over and over again resulting in the PATH having multiple dead end results. Is there a trick to removing the old line each time. I guess I missed something.
I love this videos, but I wonder why make this function " this.removeFromArray(this.openSet, current); ", when you just can write " this.openSet.splice(winner, 1); " ?
i write a code in Android mode but when i run it i get error. i run same code in Java mode everything is running . how can i run My code in Android mode without error?
HOW DO YOU OPEN JAVASCRIPT FILES IN YOUR BROWSER? I've been trying to figure this out for ever and I don't have a clue. Clicking and dragging doesn't work.
Sure as you have to deal with awt and swing or JavaFX for graphics, which is good for designing UI, in p5 javascript its easier to draw this kind of graphics. In Addition, stuff like object oriented coding and inheritance is more complicated to write in Java
Going to school for cs I get in trouble for free coding. If I don't have a pseudo coded algorithm I lose a letter grade whether it was done correctly or not. But I get my best work done free hand that's when I get into stuff I don't understand and get it to work
its all a perception, I just know I won't have the drive to continue do do what I need, I do realize that I do not need to go to college to get a codding job, but I want to, so I can get more structure in my education, while I self teach, and watch videos in the side of programming and computers that I don't get out of school.
Can anyone suggest me how I can modify this code to convert the obstacles into only nodes possible to travel and find the shortest path to the destination?
I ask : Why in the 2nd video the spots moves in same time (i mean the x and y moves in the same same time )? Because he have the same (g) and same (distance) ? Every path is optimal and there are no best (g) and distance ?
Yes! These are the two "Get started from scratch playlists": czcams.com/users/shiffmanplaylists?flow=grid&view=50&shelf_id=14 czcams.com/users/shiffmanplaylists?sort=dd&view=50&shelf_id=2
That's what I was thinking. Generate a maze and imagine a strobing rainbow dot (a unicorn, of course) wandering randomly through the maze being chased by the A* algorithm.
Wouldn't you have to "reset" the pathfinding and set the start to the point where you left off, and set the new end point to the position the unicorn? Not sure ofc - still just starting to learn about pathfinding.
@@maltebp If you take the last best evaluated node as your new starting point you could end up with a problem if the target loops back to your original starting point. You would end up retracing your traget's steps and end up with a lot longer path than the shortest one. You should reset the algorithm if the target has moved more than some set treshold if that is the way you want to take it. But A* is better suited for non moving targets.
Or make the beginning move as well. Every time the target moves, set the beginning to the closest point it's reached so far, and restart the algorithm.
Just a quick disclaimer. Even the improved version works horribly. Don't use this in an actual application. There's lots of bugs and unnecessary inefficiencies that could be fixed with like one line of code. Or at best just rewrite it entirely. But interesting video nonetheless.
I love your videos and they inspire me to code as much as i can. I made a python version of this project on my blog! progressingprogramer.wixsite.com/blog
Hello Dan congratulations on the content of the videos. I did a test with pathfind, I have a question. if you see in the example. rodrigo-kulb.com.br/rota It works sometimes and sometimes it doesn't work. could help? if you reload page it works sometimes
You were the channel that kickstarted my JS coding career and made me think it is actually possible to code, THANK YOU!
That's so nice to hear, thank you for the support!
I can't code, i don't understand Nothing about code, but damn, this is entertaining as hell
I already know how to code, I already used (not coded I admit) a path-finding algorithm, but damn, this is entertaining as hell
Makes me so happy to hear! You can start from the beginning here if you want to learn the coding part!
czcams.com/users/shiffmanplaylists?flow=grid&view=50&shelf_id=14
czcams.com/users/shiffmanplaylists?sort=dd&view=50&shelf_id=2
Hu Wun I would whole heartedly recommend his early videos about learning p5.js. I am enjoying them so much!
I would recommend learning programming for fun, its will change the way u look at the world :)
You should learn. Coding isn't that hard.
I was searching for maze solution algorithms and found this video series & the channel. Watched all three videos in a breeze. Now I know how to implement the A* algorithm and also know the problems which I may encounter with. This channel is great, very entertaining & fun to watch, very very helpful and the videos are not dull as other channels' videos about this depth subjects. The first thing I checked about this channel was the date of your last video. And it was a couple hours ago. It was a superb relief =) Please let us know how to help & support to keep you making videos in the future. Keep up the good work! Best regards.
It took several hours of dealing with bugs (infinite loops are the worst; forgot to add noLoop() to the end condition), but I got it! Thank you for the walkthrough!
I've been interested in A* for quite some time and oh boy didn't you manage to make it even more interesting with the entertaining performance you put up there! ^^ Thanks for the video.
Must say it was exciting to watch how A* was changing over time and 3 videos were great startin booring but after some time it was awesome to watch and also good luck for next challenge
I can look at this all day
Thanks for making these videos. I really love learn with you!
"It looks like lightning in this kind of a crazy way" XD
Could do this with a variation of 'wall' ... instead of wall being true/false make it be 'roughness' 0-10.0 , and then multiply the heuristic by the spot's roughness (oridifficulty to move through that spot) Then you will never get a blocked path, but it should find a path of least resistenence....
Great idea! Or just pathfinding through a field of simplex noise. :)
or you can just make the distance from 1 to Infinity. so it is impossible to move to that spot.
@@cancan2450 that approach sort of failed though a heuristic to get to the end doesn't know the net gradients along the path... you can weight it such that the path with least change is rewarded most.. and applying a logrithmic scalar to the height allows absolute heights to be avoided (ended up getting trapped about half the time not finding a rout anywhere because it's in the middle of infinities like you mentioned :)
teacher: make storm
me: take coding train's A* pathfinding algorithm without showing the obstacles
With my formation, I had a work in python for doing this, that was pretty cool to do this c:
Thx for the series
Damn Dan[iel], when did you get 200k subs? Your channel is growing so fast!
I was really glad when I first encountered your channel and started binge watching so many videos, but I felt bad that you only had about 10k subs when you obviously deserve more. Apparently the CZcams algorithm felt the same way.
Congrats on [almost] 200k subs! Your videos are great.
Thanks, yes, it's crazy how quickly it grew in the last month (it's slowed down again now.)
The Coding Train the youtube algorithm likes you xd
1:22
Grandpa: What!?!
nice video, you just simulated lightning. very cool
Technically, when it goes diagonally, it is sqrt(2)-1 longer than going vertically or horizontally
please do a series on neural networks
Your videos are awesome Daniel Shiffman! Thank you for making these and please keep making more! Question: Is there a list someplace we may reference for upcoming topics and upcoming live streams?
good stuff, more surprises please :) I would love to see you reorganize and possible 3d this concept.
Dan, could you do a lesson on Quadtree collision detection? its quite interesting.
Really interesting Dan. Let us build this in C++ someday if you like :)
Can you do a machine learning challenge? It'd be really interesting to see how you'd go about it :)
LIGHTNING GENERATOR TUTORIAL!!!
Very amazing coder!
Your end music should have a train whistle in it
Well done, awesome stuff! :D
Actually when it goes to diagonal neigbor the g cost should be greater than normal neighbor g cost, according to pythagorean theorem
The way that I used A* in the game I’m making is done in such a way is that it calculates the route and follows it every frame.
The way that it works for frame based is that when it finds the route, it will trace it back to the last tile before it gets back to the object, and then gets the angle to move based off of which direction it traces back from. This lets it calculate the route and work every frame.
It also has it to where if it gets too many tiles in the closed set, it will just use the angle to the player, which works to prevent frame drops. That threshold is going to be changeable in the AI settings so that you can change the tradeoff between good AI and CPU intensiveness.
Wow!111 just wow!!! 🤩
LOve your videos man..... keep up the good work. Would love to see a coding challenge Hasse Diagram :)
Could you make a Sudoku-solving algorithm?
Hey man love your videos, have you ever considered using Prolog? Especially for pathfinding and graph traversal algorithms like A*. I watch your videos as I enjoy your thought process to figuring out a solution, I'd love to see your thought process in a declarative language.
Will think about it!
Awesome, thanks for the reply! :)
Hello everyone! :D
Since I am just getting into programming(Java) I would like to ask how can this be translated into Eclipse (what to add/take)? So what are the main differences between Java and Processing, as I understand Processing is based on Java lingo - take away a bit of its less pretty syntax?
Ps. Two videos in, I had to hit subs, his explanations and energy are so refreshing! Love these Coding Challenges!
Hi Daniel, learning and loving JS through your videos. I should join a local coding group or something (if that even exists): Need to share my pasion and excitement with someone.
Keep it up!
It looks like lightning because that is how lightning works.
Sir,please do a video on LPA star and Dstar-lite
This is awesome. I hope to be a programmer some day too :D
love from India!!! Hell loving the coding now Would like to contribute something creative as well.
where to find the dist method code on the heuristic method on this tutorial?
I am very sad ..
U deserve 2 million subscribers and more with time!!!
😊😊😀😀😎😎
"It's what it is" seems like you just watched Sherlock season 4 The Final Problem.
hah, I did not! But now I might just have to!
Hi, this was awsome! How about implementing some code, to get to other optimal solutions. (If there are some) In most of the cases there will be more than one optimal path.
I mean if on ur optimal way back home, there is a criminal waiting for you, which is not an obstacle, but sucks anyway, you will be really happy, if there is an other optimal path :D
could you please make advanced P5.js tutorial. Thank yoh very much for your efforts
i know this video is old but i would really like it if a tick speed was added, so that multiple steps can be taken in 1 frame, i know nothing about p5 but i have javascript skills so i might implement
Yes, great idea!
Can you do a video on how you set up your coding environment?
Yes, I should do an updated one. Here are some recent and mostly still relevant ones:
czcams.com/video/UCHzlUiDD10/video.html
czcams.com/video/d3OcFexe9Ik/video.html
Do you teach coding on youtube? Cos i would really like to learn the basics before i actually go to school learning more coding next year. If so do you have a link or something?
maybe you could try to make a chroma key background replacer from scratch
a green screen coding challenge
In your opinion, what is better to learn, c++ or js. I am beginner and i don't know what is better. Thanks if you can answer me and sry for my bad english...
First! Awesome challenge too!
Is there any previous video to install p5.js and using the editor..processing and how he shows the output in browser..can anyone link it if any..
"We do want this to have a stroke" :D
That's how you make thunder strike :P
Thanks for the great vid. I was watching live and it was one of the best live vids I have seen. Very entertaining. - When I draw the vector line it does not get refreshed it seems. It just draw a new line over and over again resulting in the PATH having multiple dead end results. Is there a trick to removing the old line each time. I guess I missed something.
I am doing things a bit differently though - my code is here: github.com/cacowen/a_star
thanks for sharing!
I love this videos, but I wonder why make this function " this.removeFromArray(this.openSet, current); ",
when you just can write " this.openSet.splice(winner, 1); " ?
also does it ever get annoying having everything enlarged?
How would you write lightning generator?
i write a code in Android mode but when i run it i get error. i run same code in Java mode everything is running . how can i run My code in Android mode without error?
Please make a video where it tries to find a way on the maze generated by the code you made, please please, i am not very good at this sttuff
HOW DO YOU OPEN JAVASCRIPT FILES IN YOUR BROWSER? I've been trying to figure this out for ever and I don't have a clue. Clicking and dragging doesn't work.
Make a .html file with a tag to your javascript code
The html file should be something like:
Put the .html file and your .js file in the same folder, and then simply double click on the .html file to open it in your browser.
would this be a lot different in java?
Sure as you have to deal with awt and swing or JavaFX for graphics, which is good for designing UI, in p5 javascript its easier to draw this kind of graphics. In Addition, stuff like object oriented coding and inheritance is more complicated to write in Java
Hey! I’m interested in coding. A question, when coding JavaScript in the app atom, how do I run the code in the web?
Embed the javascript in a html page and open that page in the browser
Going to school for cs I get in trouble for free coding. If I don't have a pseudo coded algorithm I lose a letter grade whether it was done correctly or not. But I get my best work done free hand that's when I get into stuff I don't understand and get it to work
markus eby school is overrated
its all a perception, I just know I won't have the drive to continue do do what I need, I do realize that I do not need to go to college to get a codding job, but I want to, so I can get more structure in my education, while I self teach, and watch videos in the side of programming and computers that I don't get out of school.
Hey Dan, can you make a video about gift wrapping algorithm ?
Although late Check this github.com/rinovethamoses97/Gift-Wrapping-Jarvis-Algorithm-Visualization
Can anyone suggest me how I can modify this code to convert the obstacles into only nodes possible to travel and find the shortest path to the destination?
Switch this.wall to defaultly be true and when the code picks walls set it to be false.
I ask :
Why in the 2nd video the spots moves in same time (i mean the x and y moves in the same same time )?
Because he have the same (g) and same (distance) ? Every path is optimal and there are no best (g) and distance ?
Rather than "no solution" it should default to "solution that ends closet to the end"
you should make key points that it must go through
Great suggestion!
so you want to iterate over a set of endpoints?
The Coding Train if end changed part way though would it just cope?
Hi, do you leave copies of your final code, that we can download and look over ?#
check the description of the video, he post this code in github.
Can you code a "Rapid Roll" game
250k!
Yay, I'm amazed!
do you have tutorials on your channel about how to use these coding programs?
Yes! These are the two "Get started from scratch playlists":
czcams.com/users/shiffmanplaylists?flow=grid&view=50&shelf_id=14
czcams.com/users/shiffmanplaylists?sort=dd&view=50&shelf_id=2
The Coding Train thank you!
What happens when the end is a moving target?
That's what I was thinking. Generate a maze and imagine a strobing rainbow dot (a unicorn, of course) wandering randomly through the maze being chased by the A* algorithm.
Wouldn't you have to "reset" the pathfinding and set the start to the point where you left off, and set the new end point to the position the unicorn? Not sure ofc - still just starting to learn about pathfinding.
@@maltebp If you take the last best evaluated node as your new starting point you could end up with a problem if the target loops back to your original starting point. You would end up retracing your traget's steps and end up with a lot longer path than the shortest one. You should reset the algorithm if the target has moved more than some set treshold if that is the way you want to take it. But A* is better suited for non moving targets.
Or make the beginning move as well. Every time the target moves, set the beginning to the closest point it's reached so far, and restart the algorithm.
PLS MAKE A NEW VIDEO ;( IM MISSING YOU
still missing you ;(
omfg pls xD
Im with you, just watching some of the old one while he publish a new one
cmon mr shiffman xD
1000th like
Found this video xD
Just a quick disclaimer. Even the improved version works horribly. Don't use this in an actual application. There's lots of bugs and unnecessary inefficiencies that could be fixed with like one line of code. Or at best just rewrite it entirely. But interesting video nonetheless.
it can not be the A*. it is now too slow!
Where is part 5?
You need to read the stream chat to understand.
Teach me to code
I love your videos and they inspire me to code as much as i can. I made a python version of this project on my blog!
progressingprogramer.wixsite.com/blog
Hello Dan congratulations on the content of the videos. I did a test with pathfind, I have a question. if you see in the example. rodrigo-kulb.com.br/rota It works sometimes and sometimes it doesn't work. could help?
if you reload page it works sometimes
here!