C++ Ants Simulation - Walls

  Рет қаралды 87,557

Pezzza's Work

Pezzza's Work

3 жыл бұрын

Added walls to see how ants would react.
Previous video: • C++ Ants Simulation 1,...
Music freepd.com/music/Favorite.mp3

Пікірлер: 66
@ITomocska
@ITomocska 3 жыл бұрын
Absolutely beautiful, could watch it for hours
@PezzzasWork
@PezzzasWork 3 жыл бұрын
Thank you!
@aaaa1339
@aaaa1339 3 жыл бұрын
@@PezzzasWork 10 hour version :D
@forabbycookie699
@forabbycookie699 3 жыл бұрын
It's a pretty interesting simulation to look at, and i think it could be interesting to add a simulation like that in some sort of games to make mobs act more natutal
@IronDizaster
@IronDizaster 3 жыл бұрын
Probably not the best idea, for a small detail most people would not notice it would most likely be pretty performance heavy
@forabbycookie699
@forabbycookie699 3 жыл бұрын
@@IronDizaster i am talking about a game based on that mechanic like some sort of colony management
@alfredfeldt5694
@alfredfeldt5694 3 жыл бұрын
would there be a way for the ants to gradually improve the path, it feels like they find one way and then they keep going that way even if it's the wankiest and least efficient way possible
@MrPointness
@MrPointness 3 жыл бұрын
maybe if they had some secondary set of sensors that they could use it to sense the pheromone a lot further ahead than normal, they could cut corners and slowly turn it into a straighter line
@leolen8029
@leolen8029 2 жыл бұрын
Just add a bit of random turning and its should improve bit by bit
@florencemukagoga8513
@florencemukagoga8513 Жыл бұрын
@@leolen8029 eeeeeeeeeeeee
@ipotrick6686
@ipotrick6686 3 жыл бұрын
love this. I just made my own version of this using a grid representing the pheromone instead of discrete points, was lots of fun!
@PezzzasWork
@PezzzasWork 3 жыл бұрын
Nice! I am working on a grid version as well in order to ease integration with OpenCL.
@EzraBradford
@EzraBradford 3 жыл бұрын
Huh, I'm suddenly curious how ants do in the presence of a wind or other force moving their trails in particular directions.
@jameschin9428
@jameschin9428 3 жыл бұрын
Those ants count their steps
@dmitrym3757
@dmitrym3757 3 жыл бұрын
Nice! I remember solving travelling salesman problem with ACO algorithm not so while ago, and I was completely excited about it. But my implementation was really poor regarding visual representation.
@PezzzasWork
@PezzzasWork 3 жыл бұрын
This kind of algorithm is very interesting. I love the fact that you code something and then you watch it find complex solutions by itself, like genetic algorithms.
@dogedoger2606
@dogedoger2606 3 жыл бұрын
I'm here because of Sebastian Lague, amazing! Je suis ici grâce à Sebastian Lague, magnifique !
@PezzzasWork
@PezzzasWork 3 жыл бұрын
Merci !
@lennartgimm
@lennartgimm 3 жыл бұрын
This looks awesome! One question regarding the pheromone trails: The blue "this way to home" trails are strongest near the homes. I thought one would implement these by each ant leavin the trail while wandering around and the trail gets weaker over time (so the trail is strongest right where the ant is and the longer the trail has been there the weaker it gets). This looks more like the ants have a set amount of pheromone the get from their home and once that's used up, they leave virtually no trail. Same goes for their green "food" trails. Couldn't this create problems for ants who find food let's say triple the distance from what your simulation had? There's a lot of space they'd have to traverse without any guiding trails being so far from home and the food source. Love these walls btw, great addition to the usual simulation :)
@ZeroPlayerGame
@ZeroPlayerGame 3 жыл бұрын
I think it's just a lot of ants stinking up the same place and then diverging, thus lowering the spatial density of the pheromone.
@gta5onlineshorts
@gta5onlineshorts 3 жыл бұрын
so beautiful 🐜🐜🐜 simulation
@squirrel1620
@squirrel1620 3 жыл бұрын
These paths remind me of lightning. Is it possible to simulate longer paths or a medium with varying viscosity?
@calebcarpenter421
@calebcarpenter421 3 жыл бұрын
This reminds me a lot of the way a bolt of lightning forms.
@muffels6410
@muffels6410 3 жыл бұрын
You could use The walls as landmasses The food as ports and the ants as boats
@gabrielnoronha2759
@gabrielnoronha2759 3 жыл бұрын
I wonder how would it behave with multiple colonies and multiple food sources
@ThatBastardOverThere
@ThatBastardOverThere 3 жыл бұрын
Really nice! It might be interesting to add 'deadly' areas, which kill any ants that touch them, and leave behind a 'death' pheromone, which ants attempt to avoid? If you made the deadly areas move or change (perhaps to indicate the environment changing through the seasons, or predators roaming around), it'd be interesting to see the paths adapt. Obviously, you'd probably need to make the central nest keep spawning ants when old ones die. The other idea that might be cool is the equivalent of 'rivers' which are deadly, but also when an ant dies on the river, its corpse can be walked on safely by other ants, to make it so that the ants could accidentally make bridges to get to otherwise inaccessible food.
@DogeisCut
@DogeisCut 3 жыл бұрын
Ants are the bogo sort of pathfinding.
@eplexo
@eplexo Жыл бұрын
All these simulations seem to give a feeling of De ja vu from nature. Those ants sure do look like blood vessels.
@SMVK
@SMVK 3 жыл бұрын
Visual shape looks like at neuron :’3
@tumble8323
@tumble8323 3 жыл бұрын
for a second I thought this was the powder toy lol
@orderofchaos8680
@orderofchaos8680 3 жыл бұрын
very cool simulation. could you make a tutorial video ?
@dmitrym3757
@dmitrym3757 3 жыл бұрын
What framework do you use for visualization? Or is it "bare" OpenGL?
@PezzzasWork
@PezzzasWork 3 жыл бұрын
I am using SFML (www.sfml-dev.org/) which is very nice lib wrapping OpenGL.
@WillplaysFort
@WillplaysFort 3 жыл бұрын
try some thing where they dig to get to the food and also add storage for the dirt they will dig and also make them die overtime and also add a queen and also make different types of food these are all ideas you could put in
@dadutchboy2
@dadutchboy2 3 жыл бұрын
you sound like someone who just joined a roblox group
@hammielover225
@hammielover225 3 жыл бұрын
... what makes you think that is all so easy to integrate? Because two things, one: it adds complexity (a lot of it. dirt and digging adds a third dimension, idk why you want a queen because of *two* and different types of food means different types of markers mean they have to tune in the ants behavior more), and two: performance is a thing and data overflow is another. the thing they have is just: Home, food, ants, home markers, and food markers. And the actions can easily be explained with 5 while loops, one of them being true. Now imagine how much code you will add just with the multiple food. Imagine how large and laggy the computer will be with the ants dying and increasing. Please try to think of how hard it might be to do something rather than the award *All I will ever ask for is some interaction between two nests*
@pomponi0
@pomponi0 3 жыл бұрын
I don't wish to discourage you but coding isn't as simple as saying "let's add this and that". First you have to wonder, "what benefit would the program get from implementing this?" Then "is it feasible to program it?", "How much would it impact the render time?". Like, I've done animations where I had to sleep the program for miliseconds because otherwise I wouldn't even see what happened, then I made some Phososhop-like filters (sobel operator, desaturate, posterize) where I could tell it took a big fraction of a second to process a regular sized image. Now, between .01 miliseconds and 100 miliseconds you'll hardly feel a difference even if the latter is 10,000 times slower, but if you start with a render time of 1 minute and multiply it by the same amount it'll end up taking a whole week
@hammielover225
@hammielover225 3 жыл бұрын
@@pomponi0 agreed
@furankusama
@furankusama 3 жыл бұрын
Is this the new sorting algorithm trend?
@onebacon_
@onebacon_ 3 жыл бұрын
Amazing stuff. The roads they take are random, is there any way you could promote a shorter path?
@PezzzasWork
@PezzzasWork 3 жыл бұрын
Thank you! I think that making the markers dissipate faster should help.
@onebacon_
@onebacon_ 3 жыл бұрын
@@PezzzasWork i thought about it too, but I think when a road has enough ant on it the disapation speed shouldn't matter because the following ants renew the scent. Maybe the scent could be analog with a "time since seen food" value, longer walking times means a bigger value. If ant follows a trail and sees two markers in front it should be more likely it would choose the smaller value.
@jackeown
@jackeown 3 жыл бұрын
What did you use for rendering the animation?
@luckyizzac
@luckyizzac 3 жыл бұрын
....this is a c++ simulation... how the heck do you want to render this and why
@cupobug
@cupobug 3 жыл бұрын
Apparently they use SFML
@jackeown
@jackeown 3 жыл бұрын
@@luckyizzac I know this is a c++ simulation... By "render", I of course mean "visualize in pixels" and not "create in real life" or anything...SFML answers my question.
@HellsingKnight
@HellsingKnight 3 жыл бұрын
Reminds me of The Powder toy
@Northale
@Northale 3 жыл бұрын
How to I, make this simulation? Where do I get it I want to experiment myself
@12-343
@12-343 3 жыл бұрын
What's up with the pinkish patches in the empty areas?
@ronalddiaz922
@ronalddiaz922 3 жыл бұрын
Donde puedo ver el repositorio?
@jonathankiendrebeogo6523
@jonathankiendrebeogo6523 3 жыл бұрын
🤩🤩 🤩 🤩 🤩 🤩 Magnifique 😍 😍 😍 😍
@aya-hl5bk
@aya-hl5bk 3 жыл бұрын
@Pezzza's Work pls add .exe or somthing
@thegreatestegg8045
@thegreatestegg8045 3 жыл бұрын
Tutorial ?
@hellishboy6065
@hellishboy6065 3 жыл бұрын
I GOT THE 1000th like!!!!!
@Somewhere50
@Somewhere50 3 жыл бұрын
What game is it?
@zerfdex
@zerfdex 3 жыл бұрын
with what gui you use?
@PezzzasWork
@PezzzasWork 3 жыл бұрын
I am using the SFML
@jasonrieder6764
@jasonrieder6764 3 жыл бұрын
Hi. So I'm actually trying to build my own ant colony stimulation. With my first prototype however I obviously ran into some speed issues. Do you mind telling me if this Vidio is a timelapse or wher you where able to achieve that speed real time. just for a comparison also to see just how far i can push the speed on my simulation. Thanks
@timeiskey1
@timeiskey1 3 жыл бұрын
post code
@__________________________4597
@__________________________4597 3 жыл бұрын
Pay For It
@SunnySzetoSz2000
@SunnySzetoSz2000 3 жыл бұрын
they don't improve the path
@serbianspaceforce6873
@serbianspaceforce6873 3 жыл бұрын
real ants don't either
@Mistarbist1984
@Mistarbist1984 3 жыл бұрын
THIS VIDEO IS SPONSORED BY RAID SHADOW LEGENDS
@breeckthon5144
@breeckthon5144 3 жыл бұрын
Hello is there a way to Download it and creating my own worlds. I Would even buy it
@PezzzasWork
@PezzzasWork 3 жыл бұрын
It's all free and you can download the new version in the pinned comment of this video kzbin.info/www/bejne/m561iXWoaq-ppbs :)
@breeckthon5144
@breeckthon5144 3 жыл бұрын
@@PezzzasWork Thanks 😊 That Helps me a lot. are you planning to make a full game or Programm of it? Because it is a bit Complicated to get it Running :(
Simple  Water Animation
1:55
Pezzza's Work
Рет қаралды 8 М.
Turning bugs into Art
7:43
Pezzza's Work
Рет қаралды 193 М.
We Got Expelled From Scholl After This...
00:10
Jojo Sim
Рет қаралды 18 МЛН
Whyyyy? 😭 #shorts by Leisi Crazy
00:16
Leisi Crazy
Рет қаралды 17 МЛН
C++ Ants Simulation 6, Editor
7:38
Pezzza's Work
Рет қаралды 205 М.
Evolving AIs - Predator vs Prey, who will win?
12:15
Pezzza's Work
Рет қаралды 2,8 МЛН
How to train simple AIs to balance a double pendulum
24:59
Pezzza's Work
Рет қаралды 68 М.
HOW MUCH CAN SIMPLE ENGINE HANDLE ??
4:09
Pezzza's Work
Рет қаралды 119 М.
Real time Fire Simulation
7:23
Pezzza's Work
Рет қаралды 154 М.
C++ Ants Simulation 1, First approach
4:37
Pezzza's Work
Рет қаралды 615 М.
Ant Colony Simulation with 5000 ants (2d).
5:24
Zoom Horizon
Рет қаралды 107 М.
Much bigger simulation, AIs learn Phalanx
29:13
Pezzza's Work
Рет қаралды 2,6 МЛН
Creating a Brick Breaker with my PHYSICS ENGINE
7:21
Pezzza's Work
Рет қаралды 110 М.
Iphone or nokia
0:15
rishton vines😇
Рет қаралды 1,6 МЛН
Main filter..
0:15
CikoYt
Рет қаралды 3,2 МЛН
Apple watch hidden camera
0:34
_vector_
Рет қаралды 60 МЛН