Тёмный

C++ Ants Simulation 2, Path optimization 

Pezzza's Work
Подписаться 139 тыс.
Просмотров 294 тыс.
50% 1

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...

Наука

Опубликовано:

 

4 апр 2021

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 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: RU-vid 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 года назад
RU-vid 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
@alrineusaldore6764
@alrineusaldore6764 3 года назад
That ending when the ants ate the "thanks for watching" was so satisfying lol
@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
@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
@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
@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
@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
@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.
@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
@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?
@Daxelinho9
@Daxelinho9 3 года назад
It's so satisfying! I could watch this content for hours on end.
@shottysteve
@shottysteve 2 года назад
this makes me wonder how ants actually find their way back to the nest… really cool work, great job!
@snactimusmaximus
@snactimusmaximus 3 года назад
The “Thanks for Watching” is brilliant and a testament to your design of the simulator.
@underslash898
@underslash898 3 года назад
Just started watching you, but this is great content :)
@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
@WatOnsonn
@WatOnsonn 3 года назад
This should have so many more views. Amazing work
@ImminentTempest
@ImminentTempest 2 года назад
The art formed by the paths is just amazing..
@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 2 года назад
@@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
@falacommeufalo2282
@falacommeufalo2282 3 года назад
Man, i love your videos!
3 года назад
This is great work! You have won another subscriber.
@argore9709
@argore9709 3 года назад
This is sick! Would be interesting to see different ant colonies fighting for resources and/or paths to said resources
@_freeze325
@_freeze325 3 года назад
It's like a lightning ! Beautiful
@orangeduritospacesystems8476
@orangeduritospacesystems8476 3 года назад
Amazing work man! This is so inspiring.
@jonathanfitzgerald7882
@jonathanfitzgerald7882 3 года назад
Now where have I seen these patterns before? Awesome work!😎
@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.
@tattwashiwani3158
@tattwashiwani3158 2 года назад
I perceive the ants as humans exploring the conundrums of our universe 😍
@elaabaj6627
@elaabaj6627 3 года назад
Thanks, this is really motivating and cool!
@bananafructa2097
@bananafructa2097 3 года назад
This pretty much sums up the basics of genetic algorithms
@tyler2854
@tyler2854 3 года назад
Wow, that's super cool. I liked the first one, but this is even better!
@punk3900
@punk3900 Месяц назад
amazing how simple rules lead to complex outcomes
@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.
@haaaaf8087
@haaaaf8087 2 года назад
The concept is so simple, yet no one has thought about it
@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?
@amateurishauthor2202
@amateurishauthor2202 2 года назад
Watching the paths work themselves out when you remove parts of obstacles was a spectacle
@richardcoppin5332
@richardcoppin5332 2 года назад
Absolutely stunning.
@nou4898
@nou4898 3 года назад
i like how the paths optimize into kinda streight lines
@Ray-jg5dj
@Ray-jg5dj 3 года назад
This is absolutely fascinating
@mr.classyyt896
@mr.classyyt896 3 года назад
This is just... Amazing!
@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 ^^
@merion297
@merion297 2 года назад
Incredible. You modelled how our brain works.
@ThylineTheGay
@ThylineTheGay 3 года назад
This makes me really want a factorio like game but with ants
@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.
@RobboMcjobbo
@RobboMcjobbo Год назад
This really show how ants are extremely intelligent as a collective. They are the definition of "2 heads is better than 1".
@Sleepy_Cattt
@Sleepy_Cattt 3 года назад
4:25 it's like one of those lightning ball things!
@kritiker2797
@kritiker2797 3 года назад
love this
@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!
@mateuszkolpa
@mateuszkolpa 3 года назад
Awesome work! :))
@leoponce82ponce
@leoponce82ponce 3 года назад
holy shit man.. this is one of the coolest things i've seen.
@tenbeat
@tenbeat 3 года назад
Digger ants would be an interesting mechanic.
@CThaunts
@CThaunts Год назад
This teaches us the ways of leadership too because this wouldn’t happen if one didn’t go to the food and bring it home
@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.
@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
@chris43123
@chris43123 3 года назад
I would love to see this a wallpaper engine background
@TehPwnerer
@TehPwnerer 2 года назад
I have spent at least two or 300 hours just watching ants and how they behave and react to food sources and maybe it's the simplicity of your models that don't take into account any sort of real world geometry but they behave much differently at least the ones I've been observing
@andrewadkins8440
@andrewadkins8440 2 года назад
World be interested in hearing the differences or seeing a resource that encapsulates them in a digestible but specific package. I'm sure nature gave them every optimization they could.
@krccmsitp2884
@krccmsitp2884 Год назад
I'm curious, what are the differences, how do they behave differently in nature?
@yannpejon3063
@yannpejon3063 3 года назад
So cool, great job !
@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!
@Dillbeet
@Dillbeet 3 года назад
This science is so rad
@jatinsaini7790
@jatinsaini7790 3 года назад
Ants got smarter! Great and cool stuff.
@jingyang4949
@jingyang4949 8 месяцев назад
this looks awesome
@EmmaElite
@EmmaElite 3 года назад
From a distance and sped up this reminds me of how electricity flows path of least resistance
@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...
@sipnayan451
@sipnayan451 3 года назад
love 'em or hate 'em, the fact that ants have been doing this type of strategy for centuries makes me amazed... and scared lel, imagine in the past where ants are as big as an average cellphone
@claridadespontanea1195
@claridadespontanea1195 3 года назад
Pretty cool, thanks for this
@augusto256
@augusto256 3 года назад
This could be very useful for some applications.
@AnriGochevich
@AnriGochevich 3 года назад
Looks like a great attractor
@Cam-ej1cu
@Cam-ej1cu 3 года назад
This was really cool
@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?
@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?
@baonguyenanh5077
@baonguyenanh5077 3 года назад
Thiss iss just cool, yess i know you will make a better video than the first one
@HBCrigs
@HBCrigs Год назад
Woahhhh it feels like a river simulation
@ants7219
@ants7219 3 года назад
I really hope you've seen sebastian lague's most recent video
@claridadespontanea1195
@claridadespontanea1195 3 года назад
Cool stuff I want to see / I might code later: - Fatigue / nutrition - Reproduction when surplus of food in nest
@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!
@marc_frank
@marc_frank 3 года назад
a general "i've been walking here" trail might be interesting
@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.
@gal749
@gal749 3 года назад
I just wwtched downloaded the 1st one two days ago. It's my lucky day :-)
@Psychx_
@Psychx_ 3 года назад
Should I ever be asked to come up with an algorithm that brute forces the shortest distance between two obstructed points I'll refer them to this video. Seeing them ants working and slowly optimizing their path is beautiful.
@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.
@pepper182
@pepper182 3 года назад
i love that min 5:32. good content and awesome work
@kiarashsabahi2959
@kiarashsabahi2959 2 года назад
Cool man, nice job. :)
@MonoRender
@MonoRender 3 года назад
Beautiful!
@Leo-ii4hy
@Leo-ii4hy 3 года назад
Looks organic 👍👍👍
@simonpeggboard4004
@simonpeggboard4004 2 года назад
optimal paths end up following nature like paths i.e. Leaf vein patterns, retinal images etc.
@FrostCraftedMC
@FrostCraftedMC 2 года назад
the way they form neural looking shapes makes me wonder if a similar method could be used for neural nets.
@JSLing-vv5go
@JSLing-vv5go 3 года назад
Really curious what might happen with two or more large food sources.
@indy69420
@indy69420 3 года назад
I felt like Paul Rudd with the avengers music playing.
@FromaGaluppo
@FromaGaluppo 3 года назад
Great video!
Далее
C++ Ants Simulation 3, Maze
5:09
Просмотров 558 тыс.
C++ Ants Simulation 1, First approach
4:37
Просмотров 614 тыс.
When you know she has a wig 💇🏻‍♀️ #shorts
00:19
Simulating Predation, Stealth, and Perception
8:04
Просмотров 49 тыс.
Turning bugs into Art
7:43
Просмотров 193 тыс.
Nice bug
3:07
Просмотров 989 тыс.
Slime Mold Simulation. Experiments.
12:32
Просмотров 12 тыс.
Coding Adventure: Ray Marching
5:06
Просмотров 1 млн
C++ Ants Simulation 5, Ants Fight
9:24
Просмотров 1 млн
Inspiration of Ant Colony Optimization
19:39
Просмотров 46 тыс.
Coding Adventure: Hydraulic Erosion
5:19
Просмотров 881 тыс.
What’s your charging level??
0:14
Просмотров 7 млн