@@villaticlang4844 thats how i remembered the name but i think the official name is: en.wikipedia.org/wiki/Ant_mill and yes, it can sometimes happen until some of them die of exhaustion :(
My dad was creating a similar simulator once upon a time, and any time he hit a snag he'd explain the problem to me as a way to get a new perspective etc... one of the problems he'd encountered that sometimes the ants would just start circling around each other in a loop... and he just couldn't figure out how to stop it.. Until I pointed out that they're called "Ant mills" and that it happens in real life too. Some times, it both is and isn't a bug.
That technique is called "Rubber ducking" in software development (as in explain your problem to a rubber duck, because sometimes just going through the problem from the beginning, from a fresh point of view, can help you find a solution). And the ants forming loops is a bug in nature, not your father's simulator XD
So if I got this right, you are telling me that your father didn't code to make it happen but just happened anyway, just like in nature? I have no experience in coding so I might misunderstood. Hope to get a response, I'm really curious
Whenever I'm showing my code to my Dad and he mentions something thats both a bug and a feature we usually end up saying "is it a bug or a feature? Yes"
something similar that i've had happen to me is that i would ask a teacher/professor for help, and as i described the problem to him i would end up thinking of a solution myself and not needing the help after all.
Now add, an ants killer, then ants, can craft railguns if they can find the resources and then they can try to defend themselves learning with a genetic algorithm, then add jectpacks, laser and spaceships and then...
Sadly, They are not conducting electricity enough to get accellerated in a railgun... Otherwise they had plenty of ammo that could keep on attacking even after it impacted 🤔
I love this. One thing I think is missing that would be fun to see is the two different personalities or behaviors of ants that will correct the paths to be more and more direct over time. You'd need some ants to be really strictly following the paths and then others that are more experimental that wander off the trail even when it's there. I'm not sure exactly how it works, but over time this tends to straighten out the paths.
I keep finding myself coming back and rewatching this ant sim series. It's so interesting to think about, and I always try to see if I can make an ant simulation myself, which, I haven't fully succeeded in yet, but I'm getting there. I love this series!
The fact that u can create such an accurate model of how ants work with 3 rather baisc rules is absolutely fascinating. u can even easily translate this into 3 and even higher dimensions. just incredible
actually, most of so-called complex systems can be modeled/are determined by few simple rules. For example: flocking of schools of fish, John Conway's Game of Life, any cellular automata etc
I think one of my favorite thing about ants is they have a nature best path solution. Since as the ants follow the trail back they slowly cut corners and turns as they can sense a little ahead of themselves. This automatically straightens rounded paths out over time
I love watching your vids before bed I saw one the other week and lost your channel but I found it again! I love how relaxing your videos are they are simple yet amazing
This is such a brilliant simulation. Will probably implement something similar but more basic for KAE, your algorithm here creates such great patterns and it's fun to watch!
Fascinating. I'm willing to bet that the ant probably treats every path as a different source of food, even though it leads to the same source as the other
The pattern at 4:06 reminds me of a plasma ball. I would love to see one that's a perfect circle of food that is regenerating constantly and see if the ants would move around the same way the plasma in a plasma ball does.
I know you didn't ask, but it's a different case though. in plasma balls there is an ionization path that forms which has less electrical resistance, and so all electrons go through that same path until the path is so long that there is another path of ionization with lesser resistance that forms, while in this scenario that "other path" never forms as long as there are ants going through the old path. The new ionization path forming is visible when the little "sparks" of the plasma ball snap to a new place
@@carlosmspk Yes, but the random component of the movement of each ant (its "freedom" coefficient) should still cause the trails to move and shift spontaneously.
This is incredible!!! Thank you so much for sharing! I'm going to read your code and learn how you did this :) This makes me very happy I get to learn something new!!!
I once made this same simulation in JavaScript. I ended up iterating so many objects (scent trails, ants, and food) that it crawled to a halt in my browser. I keep meaning to make a better version in Unity or something like that. Very cool to see this version.
Richard Feynmann described this logic in his book "you must be kidding, Mr. Feynmann". He observed, that once ants found some food, they excitedly run back to the nest and bring some fellows checking the path a couple of times. While running they cut corners, therefore every time they reiterate the path to the food it is optimized. After 7 iterations it is usually the shortest path to their home. Also there are two types of ants who follow the path and other are making it. It would be nice addition to this model I suppose.
Hi , i have a bit of a stupid and specific question ! I took a brief look at your repo , was wondering why do you only use header files ? (except for main.cpp)
That not a stupid question at all :) I mainly do this because I like to have everything about a class at the same place. I know it has huge drawbacks (like compilation time, no real forward declarations, complicated statics definitions etc...) but I like to code like this, at least for my personal projects.
@@PezzzasWork Thanks a ton for your answer ! that makes sense :D I was afraid to ask cause being a Python guy I have very little knowledge of c++ conventions, but thanks for the response, I love your content :)
I think this can be a good algorithm to make caves in a 3D voxel terrain. I code every day on unity3D and I'd like to do something similar in the near future.
When I made this simulation for myself, my ants with food always seem to get lost on their way home. They end up following the wrong trail of home pheromones while leaving food pheromones, causing other ants without food to follow that path, leaving more home pheromones, and it becomes a bad cycle where the ants get into a loop of nothingness that only break after a random wiggle causes them to veer off the path or until much time has passed. I was wondering how you avoided this issue. In the video, it seems that the ants almost always begin building back toward home after finding food.
Markers closer to objectives are stronger so ants have more chances to pick the trail in the right direction. I had exactly the same problem of "bad circles" to avoid this ants have a limited amount of markers they can drop (which is recharged when they encounter home or food) so wandering ants have no impact on other after a certain time.
@@PezzzasWork is it possible to make some kind of unique markers, so that when returning home ants would pick their own way (markers that they left) and not someone else's?
Ok so I was doing my coding HW and right after this I started my research about ants because I got my brand new ant farm today. Guess what was in my recommendations? Great work btw!
@@PezzzasWork cheers! what books have you read re. the physics videos you've done? They're awesome. I'm planning to get into that stuff over the next couple of months.
Physics is so fun to play with :D I mostly used what I learned during my education but I ve read some nice articles here gamedevelopment.tutsplus.com/series/how-to-create-a-custom-physics-engine--gamedev-12715 and you can also check the Verlet integration which allows you to quickly have nice things en.wikipedia.org/wiki/Verlet_integration (I am using it everywhere)
It was indeed a little problem. The solution I came to is making ants drop smaller and smaller markers (in terme of intensity) so that when an ant finds a trail it is naturally attracted to the older ones leading to the objective. This approach is not perfect but it works quite well :)
This simulation reminds me of how the Physarum Polycephalum fungus spreads to find food, its interesting to see how the paths develope to shorter and shorter connections
There's a way to promote path shortening here, right? Imagine the markers are short lines or bars instead of dots, laid perpendicular to the line of travel. On a curving path, these bars would naturally splay on the outside of the curve and close up on the inside. So the inner path would accumulate a higher "scent" density and make it more attractive then the longer outside path, proportional to the degree of curvature. This would go on until the path is almost completely straight. The same could be accomplished by keeping the dots but applying either a determined or random amount of sideways scatter to their placement.
Oh wait, looks like that's already present to a degree. I guess two or more ants going at opposite directions need to get around each other, creating random scatter on the paths.
The current way to promote path shortening is lifetime of markers. This ensures that paths won't be too long. And currently ants don't avoid each other but they are not exactly following the markers, there is some randomness in their direction that, as you said, help in a certain degree finding new solutions.
I notice that the paths the ants take back to "home" usually isn't the most optimal (straight line to home). Does the algorithm make the paths optimal over time?
Now imagine this video is "home", us viewers are the "ants", and whichever video we click next in the recommendations is the tastiest "food", and you get a pretty good idea of how the RUclips recommendation agent works. (There's also an interesting parallel to draw to the way our brain works)
A fabulous work I really like it, I would love ust to highlight bout the idea of (ant colony optimization method) to choose the hortest path from and to their food source based on their pheromone propagation. But really great job bro
Is it assumed (and implemented) that the chemical "dots" indicating the paths to home and to food slowly evaporate over time? That would seem to be a ncessary component of both the simuation and how it actually works, otherwise, over time there would be utterly confusing dots everywhere with no pathways to follow.
what would happen if the ants werent given enough time to get back to the base because the food was too far away and the decay of the to base nodes was too fast?
As i know, in reality ants are able to find the straight line from food to home by making a sort of vector sum of the path they travelled. It would be even better if made in this way!
How do other ants know the direction to where they have to walk to find food in the path marked twice with "to home" and "to food" markers if the like ends are indistinguishable for a new unknowing ant?
To guide ants to the markers' objectives I made them drop smaller and smaller markers along their way so that others just have to follow the intensity gradient to find the right direction
@@PezzzasWork but is that necessary? The marks also visibly degrade with time, right? Therefore an ant encountering a path can tell the direction by checking which mark degraded more than the other. You can drop an exactly the same mark everywhere and still be able to tell direction.
Why did you specify C++? But this is very cool! You found an interesting topic and made a video about it that anyone can watch and understand! Well done!
Awesome work. But just as an idea, what if you could make so that the ants take the most efficient path of all, because I see in the video a lot of times in which ants take different paths to get to the same food, so wouldn't it be more logical to make them see what is the most efficient path of all.
I wonder if you could make them find shorter paths by making the markers successively weaker and weaker the further they have walked, so that markers close to home have a stronger scent, indicating that the path is shorter.
Actually this is exactly what I am doing :) the problem is that there is a balance to find between volatility of the markers and durability to avoid them to disappear too quickly
Didn't look at the code yet, but going by the video, a quick question - When an ant (without food) comes across a "to food" path it would change from random wander to going after the to food path? What if an ant having food in it's mouth coming across another "to food" path? will it be ignored and the ant keep following it's own "to home" path?
How did you record the simulation? Did just record the simulation or did you end up rendering each frame individually? If recorded: what software? I always end up with trash quality or huge file sizes (~2gb for 15 seconds) when recording SFML stuff..
If an ant forms a loop while exploring for food, how does it know which path to take when returning home for food? Does it remember a general compass direction to home? Does it always turn left to avoid a loop? Does it remember the areas it has recently travelled and avoid repeating? Thanks
Here is a windows executable, instructions in the ReadMe file.
github.com/johnBuffer/AntSimulator/releases/download/v1.2/AntsSimulator.zip
thxnks man
Appreciate for sharing。
Ultra awesome!!!
wow man, this content is awesome. Also, I would recommend more clicky thumbnails/title, appeared 3 times in my feed before I clicked it.
@@ThePlayfulJoker The problem is that I am a pure dev with no com skills :(
At 1:41 there is a "circle of death" at the bottom right of the video - this happens in nature too, as far as i know!
damn that's cool
why is it called the "circle of death"?
Is it called that because most of the ants within the circle will never find their way back home?
@@villaticlang4844 thats how i remembered the name but i think the official name is: en.wikipedia.org/wiki/Ant_mill and yes, it can sometimes happen until some of them die of exhaustion :(
@@villaticlang4844 Yes, exactly. They will circle around until they die from exhaustion.
in moshpits under the stage :D
My dad was creating a similar simulator once upon a time, and any time he hit a snag he'd explain the problem to me as a way to get a new perspective etc...
one of the problems he'd encountered that sometimes the ants would just start circling around each other in a loop... and he just couldn't figure out how to stop it..
Until I pointed out that they're called "Ant mills" and that it happens in real life too. Some times, it both is and isn't a bug.
That technique is called "Rubber ducking" in software development (as in explain your problem to a rubber duck, because sometimes just going through the problem from the beginning, from a fresh point of view, can help you find a solution). And the ants forming loops is a bug in nature, not your father's simulator XD
So if I got this right, you are telling me that your father didn't code to make it happen but just happened anyway, just like in nature?
I have no experience in coding so I might misunderstood.
Hope to get a response, I'm really curious
@@roba_recondita you got it exactly right.he had no idea ants did that for real and thought it was a bug with his programming.
Whenever I'm showing my code to my Dad and he mentions something thats both a bug and a feature we usually end up saying "is it a bug or a feature? Yes"
something similar that i've had happen to me is that i would ask a teacher/professor for help, and as i described the problem to him i would end up thinking of a solution myself and not needing the help after all.
Me at 4am regreting my life choices watching ants
5:30 here :|
3:39 AM here 😂😂😂
11:37AM
What day is it?
why does this comment not have a heart
same..
Now add, an ants killer, then ants, can craft railguns if they can find the resources and then they can try to defend themselves learning with a genetic algorithm, then add jectpacks, laser and spaceships and then...
they will kill all humans
Sadly, They are not conducting electricity enough to get accellerated in a railgun...
Otherwise they had plenty of ammo that could keep on attacking even after it impacted 🤔
@@elblorenz3278 The fuck are you saying?
@@dima5467 That ant's aren't viable bullets
Just go all out Villager News and build the railgun out of ants 😄
Finally someone used a "bug" in the production, lol !
I love this. One thing I think is missing that would be fun to see is the two different personalities or behaviors of ants that will correct the paths to be more and more direct over time.
You'd need some ants to be really strictly following the paths and then others that are more experimental that wander off the trail even when it's there. I'm not sure exactly how it works, but over time this tends to straighten out the paths.
I made a new version implementing this ruclips.net/video/emRXBr5JvoY/видео.html
@@PezzzasWork wow cool! That's awesome.
awesome work as always
Thank you :D
It's like ASMR but for the eyes
Good video. Nice
Hey man. You've been mentioned in the latest video from Sebastian Lague so expect some more traffic to your channel :)
no way
Fucking youtube humants following the pheromone scent
@@Danila1 Haha yeah, we found DATA PHEROMONES
From who?. Dunno who this Sebastian guys is so prob won't be much more traffic
so THAAATS why the algorithm has been showing me these videos...
Who else got this recommend after watching sebastian lague?
me :)
Me
Here I am
me too
well i searched for this
I keep finding myself coming back and rewatching this ant sim series. It's so interesting to think about, and I always try to see if I can make an ant simulation myself, which, I haven't fully succeeded in yet, but I'm getting there. I love this series!
The fact that u can create such an accurate model of how ants work with 3 rather baisc rules is absolutely fascinating. u can even easily translate this into 3 and even higher dimensions. just incredible
actually, most of so-called complex systems can be modeled/are determined by few simple rules. For example: flocking of schools of fish, John Conway's Game of Life, any cellular automata etc
I think one of my favorite thing about ants is they have a nature best path solution. Since as the ants follow the trail back they slowly cut corners and turns as they can sense a little ahead of themselves. This automatically straightens rounded paths out over time
I love watching your vids before bed I saw one the other week and lost your channel but I found it again! I love how relaxing your videos are they are simple yet amazing
I found one of the most interesting RUclips channels. Thanks for sharing your experiments.
Came here from the accidental bug video. Amazing work!
This is such a brilliant simulation. Will probably implement something similar but more basic for KAE, your algorithm here creates such great patterns and it's fun to watch!
can u please suggest me some videos from where i can learn how to buld up these types of
simulation
@@rxpmbeats7453 I suggest Phaser JS, for something simple. JavaScript, easy to get it working. But depends on your skillset
I think it would be neat if there was a really low percent chance (
POV: it‘s 3am and you have an important exam tomorrow for which you’ve not studied yet
Fascinating. I'm willing to bet that the ant probably treats every path as a different source of food, even though it leads to the same source as the other
If we were to make the ants invisible, it'd look like a magical force is trying to find resources and is taking it back home.
Be prepared for the Sebastian Lague horde.
And this is a BASIC simulator... What am I doing with my life?
Cool work!
4:14 its good that shape didnt have one more arm
The pattern at 4:06 reminds me of a plasma ball. I would love to see one that's a perfect circle of food that is regenerating constantly and see if the ants would move around the same way the plasma in a plasma ball does.
I know you didn't ask, but it's a different case though. in plasma balls there is an ionization path that forms which has less electrical resistance, and so all electrons go through that same path until the path is so long that there is another path of ionization with lesser resistance that forms, while in this scenario that "other path" never forms as long as there are ants going through the old path. The new ionization path forming is visible when the little "sparks" of the plasma ball snap to a new place
@@carlosmspk Yes, but the random component of the movement of each ant (its "freedom" coefficient) should still cause the trails to move and shift spontaneously.
This is incredible!!! Thank you so much for sharing! I'm going to read your code and learn how you did this :) This makes me very happy I get to learn something new!!!
I once made this same simulation in JavaScript. I ended up iterating so many objects (scent trails, ants, and food) that it crawled to a halt in my browser. I keep meaning to make a better version in Unity or something like that.
Very cool to see this version.
Use pixi-js. You can render atelast tens of thousands of sprites at crsip framerate
Very cool simulation, thanks! I'd be interested to see some more complex behaviors come from a similation like this
So there is no path optimization in nature? At 2:19 or 4:18 they could save a lot of energy by a shorter route.
You're totally right, I implemented this in the next version :) ruclips.net/video/emRXBr5JvoY/видео.html
@@PezzzasWork I thought It might be the case, since the 'dead loops' are real in nature (comment below). Thank you for your answer!
Richard Feynmann described this logic in his book "you must be kidding, Mr. Feynmann". He observed, that once ants found some food, they excitedly run back to the nest and bring some fellows checking the path a couple of times. While running they cut corners, therefore every time they reiterate the path to the food it is optimized. After 7 iterations it is usually the shortest path to their home. Also there are two types of ants who follow the path and other are making it. It would be nice addition to this model I suppose.
Hi , i have a bit of a stupid and specific question !
I took a brief look at your repo , was wondering why do you only use header files ? (except for main.cpp)
That not a stupid question at all :) I mainly do this because I like to have everything about a class at the same place. I know it has huge drawbacks (like compilation time, no real forward declarations, complicated statics definitions etc...) but I like to code like this, at least for my personal projects.
@@PezzzasWork Thanks a ton for your answer ! that makes sense :D
I was afraid to ask cause being a Python guy I have very little knowledge of c++ conventions, but thanks for the response, I love your content :)
Gorgeous! I guess that you can create really cool animations with it if you turn color of "randomly wandering ant" to bg color / invisible
I think this can be a good algorithm to make caves in a 3D voxel terrain. I code every day on unity3D and I'd like to do something similar in the near future.
I enjoyed see how the ants works! amazing proyect dude!
Great! Should we expect that, on the long term, the paths become straight lines?
Ok but WHY do you have *only* 995 subs (996 if we include myself now). This is fascinating. Great work.
This is the most beautiful thing I have seen today!
This is amazing. Congrats
Thank you!
This is really good, i'm impressed
Very relaxing, maybe it'll help me fall back asleep..
Ants are helpful in a lot of ways :)
I love the use of markers, clever!
the way they form many "feeler" trails, and the one that reaches the nest first is reinforced, reminds me of lightning
Very nice work, github is very beneficial, thanks for that!
When I made this simulation for myself, my ants with food always seem to get lost on their way home. They end up following the wrong trail of home pheromones while leaving food pheromones, causing other ants without food to follow that path, leaving more home pheromones, and it becomes a bad cycle where the ants get into a loop of nothingness that only break after a random wiggle causes them to veer off the path or until much time has passed. I was wondering how you avoided this issue. In the video, it seems that the ants almost always begin building back toward home after finding food.
Markers closer to objectives are stronger so ants have more chances to pick the trail in the right direction. I had exactly the same problem of "bad circles" to avoid this ants have a limited amount of markers they can drop (which is recharged when they encounter home or food) so wandering ants have no impact on other after a certain time.
@@PezzzasWork is it possible to make some kind of unique markers, so that when returning home ants would pick their own way (markers that they left) and not someone else's?
@@PezzzasWork First of all great work. Second what do you mean with objectives. Food and home?
@@miketechnikg9775 yes however this is based on the underlying mechanism of ants in real life that they have developed instinct to form groups
This actually happens in real life and they eventually die of exhaustion
THIS IS AWESOME.
SHOULD GO VIRAL.... I hope so.
Thank you! 6K views is already well beyond what I expected :D
That was insanely satisfying to watch
That is so kewl. Should be getting millions of views.
Ok so I was doing my coding HW and right after this I started my research about ants because I got my brand new ant farm today. Guess what was in my recommendations?
Great work btw!
Seems like we’re into similar experiments! Keep it up!
You have a very nice channel! just subscribed :)
@@PezzzasWork cheers! what books have you read re. the physics videos you've done? They're awesome. I'm planning to get into that stuff over the next couple of months.
Physics is so fun to play with :D I mostly used what I learned during my education but I ve read some nice articles here gamedevelopment.tutsplus.com/series/how-to-create-a-custom-physics-engine--gamedev-12715 and you can also check the Verlet integration which allows you to quickly have nice things en.wikipedia.org/wiki/Verlet_integration (I am using it everywhere)
your work is wonderful! I really like it
I'm impressed very nice work
How do they know which way to follow the trail? Like, how do they know they're not following the "to home" pheromones _away_ from home?
It was indeed a little problem. The solution I came to is making ants drop smaller and smaller markers (in terme of intensity) so that when an ant finds a trail it is naturally attracted to the older ones leading to the objective. This approach is not perfect but it works quite well :)
@@PezzzasWork wow :)
@@PezzzasWork do you weaken the trail they leave behind? or is it permanent?
@@hampustoft2221 it looks like they weaken as far as I can tell
Good job man! It's beatiful! I try to repeat your program! It's very intresting
I absolutely loved it please and try to do something like this again!
Everybody gangsta until the ants paths look like a Swastika
what app do u use for these simulations
Hey, what libraries did you use for this program? And how did you handle the graphics, did you use some kind of C++ game engine?
elite algorithm for solving puzzles
this is so satisfying
awesome work
This simulation reminds me of how the Physarum Polycephalum fungus spreads to find food, its interesting to see how the paths develope to shorter and shorter connections
I really love projects like these. They are so simple, yet highly interesting. Definitely inspiring me to code more and to try out new projects ;)
Been a while since I've seen a name that breaks RUclips's CSS. Nice.
thats why programming is beautiful
I like how they randomly decided to make a circle on bottom right at 1:44
Like said in comments above, ants do this in real life too its called Ant Mill, you can search on RUclips and see.
Truly beautiful to watch
Very nice! Now I want to do this too! I think I'll try my hand at this.
Now put this algorithm in every game that has ants
This video will get 1.2 million views minimum, great vid.
That is just plain COOL!!!
Hey everyone, don't forget that Will Wright developed "Sim Ant" in 1993 (or thereabouts).
"to food" path has two directions let's say North and South, how can they know which direction is exactly to the food?
Damn that's beautiful!
Nice vids !!!!
Nice work, why the ants spread out suddenly at 3:42 on the left ?
There's a way to promote path shortening here, right?
Imagine the markers are short lines or bars instead of dots, laid perpendicular to the line of travel. On a curving path, these bars would naturally splay on the outside of the curve and close up on the inside. So the inner path would accumulate a higher "scent" density and make it more attractive then the longer outside path, proportional to the degree of curvature. This would go on until the path is almost completely straight.
The same could be accomplished by keeping the dots but applying either a determined or random amount of sideways scatter to their placement.
Oh wait, looks like that's already present to a degree. I guess two or more ants going at opposite directions need to get around each other, creating random scatter on the paths.
The current way to promote path shortening is lifetime of markers. This ensures that paths won't be too long. And currently ants don't avoid each other but they are not exactly following the markers, there is some randomness in their direction that, as you said, help in a certain degree finding new solutions.
Sebastian Lague mentioned this video.
I notice that the paths the ants take back to "home" usually isn't the most optimal (straight line to home). Does the algorithm make the paths optimal over time?
Now imagine this video is "home", us viewers are the "ants", and whichever video we click next in the recommendations is the tastiest "food", and you get a pretty good idea of how the RUclips recommendation agent works.
(There's also an interesting parallel to draw to the way our brain works)
Wow, this is awesome. Congratulations
A fabulous work I really like it, I would love ust to highlight bout the idea of (ant colony optimization method) to choose the hortest path from and to their food source based on their pheromone propagation. But really great job bro
Is it assumed (and implemented) that the chemical "dots" indicating the paths to home and to food slowly evaporate over time? That would seem to be a ncessary component of both the simuation and how it actually works, otherwise, over time there would be utterly confusing dots everywhere with no pathways to follow.
Do these to home and to food markers have a direction, or how do ant know which way to follow when they come across a path?
what would happen if the ants werent given enough time to get back to the base because the food was too far away and the decay of the to base nodes was too fast?
As i know, in reality ants are able to find the straight line from food to home by making a sort of vector sum of the path they travelled. It would be even better if made in this way!
How do other ants know the direction to where they have to walk to find food in the path marked twice with "to home" and "to food" markers if the like ends are indistinguishable for a new unknowing ant?
This man: Ants simulator
Me: std::cout
IDK how I got here but this is so cool!
Does the markers include directions ? Good job though :)
Thanks :) Markers actually do not store any directionnal information, a marker is just a position with a type (to home | to food)
Pezzza's Work how do the ants know which way is home if they come across a line? Is it a random choice between left or right?
Sebastian sent me btw 👍
To guide ants to the markers' objectives I made them drop smaller and smaller markers along their way so that others just have to follow the intensity gradient to find the right direction
@@PezzzasWork That's smart, thanks for the explanation !
@@PezzzasWork but is that necessary? The marks also visibly degrade with time, right? Therefore an ant encountering a path can tell the direction by checking which mark degraded more than the other. You can drop an exactly the same mark everywhere and still be able to tell direction.
Great video, I just wanted to know what engine you used to make the simulation?
Thank you :) I am not using an engine, just the SFML framework to ease rendering www.sfml-dev.org/
The algorithm brought me here via the recommendation page unlike most others who came from some other channel.
Why did you specify C++?
But this is very cool! You found an interesting topic and made a video about it that anyone can watch and understand! Well done!
Thank you! The "C++" label is because I share the code in the descritption :)
Awesome work.
But just as an idea, what if you could make so that the ants take the most efficient path of all, because I see in the video a lot of times in which ants take different paths to get to the same food, so wouldn't it be more logical to make them see what is the most efficient path of all.
Hello, How much time did you spend on this Sir? Btw Great work done, it looks so cool;)
F
It looks very cool, but the fact every individual ant sets « to home » dots must make the software memory intensive
can we get Sebastian lague?
mum: we have Sebastian lague at home.
Sebastian lague at home:
I wonder if you could make them find shorter paths by making the markers successively weaker and weaker the further they have walked, so that markers close to home have a stronger scent, indicating that the path is shorter.
Actually this is exactly what I am doing :) the problem is that there is a balance to find between volatility of the markers and durability to avoid them to disappear too quickly
Didn't look at the code yet,
but going by the video, a quick question -
When an ant (without food) comes across a "to food" path it would change from random wander to going after the to food path?
What if an ant having food in it's mouth coming across another "to food" path? will it be ignored and the ant keep following it's own "to home" path?
How did you record the simulation? Did just record the simulation or did you end up rendering each frame individually?
If recorded: what software? I always end up with trash quality or huge file sizes (~2gb for 15 seconds) when recording SFML stuff..
Who is Sebastian Lague?
If an ant forms a loop while exploring for food, how does it know which path to take when returning home for food? Does it remember a general compass direction to home? Does it always turn left to avoid a loop? Does it remember the areas it has recently travelled and avoid repeating? Thanks
How do ants know when there's no more food?