C++ Ants Simulation 1, First approach

Поделиться
HTML-код
  • Опубликовано: 28 дек 2024

Комментарии • 615

  • @PezzzasWork
    @PezzzasWork  3 года назад +215

    Here is a windows executable, instructions in the ReadMe file.
    github.com/johnBuffer/AntSimulator/releases/download/v1.2/AntsSimulator.zip

    • @achmadhanif1451
      @achmadhanif1451 3 года назад +4

      thxnks man

    • @xinjunyin4140
      @xinjunyin4140 3 года назад +1

      Appreciate for sharing。

    • @yossi_cohen
      @yossi_cohen 3 года назад +1

      Ultra awesome!!!

    • @ThePlayfulJoker
      @ThePlayfulJoker 3 года назад +8

      wow man, this content is awesome. Also, I would recommend more clicky thumbnails/title, appeared 3 times in my feed before I clicked it.

    • @PezzzasWork
      @PezzzasWork  3 года назад +28

      @@ThePlayfulJoker The problem is that I am a pure dev with no com skills :(

  • @MeisVlk
    @MeisVlk 3 года назад +1353

    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!

    • @redtoxic8701
      @redtoxic8701 3 года назад +89

      damn that's cool

    • @villaticlang4844
      @villaticlang4844 3 года назад +179

      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?

    • @MeisVlk
      @MeisVlk 3 года назад +239

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

    • @ac281201
      @ac281201 3 года назад +103

      @@villaticlang4844 Yes, exactly. They will circle around until they die from exhaustion.

    • @zrny
      @zrny 3 года назад +30

      in moshpits under the stage :D

  • @Calmputer
    @Calmputer 3 года назад +851

    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.

    • @stheil
      @stheil 3 года назад +147

      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

    • @roba_recondita
      @roba_recondita 3 года назад +52

      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

    • @Calmputer
      @Calmputer 3 года назад +102

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

    • @willjohnson4579
      @willjohnson4579 3 года назад +20

      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"

    • @matheusgclassen
      @matheusgclassen 3 года назад +17

      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.

  • @nlaps
    @nlaps 3 года назад +549

    Me at 4am regreting my life choices watching ants

  • @enitalp
    @enitalp 4 года назад +630

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

    • @Maca64N
      @Maca64N 4 года назад +71

      they will kill all humans

    • @elblorenz3278
      @elblorenz3278 3 года назад +24

      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 🤔

    • @dima5467
      @dima5467 3 года назад +4

      @@elblorenz3278 The fuck are you saying?

    • @Eric-zz5ij
      @Eric-zz5ij 3 года назад +10

      @@dima5467 That ant's aren't viable bullets

    • @TheMagicat
      @TheMagicat 3 года назад +8

      Just go all out Villager News and build the railgun out of ants 😄

  • @shivanshusuryakar8692
    @shivanshusuryakar8692 3 года назад +26

    Finally someone used a "bug" in the production, lol !

  • @Starmander
    @Starmander 3 года назад +35

    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.

    • @PezzzasWork
      @PezzzasWork  3 года назад +9

      I made a new version implementing this ruclips.net/video/emRXBr5JvoY/видео.html

    • @Starmander
      @Starmander 3 года назад +2

      @@PezzzasWork wow cool! That's awesome.

  • @forabbycookie699
    @forabbycookie699 4 года назад +158

    awesome work as always

  • @qwerty-qw2zc
    @qwerty-qw2zc 3 года назад +64

    It's like ASMR but for the eyes
    Good video. Nice

  • @haieknagasaki4709
    @haieknagasaki4709 3 года назад +571

    Hey man. You've been mentioned in the latest video from Sebastian Lague so expect some more traffic to your channel :)

    • @dairop3220
      @dairop3220 3 года назад +12

      no way

    • @Danila1
      @Danila1 3 года назад +48

      Fucking youtube humants following the pheromone scent

    • @dairop3220
      @dairop3220 3 года назад +15

      @@Danila1 Haha yeah, we found DATA PHEROMONES

    • @bluethumbbuttoneek9465
      @bluethumbbuttoneek9465 3 года назад

      From who?. Dunno who this Sebastian guys is so prob won't be much more traffic

    • @siydge
      @siydge 3 года назад +1

      so THAAATS why the algorithm has been showing me these videos...

  • @kypello3512
    @kypello3512 3 года назад +693

    Who else got this recommend after watching sebastian lague?

  • @SpringySpring04
    @SpringySpring04 Год назад

    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!

  • @GuRuGeorge03
    @GuRuGeorge03 3 года назад +11

    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

    • @adamwisniewski5898
      @adamwisniewski5898 3 года назад +5

      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

  • @Zalied
    @Zalied 2 года назад +3

    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

  • @dezy9955
    @dezy9955 3 года назад

    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

  • @MrNucleosome
    @MrNucleosome 3 года назад

    I found one of the most interesting RUclips channels. Thanks for sharing your experiments.

  • @HungryTacoBoy
    @HungryTacoBoy 3 года назад +3

    Came here from the accidental bug video. Amazing work!

  • @UmzGames
    @UmzGames 3 года назад +2

    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!

    • @rxpmbeats7453
      @rxpmbeats7453 Год назад +1

      can u please suggest me some videos from where i can learn how to buld up these types of
      simulation

    • @UmzGames
      @UmzGames Год назад

      @@rxpmbeats7453 I suggest Phaser JS, for something simple. JavaScript, easy to get it working. But depends on your skillset

  • @GodOfReality
    @GodOfReality 3 года назад +10

    I think it would be neat if there was a really low percent chance (

  • @Fetterbruhmoment
    @Fetterbruhmoment 3 года назад

    POV: it‘s 3am and you have an important exam tomorrow for which you’ve not studied yet

  • @RexGalilae
    @RexGalilae 3 года назад

    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

  • @legendgames128
    @legendgames128 2 года назад

    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.

  • @walterh2113
    @walterh2113 3 года назад +25

    Be prepared for the Sebastian Lague horde.

  • @chinmayghule8272
    @chinmayghule8272 3 года назад

    And this is a BASIC simulator... What am I doing with my life?
    Cool work!

  • @sebastianagne1157
    @sebastianagne1157 3 года назад +2

    4:14 its good that shape didnt have one more arm

  • @tissuepaper9962
    @tissuepaper9962 3 года назад +6

    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.

    • @carlosmspk
      @carlosmspk 3 года назад +1

      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

    • @tissuepaper9962
      @tissuepaper9962 3 года назад

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

  • @soliderarmatang5664
    @soliderarmatang5664 3 года назад

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

  • @StuartGilbert
    @StuartGilbert 4 года назад +8

    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.

    • @sayamqazi
      @sayamqazi 3 года назад +1

      Use pixi-js. You can render atelast tens of thousands of sprites at crsip framerate

  • @cheydinal5401
    @cheydinal5401 3 года назад +2

    Very cool simulation, thanks! I'd be interested to see some more complex behaviors come from a similation like this

  • @MrWnw
    @MrWnw 3 года назад +1

    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.

    • @PezzzasWork
      @PezzzasWork  3 года назад +1

      You're totally right, I implemented this in the next version :) ruclips.net/video/emRXBr5JvoY/видео.html

    • @MrWnw
      @MrWnw 3 года назад

      @@PezzzasWork I thought It might be the case, since the 'dead loops' are real in nature (comment below). Thank you for your answer!

  • @smil2k
    @smil2k 3 года назад

    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.

  • @vinvic1578
    @vinvic1578 3 года назад +2

    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)

    • @PezzzasWork
      @PezzzasWork  3 года назад +1

      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.

    • @vinvic1578
      @vinvic1578 3 года назад +1

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

  • @andreygrigorev8366
    @andreygrigorev8366 3 года назад +3

    Gorgeous! I guess that you can create really cool animations with it if you turn color of "randomly wandering ant" to bg color / invisible

  • @alvarorodriguezgarcia9126
    @alvarorodriguezgarcia9126 3 года назад +5

    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.

  • @ozkarreyesromero7424
    @ozkarreyesromero7424 3 года назад

    I enjoyed see how the ants works! amazing proyect dude!

  • @GabrieleLabanca
    @GabrieleLabanca 3 года назад +3

    Great! Should we expect that, on the long term, the paths become straight lines?

  • @mrtruman4339
    @mrtruman4339 3 года назад +2

    Ok but WHY do you have *only* 995 subs (996 if we include myself now). This is fascinating. Great work.

  • @MrDreadlocksman
    @MrDreadlocksman 3 года назад

    This is the most beautiful thing I have seen today!

  • @RichardPLopes
    @RichardPLopes 3 года назад +5

    This is amazing. Congrats

  • @brayanbenjamin479
    @brayanbenjamin479 3 года назад +1

    This is really good, i'm impressed

  • @leelou0796
    @leelou0796 4 года назад +2

    Very relaxing, maybe it'll help me fall back asleep..

    • @PezzzasWork
      @PezzzasWork  4 года назад +1

      Ants are helpful in a lot of ways :)

  • @erinkarp
    @erinkarp 2 года назад

    I love the use of markers, clever!

  • @keyboardegg931
    @keyboardegg931 3 года назад

    the way they form many "feeler" trails, and the one that reaches the nest first is reinforced, reminds me of lightning

  • @abdullahh283
    @abdullahh283 3 года назад

    Very nice work, github is very beneficial, thanks for that!

  • @eziowayne
    @eziowayne 3 года назад +22

    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.

    • @PezzzasWork
      @PezzzasWork  3 года назад +19

      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.

    • @miketechnikg9775
      @miketechnikg9775 3 года назад

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

    • @devdev3052
      @devdev3052 3 года назад

      @@PezzzasWork First of all great work. Second what do you mean with objectives. Food and home?

    • @AlexandrBorschchev
      @AlexandrBorschchev 3 года назад

      @@miketechnikg9775 yes however this is based on the underlying mechanism of ants in real life that they have developed instinct to form groups

    • @AbsolutelyGeorgous
      @AbsolutelyGeorgous 2 года назад

      This actually happens in real life and they eventually die of exhaustion

  • @HackerNomada
    @HackerNomada 3 года назад +3

    THIS IS AWESOME.
    SHOULD GO VIRAL.... I hope so.

    • @PezzzasWork
      @PezzzasWork  3 года назад +1

      Thank you! 6K views is already well beyond what I expected :D

  • @MJZA93
    @MJZA93 3 года назад

    That was insanely satisfying to watch

  • @RichardAugust
    @RichardAugust 3 года назад

    That is so kewl. Should be getting millions of views.

  • @nullempt
    @nullempt 3 года назад +2

    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!

  • @s0lly
    @s0lly 4 года назад +2

    Seems like we’re into similar experiments! Keep it up!

    • @PezzzasWork
      @PezzzasWork  4 года назад +1

      You have a very nice channel! just subscribed :)

    • @s0lly
      @s0lly 4 года назад +2

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

    • @PezzzasWork
      @PezzzasWork  4 года назад +1

      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)

  • @punker2472
    @punker2472 3 года назад

    your work is wonderful! I really like it

  • @TheSgrizli
    @TheSgrizli 3 года назад +2

    I'm impressed very nice work

  • @warmCabin
    @warmCabin 3 года назад +6

    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?

    • @PezzzasWork
      @PezzzasWork  3 года назад +8

      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 :)

    • @adamvalt6609
      @adamvalt6609 3 года назад

      @@PezzzasWork wow :)

    • @hampustoft2221
      @hampustoft2221 3 года назад

      @@PezzzasWork do you weaken the trail they leave behind? or is it permanent?

    • @willjohnson4579
      @willjohnson4579 3 года назад

      @@hampustoft2221 it looks like they weaken as far as I can tell

  • @FragMoviesByFleet
    @FragMoviesByFleet 3 года назад

    Good job man! It's beatiful! I try to repeat your program! It's very intresting

  • @AngryTomato828
    @AngryTomato828 3 года назад

    I absolutely loved it please and try to do something like this again!

  • @Ray-jg5dj
    @Ray-jg5dj 3 года назад

    Everybody gangsta until the ants paths look like a Swastika

  • @Sniper_Fam101
    @Sniper_Fam101 2 года назад +1

    what app do u use for these simulations

  • @lorvarz7639
    @lorvarz7639 3 года назад +2

    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?

  • @thisismygascan4730
    @thisismygascan4730 Год назад

    elite algorithm for solving puzzles

  • @stttrm
    @stttrm 3 года назад +1

    this is so satisfying
    awesome work

  • @visionkrypto6760
    @visionkrypto6760 3 года назад

    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

  • @user-jj1tp4qm8m
    @user-jj1tp4qm8m 3 года назад

    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 ;)

    • @K-Anator
      @K-Anator 3 года назад +2

      Been a while since I've seen a name that breaks RUclips's CSS. Nice.

  • @akiovzz1540
    @akiovzz1540 3 года назад

    thats why programming is beautiful

  • @myself3209
    @myself3209 3 года назад +1

    I like how they randomly decided to make a circle on bottom right at 1:44

    • @matheuspegorari1094
      @matheuspegorari1094 3 года назад

      Like said in comments above, ants do this in real life too its called Ant Mill, you can search on RUclips and see.

  • @ArthurCousseau
    @ArthurCousseau 3 года назад

    Truly beautiful to watch

  • @warvstar
    @warvstar 4 года назад +2

    Very nice! Now I want to do this too! I think I'll try my hand at this.

  • @mirrorizen
    @mirrorizen 3 года назад

    Now put this algorithm in every game that has ants

  • @koraytecimer6080
    @koraytecimer6080 3 года назад

    This video will get 1.2 million views minimum, great vid.

  • @Puner54
    @Puner54 3 года назад +1

    That is just plain COOL!!!

  • @GregoryTheGr8ster
    @GregoryTheGr8ster 3 года назад +1

    Hey everyone, don't forget that Will Wright developed "Sim Ant" in 1993 (or thereabouts).

  • @CenkKABAHASANOGLU
    @CenkKABAHASANOGLU 3 года назад +1

    "to food" path has two directions let's say North and South, how can they know which direction is exactly to the food?

  • @pratiklondhe5167
    @pratiklondhe5167 3 года назад +3

    Damn that's beautiful!

  • @apexclips6919
    @apexclips6919 3 года назад

    Nice vids !!!!
    Nice work, why the ants spread out suddenly at 3:42 on the left ?

  • @aleksinuora9936
    @aleksinuora9936 4 года назад +2

    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.

    • @aleksinuora9936
      @aleksinuora9936 4 года назад +2

      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.

    • @PezzzasWork
      @PezzzasWork  4 года назад +1

      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.

  • @BenjaminAster
    @BenjaminAster 3 года назад +3

    Sebastian Lague mentioned this video.

  • @samhan4118
    @samhan4118 3 года назад

    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?

  • @levaChier
    @levaChier 3 года назад +2

    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)

  • @nicolasmaillouxorgue
    @nicolasmaillouxorgue 3 года назад

    Wow, this is awesome. Congratulations

  • @ZOLDAIOQUE88MADACI
    @ZOLDAIOQUE88MADACI 3 года назад

    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

  • @RogerGarrett
    @RogerGarrett 3 года назад

    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.

  • @tobiasb.2823
    @tobiasb.2823 3 года назад +1

    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?

  • @hdbanana464
    @hdbanana464 3 года назад

    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?

  • @lollo64able
    @lollo64able 3 года назад +1

    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!

  • @quecisneros
    @quecisneros 3 года назад

    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?

  • @madvillain285
    @madvillain285 3 года назад

    This man: Ants simulator
    Me: std::cout

  • @melissamarieperez
    @melissamarieperez 3 года назад

    IDK how I got here but this is so cool!

  • @dairop3220
    @dairop3220 3 года назад +4

    Does the markers include directions ? Good job though :)

    • @PezzzasWork
      @PezzzasWork  3 года назад +1

      Thanks :) Markers actually do not store any directionnal information, a marker is just a position with a type (to home | to food)

    • @adrianshawuk
      @adrianshawuk 3 года назад +2

      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 👍

    • @PezzzasWork
      @PezzzasWork  3 года назад

      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

    • @dairop3220
      @dairop3220 3 года назад

      @@PezzzasWork That's smart, thanks for the explanation !

    • @panteleymonschekochikhin-k1978
      @panteleymonschekochikhin-k1978 3 года назад

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

  • @rafaeltkachenko5736
    @rafaeltkachenko5736 3 года назад +2

    Great video, I just wanted to know what engine you used to make the simulation?

    • @PezzzasWork
      @PezzzasWork  3 года назад +1

      Thank you :) I am not using an engine, just the SFML framework to ease rendering www.sfml-dev.org/

  • @earthling_parth
    @earthling_parth 3 года назад +2

    The algorithm brought me here via the recommendation page unlike most others who came from some other channel.

  • @nikitademodov3446
    @nikitademodov3446 3 года назад +1

    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!

    • @PezzzasWork
      @PezzzasWork  3 года назад

      Thank you! The "C++" label is because I share the code in the descritption :)

  • @redme3265
    @redme3265 3 года назад

    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.

  • @Wiqser
    @Wiqser 3 года назад +1

    Hello, How much time did you spend on this Sir? Btw Great work done, it looks so cool;)

    • @Ty1er
      @Ty1er 3 года назад

      F

  • @BuyMyBeard
    @BuyMyBeard 3 года назад

    It looks very cool, but the fact every individual ant sets « to home » dots must make the software memory intensive

  • @zh9664
    @zh9664 3 года назад

    can we get Sebastian lague?
    mum: we have Sebastian lague at home.
    Sebastian lague at home:

  • @iwikal
    @iwikal 3 года назад +1

    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.

    • @PezzzasWork
      @PezzzasWork  3 года назад

      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

  • @beepIL
    @beepIL 3 года назад

    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?

  • @finnbsch
    @finnbsch 3 года назад

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

  • @Guaxinim5573
    @Guaxinim5573 3 года назад +1

    Who is Sebastian Lague?

  • @micomator
    @micomator Год назад

    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

  • @gauthierruberti8065
    @gauthierruberti8065 2 года назад

    How do ants know when there's no more food?