C++ Ants Simulation 2, Path optimization

  Рет қаралды 294,048

Pezzza's Work

Pezzza's Work

3 жыл бұрын

New version with better marker algorithm allowing path optimization
New data model (x3 perf)
Old video • C++ Ants Simulation 1,...
Github github.com/johnBuffer/AntSimu...
Music freepd.com/music/The%20Lagoon...

Пікірлер: 484
@PezzzasWork
@PezzzasWork 3 жыл бұрын
Windows release, instructions in the ReadMe file github.com/johnBuffer/AntSimulator/releases/download/v2.1/AntsSimulator.zip
@xere1917
@xere1917 3 жыл бұрын
is it possible to add two types of ants with different behavior and start positions for a simulation like this?
@qu765
@qu765 3 жыл бұрын
very cool, i probably spent 2-3 hours just playing with this
@rxkshan
@rxkshan 3 жыл бұрын
Okay
@tsm688
@tsm688 3 жыл бұрын
is it possible to make a version of this which isn't purely fullscreen?
@rxkshan
@rxkshan 3 жыл бұрын
@@tsm688 possible
@THExRISER
@THExRISER 3 жыл бұрын
It's amazing how cool complex behavior can emerge out of very simple rules.
@betterfly7398
@betterfly7398 3 жыл бұрын
@MorTobXD Is the course on chaos theory?
@THExRISER
@THExRISER 3 жыл бұрын
@MorTobXD Well that's a shame, it sounded inteesting.
@nameismetatoo4591
@nameismetatoo4591 3 жыл бұрын
Not just behavior, but also life itself also emerges from simple rules: 1) Eat 2) Don't get eaten 3) Reproduce. If you want to get really philosophical, you could argue that what ultimately drives this emergence of complexity is a simple energy gradient; hot sun + cold space = a flow of energy that can be exploited to rearrange molecules, i.e. life.
@gileee
@gileee 3 жыл бұрын
Just what I was thinking. Rule: Sebastian Lague puts out a video Result: KZbin gets flooded with copies jk jk
@foxolotl4389
@foxolotl4389 3 жыл бұрын
And its very interesting to see that they keep their rules in mind.
@Rickilicious
@Rickilicious 3 жыл бұрын
this is pretty dope. a lot of others have taken inspiration from your work, but the pathing on the ants here is top tier. The ants slowly optimizing the lines seems very organic and authentic too. Please keep extending this silly little project. Add a queen and larvae or opposing ant colonies or something. you slowly perfecting their behavior is very entertaining for me as a viewer.
@fakedoorsfordinner1677
@fakedoorsfordinner1677 3 жыл бұрын
Agree
@terrasolaris5104
@terrasolaris5104 3 жыл бұрын
KZbin needs more commentors like you. Agreed 👽
@antoninperbosc1532
@antoninperbosc1532 3 жыл бұрын
Whend looking at this video of this beautifull ants simulation this remember me dendrits in bio neural networks, fungus filament or blob system ...
@THEcrosby
@THEcrosby 3 жыл бұрын
Yeah what he said
@Jaun_
@Jaun_ 3 жыл бұрын
This could work for multiple spawn points too I’d imagine - would be interesting to see it the ants choose the more optimal spawn point
@littensy
@littensy 3 жыл бұрын
Where we dropping arthropods
@bigsmoke6414
@bigsmoke6414 3 жыл бұрын
Or the Option to RAID/eat rival Spawn points
@CMDRunematti
@CMDRunematti 2 жыл бұрын
couple billion spawns and you have a human brain made of ants (cant be looking like neurons only to me)
@zarro110
@zarro110 3 жыл бұрын
I liked how at 1:30 the whole path swings back and forwards like a tentacle sucking up food
@zarro110
@zarro110 3 жыл бұрын
btw: can you do a maze (with multiple valid paths) and see if they optimize that? You would probably have to set the variable to stray from the path pretty high to make that work but it would be a fun experiment to see.
@Grgrqr
@Grgrqr 3 жыл бұрын
Or brain cells
@betterfly7398
@betterfly7398 3 жыл бұрын
@@zarro110 I don't know if you know but, there is literally an algorithm called ant colony optimization.
@EnergiaRocket
@EnergiaRocket 3 жыл бұрын
I saw "Thanks for watching" and was sad that my daily dose of beautiful patterns was over. Then I saw that the "Thanks for watching" was food too, and was happy again :D
@miner4236
@miner4236 3 жыл бұрын
Absolutely genius ending lol. Homemade video editing :D
@123TeeMee
@123TeeMee 3 жыл бұрын
I like that theres all sorts of ways this stuff can be extended. Maybe evolve colonies whose coefficients and stuff are defined by genes
@alrineusaldore6764
@alrineusaldore6764 3 жыл бұрын
That ending when the ants ate the "thanks for watching" was so satisfying lol
@oakleaves3605
@oakleaves3605 3 жыл бұрын
We need this as a wallpaper, would love to have it on my wallpaper engine library
@du42bz
@du42bz 3 жыл бұрын
This is awesome Now imagine this but a 1 hour long version
@mr.norris3840
@mr.norris3840 3 жыл бұрын
Background music be like: *Yeah, this is an Avengers level threat*
@hatinc.5624
@hatinc.5624 3 жыл бұрын
No, these are the antvengers!
@rxkshan
@rxkshan 3 жыл бұрын
No
@mr.norris3840
@mr.norris3840 3 жыл бұрын
@@rxkshan Yes
@rxkshan
@rxkshan 3 жыл бұрын
@@mr.norris3840 no
@mr.norris3840
@mr.norris3840 3 жыл бұрын
@@rxkshan Yes
@shadrsabirov6412
@shadrsabirov6412 3 жыл бұрын
-How do you spend your free time? -I watch ants walk
@ITR
@ITR 3 жыл бұрын
It would be cool to see simulations of two separate colonies with separate markers, having them use their own colony's markers and move a way from the foreign ones.
@UmzGames
@UmzGames 3 жыл бұрын
There is nothing so satisfying like watching ants, or anything that simulates ants..
@unknown-re9vv
@unknown-re9vv 3 жыл бұрын
Great content man, I got the first ants video recommended to me and I must say I was very impressed by your work. Keep learning, keep growing. You have a lot of potential.
@laurino.
@laurino. 3 жыл бұрын
I would like to see that the ants return even if they didn't get food, to follow others or just because they are too far from home and find nothing
@nibbletrinnal2289
@nibbletrinnal2289 3 жыл бұрын
This makes quite a bit of sense, actually. No use wandering forever in the opposite direction of the food so you may as well go back home and see if there're any existing paths to food
@marianaurel
@marianaurel 3 жыл бұрын
This is absolutely amazing. The way coding and visual animations were implemented are very impressing!! It's emotional to see other people achieving this kind of skills.
@skipfred
@skipfred 3 жыл бұрын
Wow, I've seen a lot of ant simulators but what you've done here is probably the most organic and natural system I've seen. Great works really interesting and beautiful patterns
@anywallsocket
@anywallsocket 3 жыл бұрын
I was literally going to ask about path optimization after watching your last video, and here you've gone and done it! Cheers mate, very impressive work.
@falacommeufalo2282
@falacommeufalo2282 3 жыл бұрын
Man, i love your videos!
@Daxelinho9
@Daxelinho9 3 жыл бұрын
It's so satisfying! I could watch this content for hours on end.
@underslash898
@underslash898 3 жыл бұрын
Just started watching you, but this is great content :)
@nolanbie3664
@nolanbie3664 2 жыл бұрын
It’s so interesting to see how Nature imitates nature even in a simulation. That test near the end was honestly looking like a plasma ball. It’s so interesting because it’s still based on the idea of take the easiest path with the least resistance which almost everything in existence follows.
@nolanbie3664
@nolanbie3664 2 жыл бұрын
I’m way to high for this
@xcreeperbombx61
@xcreeperbombx61 3 жыл бұрын
Suggestion: Enemy colonies/species Description: You have the option to look at the perpective of a ant colony. This will visually make the dots of the other colonies blue. Ants without food may follow the blue trails, while ants with food will avoid it. Two ants of different colonies when close to each other will "fight", which simply chooses a random ant to get removed. If the removed ant had food, there will be a food piece where it died. Added stuff: Dots have colony marker, different ant types, ant home marker, ants will "fight" with random winner ------------------------------------- Suggestion: Regrowth Description: Empty space near food will have a chance of becoming food. There is also a super smaller chance that the empty space will do it without being near food Added stuff: Empty space will become food with a chance of N+(0.125-N/8)*F (N being a small number, F being food nearby, and the chance being in decimal form) ------------------------------------ Suggestion: Reproduction Description: An amount of food at a colony nest will create an ant of that colony. Should work best with the Enemy colonies/species suggestion. Added stuff: The stuff is litterally said in one sentence for this suggestion, why do you need this section?
@WatOnsonn
@WatOnsonn 3 жыл бұрын
This should have so many more views. Amazing work
3 жыл бұрын
This is great work! You have won another subscriber.
@_freeze325
@_freeze325 3 жыл бұрын
It's like a lightning ! Beautiful
@richardcoppin5332
@richardcoppin5332 2 жыл бұрын
Absolutely stunning.
@shottysteve
@shottysteve 2 жыл бұрын
this makes me wonder how ants actually find their way back to the nest… really cool work, great job!
@orangeduritospacesystems8476
@orangeduritospacesystems8476 3 жыл бұрын
Amazing work man! This is so inspiring.
@elaabaj6627
@elaabaj6627 3 жыл бұрын
Thanks, this is really motivating and cool!
@ImminentTempest
@ImminentTempest 2 жыл бұрын
The art formed by the paths is just amazing..
@Ray-jg5dj
@Ray-jg5dj 3 жыл бұрын
This is absolutely fascinating
@mr.classyyt896
@mr.classyyt896 3 жыл бұрын
This is just... Amazing!
@snactimusmaximus
@snactimusmaximus 3 жыл бұрын
The “Thanks for Watching” is brilliant and a testament to your design of the simulator.
@markusbuchholz3518
@markusbuchholz3518 3 жыл бұрын
From my humble point of view, you Jean is an SW artists who matches beauty of C++, state-of-the-art concept and music. Awesome effort and outstanding results. Remarkable YT channel and community. Thanks and have a nice day!
@ekremdincel1505
@ekremdincel1505 3 жыл бұрын
Beauty of C++? I think you meant the beauty of the buffer overflows lol.
@collin2097
@collin2097 3 жыл бұрын
i think you should add a "infinite food" thing, which doesn't deplete, so that some wont have to constantly place more food whenever it depletes
@tabularasa0606
@tabularasa0606 3 жыл бұрын
Random food spawns! And random obstructions falling into place.
@HyperMAX9001
@HyperMAX9001 Жыл бұрын
@@tabularasa0606 And hunger for the small creatures. If it goes full, they die.
@stoobidthing
@stoobidthing Жыл бұрын
@@HyperMAX9001 >"And hunger for the small creatures. If it goes full, they die." He implemented this in the newer versions but a little differently, If an ant goes too far from either its colony or food for too long it dies
@jonathanfitzgerald7882
@jonathanfitzgerald7882 3 жыл бұрын
Now where have I seen these patterns before? Awesome work!😎
@argore9709
@argore9709 3 жыл бұрын
This is sick! Would be interesting to see different ant colonies fighting for resources and/or paths to said resources
@antoniohenrique6749
@antoniohenrique6749 3 жыл бұрын
Your C++ code is so good that i am still seeing ants on my screen even 10 minutes after watching the video
@mateuszkolpa
@mateuszkolpa 3 жыл бұрын
Awesome work! :))
@tyler2854
@tyler2854 3 жыл бұрын
Wow, that's super cool. I liked the first one, but this is even better!
@willjohnson4579
@willjohnson4579 3 жыл бұрын
seeing you make a part 2 to this almost a year later makes me wanna pick up some old projects! I wonder, did you think your old code was bad?
@dan_obie
@dan_obie 3 жыл бұрын
I love this so much. I'd love to see a simulation on bacterial "random walk motility" toward a chemical signal.
@HPetch
@HPetch 3 жыл бұрын
Very cool! One thing that does kind of bug (heh) me is that the ants themselves aren't particularly realistic - most notably, they have infinite stamina - but trying to model that in a way that both performs reasonably well and actually generates interesting results is probably more trouble than it's worth.
@ShunanoriNisinomiya
@ShunanoriNisinomiya Жыл бұрын
I love insects and when I was a kid I used to watch ants all the time. Thanks for the great video.
@kritiker2797
@kritiker2797 3 жыл бұрын
love this
@bananafructa2097
@bananafructa2097 3 жыл бұрын
This pretty much sums up the basics of genetic algorithms
@koloooko
@koloooko 3 жыл бұрын
Simple and pretty animations! A question came to mi mind: how many ants do you need in order to get best results using this algorithm? Would it work with a half or a quarter of ants you used in your video? Thanks!
@tattwashiwani3158
@tattwashiwani3158 2 жыл бұрын
I perceive the ants as humans exploring the conundrums of our universe 😍
@nou4898
@nou4898 3 жыл бұрын
i like how the paths optimize into kinda streight lines
@leoponce82ponce
@leoponce82ponce 3 жыл бұрын
holy shit man.. this is one of the coolest things i've seen.
@punk3900
@punk3900 Ай бұрын
amazing how simple rules lead to complex outcomes
@DeepRafterGaming
@DeepRafterGaming 3 жыл бұрын
Nice... I think i could be optimized somewhat by adding a third marker type of "No more food to be found here", to get rid of the slow decaying food marker. I believe that's how real ants handle it as well. Really nice work ^^
@yannpejon3063
@yannpejon3063 3 жыл бұрын
So cool, great job !
@merion297
@merion297 2 жыл бұрын
Incredible. You modelled how our brain works.
@alik250
@alik250 3 жыл бұрын
It's the opposite of chaos! Any input results in an expected path! Good stuff
@thezen9
@thezen9 3 жыл бұрын
Order emerging from chaos.
@Dillbeet
@Dillbeet 3 жыл бұрын
This science is so rad
@jingyang4949
@jingyang4949 7 ай бұрын
this looks awesome
@ThylineTheGay
@ThylineTheGay 3 жыл бұрын
This makes me really want a factorio like game but with ants
@claridadespontanea1195
@claridadespontanea1195 3 жыл бұрын
Pretty cool, thanks for this
@amateurishauthor2202
@amateurishauthor2202 2 жыл бұрын
Watching the paths work themselves out when you remove parts of obstacles was a spectacle
@Cam-ej1cu
@Cam-ej1cu 3 жыл бұрын
This was really cool
@haaaaf8087
@haaaaf8087 2 жыл бұрын
The concept is so simple, yet no one has thought about it
@KaletheQuick
@KaletheQuick 3 жыл бұрын
This is super cool! Has anyone tried adding more pharamones? Tasks? or perhaps an enemy colony? Perhaps a 'death' pharamone that invites others to investigate, and a fighting pharamone. I love ants and my mind is racing! I'll check out the github :D
@kiarashsabahi2959
@kiarashsabahi2959 2 жыл бұрын
Cool man, nice job. :)
@nazariimoroz6216
@nazariimoroz6216 3 жыл бұрын
Man, great work! Also, it's great that you posted the program but I'm begging you, please please please make a video tutorial of how you coded the simulator...
@blurblur3642
@blurblur3642 Жыл бұрын
This is a amazing and beautiful simulation! And inspred by you, I make a simillar Ant Simulation in Unity but I am stucking in some troubles. My ants now can seach for food and build paths between home and foods. But they were not able to optimize the path. Because I am not sure how to "determine the ant's tendency to get out of the way", and I just set a random bool to determine weather should the ant follow the Pheromones or just wander each frame. Predictably it didn't work. May I know how you handle this? And thanks for your time to read this message!
@AnriGochevich
@AnriGochevich 3 жыл бұрын
Looks like a great attractor
@retard1582
@retard1582 3 жыл бұрын
So one thing i noticed that real ants do that your simulation is not doing is surrounding the food source. I hypothesise that they do this to avoid the behaviour that your simulated ants perform when the food source dries up. by surrounding the food source, they can guage how much food is left. if 30 ants can touch the food at once, there is more of it than if only 10 can. This also allows for the ants to take more of the food faster, as more workers can be feeding at a given moment in time. However, I believe the main difference lies with the fact that as the food depletes, less and less workers should be going to the food source. In nature, there are never large piles of ants that burst away from where a source of food source once was, and wander aimlessly around. Great work. I just looked at some other videos showing 2D ant feeding simulations, and so far I believe yours is the most natural. Fixing the surrounding behaviour would definately improve it though.
@jatinsaini7790
@jatinsaini7790 3 жыл бұрын
Ants got smarter! Great and cool stuff.
@MonoRender
@MonoRender 3 жыл бұрын
Beautiful!
@Leo-ii4hy
@Leo-ii4hy 3 жыл бұрын
Looks organic 👍👍👍
@chris43123
@chris43123 3 жыл бұрын
I would love to see this a wallpaper engine background
@Krarilotus
@Krarilotus 3 жыл бұрын
can you make a simulation video with like 'difficult terrain' and such and maybe multiple food sources, which also are ranked differently according to their size/benefit as food for the ants?
@jackmann8828
@jackmann8828 3 жыл бұрын
This is awesome
@FromaGaluppo
@FromaGaluppo 3 жыл бұрын
Great video!
@augusto256
@augusto256 3 жыл бұрын
This could be very useful for some applications.
@idiottest5
@idiottest5 3 жыл бұрын
Could you make it so that if they often move past some wall they have a chance of removing (eating) the wall block, so over time they can burrow through walls?
@pinaz993
@pinaz993 3 жыл бұрын
This makes me wonder if you could use a similar technique to implement pathfinding in a 3d environment, though it would only be good for a system that would have the opportunity to use the path over and over again.
@yashwanth8269
@yashwanth8269 2 жыл бұрын
Beautiful
@thepaleone2369
@thepaleone2369 3 жыл бұрын
i think it would be really cool to make them go through a maze and see how they optimise a really complex path like that, you could even have the maze change half way through and see what happens!
@JSiuDev
@JSiuDev 3 жыл бұрын
Beautiful!!!!
@pepper182
@pepper182 3 жыл бұрын
i love that min 5:32. good content and awesome work
@Sleepy_Cattt
@Sleepy_Cattt 3 жыл бұрын
4:25 it's like one of those lightning ball things!
@kyugokato2262
@kyugokato2262 2 жыл бұрын
This is legit cool
@mn4840
@mn4840 3 жыл бұрын
Офигенно! )
@gal749
@gal749 3 жыл бұрын
I just wwtched downloaded the 1st one two days ago. It's my lucky day :-)
@shubhsharma150
@shubhsharma150 3 жыл бұрын
beautiful
@baonguyenanh5077
@baonguyenanh5077 3 жыл бұрын
Thiss iss just cool, yess i know you will make a better video than the first one
@tenbeat
@tenbeat 3 жыл бұрын
Digger ants would be an interesting mechanic.
@HBCrigs
@HBCrigs Жыл бұрын
Woahhhh it feels like a river simulation
@easternestal4181
@easternestal4181 3 жыл бұрын
Thank you recommended
@franciscojaviermartindelca7333
@franciscojaviermartindelca7333 3 жыл бұрын
Love this
@SaLaGaDH
@SaLaGaDH 3 жыл бұрын
Thank you!
@TylerGeho
@TylerGeho Жыл бұрын
This would be a good program to find the optimal route around a racetrack using the obstacles as grass. Would be cool to see the similarities between this program and F1 drivers around the same track.
@RoboticusMusic
@RoboticusMusic 3 жыл бұрын
What does it mean for something to be food most fundamentally?
@claridadespontanea1195
@claridadespontanea1195 3 жыл бұрын
Cool stuff I want to see / I might code later: - Fatigue / nutrition - Reproduction when surplus of food in nest
@ewaldlatreider5127
@ewaldlatreider5127 2 жыл бұрын
Good job mr rooster
@EmmaElite
@EmmaElite 3 жыл бұрын
From a distance and sped up this reminds me of how electricity flows path of least resistance
C++ Ants Simulation 3, Maze
5:09
Pezzza's Work
Рет қаралды 557 М.
Real time Fire Simulation
7:23
Pezzza's Work
Рет қаралды 153 М.
where is the ball to play this?😳⚽
00:13
LOL
Рет қаралды 14 МЛН
ПЕЙ МОЛОКО КАК ФОКУСНИК
00:37
Masomka
Рет қаралды 9 МЛН
ХОТЯ БЫ КИНОДА 2 - официальный фильм
1:35:34
ХОТЯ БЫ В КИНО
Рет қаралды 1,2 МЛН
Зомби Апокалипсис  часть 1 🤯#shorts
00:29
INNA SERG
Рет қаралды 7 МЛН
Swarm intelligence simulation.  Project "Screaming Insects"
13:43
Simulife Hub
Рет қаралды 110 М.
C++ Ants Simulation 1, First approach
4:37
Pezzza's Work
Рет қаралды 613 М.
Training a Neural Network to operate drones using Genetic Algorithm
8:54
C++ Ants Simulation 5, Ants Fight
9:24
Pezzza's Work
Рет қаралды 1 МЛН
Turning bugs into Art
7:43
Pezzza's Work
Рет қаралды 193 М.
C++ Ants Simulation 4, Colony
5:48
Pezzza's Work
Рет қаралды 286 М.
Simulating Predation, Stealth, and Perception
8:04
EightLittleBears
Рет қаралды 49 М.
Creating a Space Invaders clone using my C++ engine and SFML
11:58
Pezzza's Work
Рет қаралды 36 М.
Apple. 10 Интересных Фактов
24:26
Dameoz
Рет қаралды 109 М.
Introducing the all-new iPad Pro | Apple
1:29
Apple
Рет қаралды 37 МЛН
Распаковка айфона в воде😱 #shorts
0:25
Mevaza
Рет қаралды 1,6 МЛН
СЛОМАЛСЯ ПК ЗА 2000$🤬
0:59
Корнеич
Рет қаралды 2,5 МЛН
How Neuralink Works 🧠
0:28
Zack D. Films
Рет қаралды 30 МЛН
Пленка или защитное стекло: что лучше?
0:52
Слава 100пудово!
Рет қаралды 2 МЛН