C++ Ants Simulation - Walls

Sdílet
Vložit
  • čas přidán 15. 10. 2020
  • Added walls to see how ants would react.
    Previous video: • C++ Ants Simulation 1,...
    Music freepd.com/music/Favorite.mp3
  • Věda a technologie

Komentáře • 66

  • @ITomocska
    @ITomocska Před 3 lety +39

    Absolutely beautiful, could watch it for hours

  • @forabbycookie699
    @forabbycookie699 Před 3 lety +40

    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 Před 3 lety +2

      Probably not the best idea, for a small detail most people would not notice it would most likely be pretty performance heavy

    • @forabbycookie699
      @forabbycookie699 Před 3 lety +4

      @@IronDizaster i am talking about a game based on that mechanic like some sort of colony management

  • @alfredfeldt5694
    @alfredfeldt5694 Před 3 lety +47

    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 Před 3 lety +8

      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 Před 2 lety +4

      Just add a bit of random turning and its should improve bit by bit

    • @florencemukagoga8513
      @florencemukagoga8513 Před rokem

      @@leolen8029 eeeeeeeeeeeee

  • @ipotrick6686
    @ipotrick6686 Před 3 lety +22

    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  Před 3 lety +7

      Nice! I am working on a grid version as well in order to ease integration with OpenCL.

  • @dmitrym3757
    @dmitrym3757 Před 3 lety +9

    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  Před 3 lety +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 Před 3 lety +10

    I'm here because of Sebastian Lague, amazing!
    Je suis ici grâce à Sebastian Lague, magnifique !

  • @EzraBradford
    @EzraBradford Před 3 lety +7

    Huh, I'm suddenly curious how ants do in the presence of a wind or other force moving their trails in particular directions.

  • @squirrel1620
    @squirrel1620 Před 3 lety +2

    These paths remind me of lightning. Is it possible to simulate longer paths or a medium with varying viscosity?

  • @gta5onlineshorts
    @gta5onlineshorts Před 3 lety

    so beautiful 🐜🐜🐜 simulation

  • @lennartgimm
    @lennartgimm Před 3 lety +2

    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 Před 3 lety +6

      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.

  • @ThatBastardOverThere
    @ThatBastardOverThere Před 3 lety +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.

  • @Northale
    @Northale Před 3 lety

    How to I, make this simulation? Where do I get it I want to experiment myself

  • @calebcarpenter421
    @calebcarpenter421 Před 3 lety

    This reminds me a lot of the way a bolt of lightning forms.

  • @muffels6410
    @muffels6410 Před 3 lety

    You could use The walls as landmasses The food as ports and the ants as boats

  • @dmitrym3757
    @dmitrym3757 Před 3 lety +2

    What framework do you use for visualization? Or is it "bare" OpenGL?

    • @PezzzasWork
      @PezzzasWork  Před 3 lety +4

      I am using SFML (www.sfml-dev.org/) which is very nice lib wrapping OpenGL.

  • @onebacon_
    @onebacon_ Před 3 lety +2

    Amazing stuff. The roads they take are random, is there any way you could promote a shorter path?

    • @PezzzasWork
      @PezzzasWork  Před 3 lety +1

      Thank you! I think that making the markers dissipate faster should help.

    • @onebacon_
      @onebacon_ Před 3 lety

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

  • @orderofchaos8680
    @orderofchaos8680 Před 3 lety

    very cool simulation. could you make a tutorial video ?

  • @12-343
    @12-343 Před 3 lety

    What's up with the pinkish patches in the empty areas?

  • @jackeown
    @jackeown Před 3 lety +4

    What did you use for rendering the animation?

    • @luckyizzac
      @luckyizzac Před 3 lety +4

      ....this is a c++ simulation... how the heck do you want to render this and why

    • @cupobug
      @cupobug Před 3 lety +2

      Apparently they use SFML

    • @jackeown
      @jackeown Před 3 lety +2

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

  • @eplexo
    @eplexo Před rokem

    All these simulations seem to give a feeling of De ja vu from nature. Those ants sure do look like blood vessels.

  • @tumble8323
    @tumble8323 Před 3 lety

    for a second I thought this was the powder toy lol

  • @SMVK
    @SMVK Před 3 lety

    Visual shape looks like at neuron :’3

  • @ronalddiaz922
    @ronalddiaz922 Před 3 lety

    Donde puedo ver el repositorio?

  • @furankusama
    @furankusama Před 3 lety

    Is this the new sorting algorithm trend?

  • @gabrielnoronha2759
    @gabrielnoronha2759 Před 3 lety

    I wonder how would it behave with multiple colonies and multiple food sources

  • @WillplaysFort
    @WillplaysFort Před 3 lety +10

    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 Před 3 lety +9

      you sound like someone who just joined a roblox group

    • @hammielover225
      @hammielover225 Před 3 lety

      ... 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 Před 3 lety +2

      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 Před 3 lety

      @@pomponi0 agreed

  • @DogeisCut
    @DogeisCut Před 3 lety

    Ants are the bogo sort of pathfinding.

  • @HellsingKnight
    @HellsingKnight Před 3 lety

    Reminds me of The Powder toy

  • @jonathankiendrebeogo6523

    🤩🤩 🤩 🤩 🤩 🤩 Magnifique 😍 😍 😍 😍

  • @Somewhere50
    @Somewhere50 Před 3 lety

    What game is it?

  • @zerfdex
    @zerfdex Před 3 lety

    with what gui you use?

  • @thegreatestegg8045
    @thegreatestegg8045 Před 3 lety

    Tutorial ?

  • @jasonrieder6764
    @jasonrieder6764 Před 3 lety

    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

  • @aya-hl5bk
    @aya-hl5bk Před 3 lety

    @Pezzza's Work pls add .exe or somthing

  • @hellishboy6065
    @hellishboy6065 Před 3 lety +1

    I GOT THE 1000th like!!!!!

  • @timeiskey1
    @timeiskey1 Před 3 lety

    post
    code

  • @SunnySzetoSz2000
    @SunnySzetoSz2000 Před 3 lety +2

    they don't improve the path

  • @BRICKGUYYY
    @BRICKGUYYY Před 3 lety

    THIS VIDEO IS SPONSORED BY RAID SHADOW LEGENDS

  • @breeckthon5144
    @breeckthon5144 Před 3 lety +2

    Hello is there a way to Download it and creating my own worlds. I Would even buy it

    • @PezzzasWork
      @PezzzasWork  Před 3 lety +1

      It's all free and you can download the new version in the pinned comment of this video czcams.com/video/emRXBr5JvoY/video.html :)

    • @breeckthon5144
      @breeckthon5144 Před 3 lety +1

      @@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 :(