I don't think they will. If the ants only find one way they will only follow it careless if there's a better one they haven't discovered. If they find 2 at the same time they will use the shorter one because there will be more pheromones because the ants don't Have to walk that fast to spray them out
@@sinnvollerkommentar263 I mostly agree with you(btw hello German m8), although there is a chance that they will be able to optimise their path, if many ants decide to be "adventurous". Albeit this chance is very low.
@@smilingx4-189 the best trajectory changes with how high the objects velocity, mass etc. is. The path the ants take will most like not be the best path for anything else besides them.
I'm finally early on one of your videos, fantastic work. It's fascinating to watch them go from a scattered mess to a perfectly organized and optimized path.
Not gonna lie. I have no idea how i ended up finding your videos, but youtube has been drip-feeding me your ant simulations and its been a blast to watch. The slime molds were wild too. thanks
So one thing I've noticed is that when ants get stuck in limbo (usually explorers from before the food path is established), it can take them a really long time for them to eventually return to the path, if they ever return at all before the food supply runs out. These ants in limbo are essentially wasting the colony's resources while they continue to exist; because the number of ants on-screen is fixed, ants in limbo effectively lower the number of ants that can contribute to bringing back food. I propose that you give each ant a "life timer" which dictates how long they can survive outside the colony. You set the timer based on how long it should realistically take to find a food source. At the start, several thousand ants are spawned from the colony, one per millisecond (don't spawn them all simultaneously, otherwise large amounts of ants will die simultaneously, which looks really weird). If an ant's life timer expires, it dies and a new one spawns at the colony. If an ant picks up a food morsel, its life timer is completely refilled. If an ant delivers food back to the colony, its life timer is also completely refilled. In other words, only the ants that most effectively contribute to the colony survive, while the stragglers eventually die off. Maybe later on, you can probably implement some kind of birth-death system so that the number of ants fluctuates based on how plentiful or scarce food is, but for now I think the "life timer" mechanic is a good first step.
Ants actually leave a trail as they leave the nest so they can follow it back home later. im not entirely sure, but i suspect they go home eventually, but maybe they stay out until they find food or die... when they find food they leave a different trail while following the trail back to their home. this is so that other ants can find the food. in real world situations, its not just one big block of food and the ants are always looking for more food. that is to say them still looking for food is a good thing, if they died too quickly they never would have made it out of the maze and all ants follow the same set of rules.
It should but its most likely not as nice to watch and also a bit more complicated to implement (Not much more though). Though I'm not onehundred percent sure on that
i wonder what would happen if you treated it kinda like snake, you have one scorce of food and when it is depleted another source randomly pops up. I can think of 3 possible results: 1- they set up a form of pseudo base that acts as a middle man from a depleted source to a new one, it would slowly be optimized and the pseudo base wouldn’t be there anymore. 2- once a source is depleted they revert back to looking for new food and they completely forget about the old location 3- the most probable outcome is a mix of these two that depends on what any finds it first. if it was an ant that was at the old source when it depleted and started looking for a new source then the pseudo base might appear, and if te ant was just a stray wonderer then the 2nd result may happen.
Another idea i think would be cool is a sort of “Respect score” where each ant has a respect score. each time an ant takes one peice of food to the base they gain one point. The more points an ant has the more likely other ants are to follow them. And yes, i understand the problems with coding this due to having so many ants all being treated uniquely so its a complete hypothetical.
Like because you never cut the ants eating the "thanks" screen until they are done with it. It'll be interesting to see what you come next? Maybe two tribes of ants competing with each other? Maybe ants can die if they don't find food soon enough, so we see where there are "traps" for ants?
I think you may get better initial dispersal if you add a behavior to cause explorers to steer away from each other slightly, boids-like. Possibly they could steer toward nearby collector/returners as well. I haven't actually looked at your code, though, so I don't even know if their states are discrete, lol.
uh guys. Why does the complex maze path say "sus"? If you cant see it, its more obvious at 3:34, look at the top half of the maze, and in the center it says "Sus".
You cool make some cool looking lightning with this, considering that the ants act something like negative particles, and the food like positive particles, then run the simulation take the density view and the speed up the frames to the speed of lightning.... you might have to change the finding function after the food has been found and or depleted, to then make the lightning end correctly.
This stuff is fascinating! I would love to see how they would behave with things like, maybe, desserts that can only be gathered as food after the other 'main' food supply is depleted, or even having a simple checkpoint (or two!) that they would need to hit before the path to the food is open. Of course, it entirely depends on how things are set up, and I am super happy to see this done as it is already.
you can see the moment the first ant makes it home with the food, the trails are alteady set, and then everyone else starts to follow the trail and it solidifies.
This is basically the monkey typewriter thing. You slip out a huge amount of ants and eventually one will solve the maze, then the rest fall in line. Super cool stuff.
Thank you for this, it's an outstanding demonstration. I am planning an exhibition about mazes and would like to feature this video with your permission.
@@PezzzasWork Many thanks, this is beautiful work and I really appreciate it. Do you have a demonstration of Flood and Backtrack (the Lee-Moore Algorithm)?
just thinking... in the circular maze at the end there was still quite some activity in the upper right quadrant of the maze.. those are old ants that never find their way out of that part of the maze? interesting phenomenon.. and having watched all of your ant simulations i had the idea this would be recreatable as an experiment.. i don't know how "cruel" it would be to build the same maze and put 2000 ants in there with a block of sugar at the other end (or something nutritious for them, excuse my ignorance) i remember watching an ant-otaku some time ago that would be an ideal partner for that kind of experiment ^^ thanks for sharing your ideas.. your vids motivate me to pick up a long-neglected skill: programming..
would be interesting if you expanded the markers to act like ant pheromones do. Not only "we found the goal go this way" but also "we found nothing here move on" and have the markers pass from ant to ant a bit better so they could generate messenger ants that follow trails from exploratory groups until it reaches a place where it can no longer progress along the exploration marker without touching its messenger marker etc. that way pockets wouldnt get stuck and you could do time trials by altering weight of when ants will swap to messengers, how long before a nothing here marker is placed, and how many will follow a "we are exploring this way" marker etc.
if you havent, i think you should add a chance that the most ahead ant, will communicate to the previous wether if they chose a right direction or not, and then also the other one has a chance to listen to it or not
Though unrealistic, a 3D environment would be interesting Another few things to try: forces, a barrier that slides slowly, a wind blowing the pheromone northwest, designated 'explorer' ants that ignore paths to develop new ones
i was just about to make a comment like this! i didn't know the name, but i was thinking that they'd probably explore and find food much faster if ants followed signs of "no home pheromones" towards places other ants thereforr havent explored recently/thoroughly
@@LoreleiBlaine a simple case of eliminating places to search that are known to be empty. Would like to see side-by-side comparison with the current system.
I'd like to see a simulation where the ants are enclosed in a large area completely filled with food, with the home in a corner (and the immediate area around it empty). I think it would be interesting to see how the ants harvest such a massive resource supply. Will they reliably find the closest bit of food, thus creating a growing radius devoid of further food? Or will they dig into the supply in a single direction and carve out a linear tunnel, changing direction only when that tunnel reaches the far wall? Or something in between?
It would be super cool to see a maze with multiple correct paths so we could watch them optimise their route
I don't think they will. If the ants only find one way they will only follow it careless if there's a better one they haven't discovered. If they find 2 at the same time they will use the shorter one because there will be more pheromones because the ants don't Have to walk that fast to spray them out
u can see their multiple routes at the smiley near the end
@@sinnvollerkommentar263 I mostly agree with you(btw hello German m8), although there is a chance that they will be able to optimise their path, if many ants decide to be "adventurous". Albeit this chance is very low.
The first path the ants find will mostly likely be the shortest
@@nikosplugachev6610 "most likely" is about too strong a claim IMO, but you're right
It's really interesting how the path optimizes overtime once they've discovered the food.
@@smilingx4-189 the best trajectory changes with how high the objects velocity, mass etc. is.
The path the ants take will most like not be the best path for anything else besides them.
its somthing ants do
RIP to all the ants who're still stuck on the right side of the complex maze
They were definitely bugs
cant like bc 69 likes
F
kogh
@@nou4898 Now go like for 420
I would love to see an environment that changes dynamically so they have to adapt to changes potentially getting in their way.
like, for example, a sandcastle the 1st day but then a bunch of sand rocks the next.
the density views looks like scifi energy or something, I love it
I thought I was the only one
Agreed!
Ants eating Pezzza's logo in the end are next level.
cant like bc 69 likes
also ur comment was below someone with 69 likes
@@nou4898 nice
It's so cool how the turns change to be more optimal.
I'm finally early on one of your videos, fantastic work. It's fascinating to watch them go from a scattered mess to a perfectly organized and optimized path.
This was one of the coolest outro i've ever seen.
Always top quality simulations plus you provide the source 👌🏾
Not gonna lie. I have no idea how i ended up finding your videos, but youtube has been drip-feeding me your ant simulations and its been a blast to watch. The slime molds were wild too. thanks
4:27 looks like the t-shirts always worn by that one high school classmate who really loved Slipknot
I love these ant sims so much!
Cool video man! I can't wait to see the next addition to this series.
So one thing I've noticed is that when ants get stuck in limbo (usually explorers from before the food path is established), it can take them a really long time for them to eventually return to the path, if they ever return at all before the food supply runs out. These ants in limbo are essentially wasting the colony's resources while they continue to exist; because the number of ants on-screen is fixed, ants in limbo effectively lower the number of ants that can contribute to bringing back food.
I propose that you give each ant a "life timer" which dictates how long they can survive outside the colony. You set the timer based on how long it should realistically take to find a food source. At the start, several thousand ants are spawned from the colony, one per millisecond (don't spawn them all simultaneously, otherwise large amounts of ants will die simultaneously, which looks really weird). If an ant's life timer expires, it dies and a new one spawns at the colony. If an ant picks up a food morsel, its life timer is completely refilled. If an ant delivers food back to the colony, its life timer is also completely refilled. In other words, only the ants that most effectively contribute to the colony survive, while the stragglers eventually die off.
Maybe later on, you can probably implement some kind of birth-death system so that the number of ants fluctuates based on how plentiful or scarce food is, but for now I think the "life timer" mechanic is a good first step.
Ants actually leave a trail as they leave the nest so they can follow it back home later. im not entirely sure, but i suspect they go home eventually, but maybe they stay out until they find food or die... when they find food they leave a different trail while following the trail back to their home. this is so that other ants can find the food. in real world situations, its not just one big block of food and the ants are always looking for more food. that is to say them still looking for food is a good thing, if they died too quickly they never would have made it out of the maze and all ants follow the same set of rules.
You do it!
I'm soo glad I found this channel, this is great
The end screen reminded me of one of these plasma globes!
Come to think of it, this would probably also work well in 3D, right?
It should but its most likely not as nice to watch and also a bit more complicated to implement (Not much more though). Though I'm not onehundred percent sure on that
i wonder what would happen if you treated it kinda like snake, you have one scorce of food and when it is depleted another source randomly pops up.
I can think of 3 possible results:
1- they set up a form of pseudo base that acts as a middle man from a depleted source to a new one, it would slowly be optimized and the pseudo base wouldn’t be there anymore.
2- once a source is depleted they revert back to looking for new food and they completely forget about the old location
3- the most probable outcome is a mix of these two that depends on what any finds it first. if it was an ant that was at the old source when it depleted and started looking for a new source then the pseudo base might appear, and if te ant was just a stray wonderer then the 2nd result may happen.
Another idea i think would be cool is a sort of “Respect score” where each ant has a respect score. each time an ant takes one peice of food to the base they gain one point. The more points an ant has the more likely other ants are to follow them.
And yes, i understand the problems with coding this due to having so many ants all being treated uniquely so its a complete hypothetical.
Great work Again
Also that you wrote an algorithm to turn your image into food. It's so little details that show how much work you put into it
Like because you never cut the ants eating the "thanks" screen until they are done with it.
It'll be interesting to see what you come next? Maybe two tribes of ants competing with each other? Maybe ants can die if they don't find food soon enough, so we see where there are "traps" for ants?
Really impressive work and clean code. Your effort, innovative way of thinking only boost great C++. Perfect && thank you. Have a nice day!
No way I found this project earlier today and get to watch a new video on the same day. This project is inspiring to me
Wow your videos are so awesome. I really fall in love with you training a drone video.
Like it was so much cool.
Just left a comment in another video of yours that I wanted to see this in a video. Here it is. Excellent
Man, just gotta love the way ants work, it's such a powerful algorithm and so effective.
i like that the 303 started in the song when the acid maze came on screen
Really cool how these ants are in essence performing BFS. It's also quite interesting how they optimize their path, like in the simple maze
The density thing reminds me of some sort of life-drain spells and I enjoy it more for that
Your ants look like real live brine shrimp swimming about. I love it! These videos are amazingly satisfying!
That density view looks like electricity arcing. Very cool!
I think you may get better initial dispersal if you add a behavior to cause explorers to steer away from each other slightly, boids-like. Possibly they could steer toward nearby collector/returners as well. I haven't actually looked at your code, though, so I don't even know if their states are discrete, lol.
They could just also avoid the high concentration of return-home pheromone in search-for-food state.
what i find interesting is the path tightening looks so much like a string that was weaved through the maze and pulled tight
I like how they straighten into a line when they receive path nodes.
the density view really mimics an electric current, really cool
Watching the green face eaten away and replaced by a red "face" in the end was scary.
uh guys. Why does the complex maze path say "sus"? If you cant see it, its more obvious at 3:34, look at the top half of the maze, and in the center it says "Sus".
everybody gangsta till the ants turn into an energy beam
that's really cool how the line becomes more efficient
My boy spilled some sugar in the kitchen. A few days later we had a trail of ants. This explains it, I guess.
Ahhhhhhhh, in my timezone its currently 0:47h and i have school tomorrow, but f*ck it, I have to see this Video now
this creates a really cool visual. I think it would be interesting to generate graphics or vfx assets by using similar simulations
the density view looks awesome - kinda wanna use it as visuals for the next time dejaying
You cool make some cool looking lightning with this, considering that the ants act something like negative particles, and the food like positive particles, then run the simulation take the density view and the speed up the frames to the speed of lightning.... you might have to change the finding function after the food has been found and or depleted, to then make the lightning end correctly.
This stuff is fascinating! I would love to see how they would behave with things like, maybe, desserts that can only be gathered as food after the other 'main' food supply is depleted, or even having a simple checkpoint (or two!) that they would need to hit before the path to the food is open. Of course, it entirely depends on how things are set up, and I am super happy to see this done as it is already.
you can see the moment the first ant makes it home with the food, the trails are alteady set, and then everyone else starts to follow the trail and it solidifies.
the density view of the complex maze would be a pretty dope electric effect
Was watching the other ant videos this morning thinking about how they would be in a maze. Very cool
This is basically the monkey typewriter thing. You slip out a huge amount of ants and eventually one will solve the maze, then the rest fall in line. Super cool stuff.
Currently this is the best ant algorithm video, at least because you show us markers!
1:07 this is like a hose spraying on mud so satisfying
the density view looks so cool
That last little bit looks a lot like those universe maps it’s cool
the density view was sick. watching the exploration without any speed multiplier was way cool though.
Thank you for this, it's an outstanding demonstration. I am planning an exhibition about mazes and would like to feature this video with your permission.
Yes no problem :)
@@PezzzasWork Many thanks, this is beautiful work and I really appreciate it.
Do you have a demonstration of Flood and Backtrack (the Lee-Moore Algorithm)?
The amount of communication between ants is insane
Literally every ant in a 5 mile radius when food gets dropped
just thinking... in the circular maze at the end there was still quite some activity in the upper right quadrant of the maze.. those are old ants that never find their way out of that part of the maze? interesting phenomenon..
and having watched all of your ant simulations i had the idea this would be recreatable as an experiment.. i don't know how "cruel" it would be to build the same maze and put 2000 ants in there with a block of sugar at the other end (or something nutritious for them, excuse my ignorance)
i remember watching an ant-otaku some time ago that would be an ideal partner for that kind of experiment ^^
thanks for sharing your ideas.. your vids motivate me to pick up a long-neglected skill: programming..
that is just what i wanted to see when i saw the part 2
I love the "Density View"!
Forget A*, ant simulation is the *real* best pathfinding algorithm.
This video is about to blow up!
Really cool.
The density view reminds me galactic filaments, the largest known structures of the Universe.
Density view looks so cool
I especially loved the part with the simulated ants
2:01 what's in my head when those ants{automatic negative thoughts} take over
Looks like they digg pure argent energy from the hell)). Nice simulations
Came for antz, stayed for chill techno vibes
*Pezzza you're a legend =D*
would be interesting if you expanded the markers to act like ant pheromones do. Not only "we found the goal go this way" but also "we found nothing here move on" and have the markers pass from ant to ant a bit better so they could generate messenger ants that follow trails from exploratory groups until it reaches a place where it can no longer progress along the exploration marker without touching its messenger marker etc.
that way pockets wouldnt get stuck and you could do time trials by altering weight of when ants will swap to messengers, how long before a nothing here marker is placed, and how many will follow a "we are exploring this way" marker etc.
The simple maze with markers view is just like a plague
if you havent, i think you should add a chance that the most ahead ant, will communicate to the previous wether if they chose a right direction or not, and then also the other one has a chance to listen to it or not
The density function looks a lot like lightning. I guess it has some similarities with how lightning works, following the path of the plasma
The density view could probably make a good lightning effect for a game
Basically ants are masters of optimization.
So inspiring! Beautiful
Though unrealistic, a 3D environment would be interesting
Another few things to try: forces, a barrier that slides slowly, a wind blowing the pheromone northwest, designated 'explorer' ants that ignore paths to develop new ones
First, Could this be a maze solving algorithm? and second, I love the way the paths shift, like a rubber band tightening around an object
That...
...was beautiful(the density view)
The ending was sooo good.
They make the perfect racing line 😊
This is so oddly satisfying to watch!
I love that software. Been playing scenarios for hours. Only small issue are those crashes :)
U r amazing bro, I love your works, congratulations
density view was next level
Super cool! Thank you
can i use this to get street routes ?
Did you include known-false avoidance?
(when searching for food, staying away from "to-home" markers?)
i was just about to make a comment like this! i didn't know the name, but i was thinking that they'd probably explore and find food much faster if ants followed signs of "no home pheromones" towards places other ants thereforr havent explored recently/thoroughly
@@LoreleiBlaine a simple case of eliminating places to search that are known to be empty.
Would like to see side-by-side comparison with the current system.
soo density view leads me to believe that ants are actually lightning
I'd like to see a simulation where the ants are enclosed in a large area completely filled with food, with the home in a corner (and the immediate area around it empty). I think it would be interesting to see how the ants harvest such a massive resource supply. Will they reliably find the closest bit of food, thus creating a growing radius devoid of further food? Or will they dig into the supply in a single direction and carve out a linear tunnel, changing direction only when that tunnel reaches the far wall? Or something in between?
i cant help but see "Sus" written in the complex maze and im SO sorry if thats unintended
can an ant take same space with other one ?
This is amazing, ever since I saw your video Im trying to implement this algorithm on mi own.
2:29 this is what a vaccum cleaner looks like when sucking up dust
0:49 I was just about to ask the difference between this and a genetic algorithm, and then BOOM
This is pretty amazing
The density view makes me think of lightning ionizing air.
That outro was sick
I wonder how often ants get lost in real life. Ending up losing scent and going off forever
I think it would be cool to see if you could program a death circle situation and how that would look
This video exploded my mind