Coding Adventure: Ant and Slime Simulations

1,857,046
0
Published 2021-03-25
A small exploration of an algorithm inspired by ants, and some little experiments into simulating some of the behaviour of ants and slime moulds. I hope you enjoy!

Source code (slime): github.com/SebLague/Slime-Simulation
Source code (ants): github.com/SebLague/Ant-Simulation
If you'd like to get support the channel, and get early access to future projects, you can do so here: www.patreon.com/SebastianLague

Links to some learning resources and cool videos / projects:
Slime pattern paper uwe-repository.worktribe.com/output/980579
Slime write-up and cool examples sagejenson.com/physarum
Ant simulation video by Pezzza    • C++ Ants Simulation 1, First approach  
Slime video by Deep Look    • This Pulsating Slime Mold Comes in Pe...  
Physarum project by Michael Fogleman github.com/fogleman/physarum

Chapters:
0:00 Intro
0:17 Traveling Salesperson Problem
1:36 Ant Colony Optimization
4:37 Creating a Visual Ant Simulation
9:15 Unleashing the Ants!
10:16 Side-tracked by Slime
14:07 Single Slime Experiment
16:02 Multiple Slime Species

Music:
Forest Overture by Yehezkel Raz
Honey Bee Waltz by Kadir Demir
Newborn by Roie Shpigler
Joking by Kadir Demir
Joyfulness by Kadir Demir
Wakeup Call by Ran Raiten
Anthill by Kadir Demir
Synesthesia by Michael FK
A New Horizon by Cloud Wave
Selfless by Eleven Tales
Reel by Anbr

All Comments (21)
  • @Althar93
    "Come to think of it, I could have just taken two minutes to draw this in paint but... anyway..." - Spoken by a true programmer!
  • @ItsEphora
    Ants: "haha that's cute they sometimes make little loops" Slime: *in awe before the grandeur of existence and the universe*
  • @luciusalt229
    The Slime simulations has to be one of the most amazing things I have seen in a long time. I got goosebumps when the first one broke off and started expanding.
  • Sebastian Lague video starter pack: - "I just whipped this quick & simple thing together" - compute shaders - darkmode theme - video ends before you want it to
  • @justgame5508
    I was genuinely mesmerised by those slime shaders, it’s incredible how complex, beautiful patterns can be made from seemingly simple rules. Emergence really is a universal phenomenon
  • @Hagami_
    Anyone else also wishing we could keep the slime patterns for wallpapers :D It looks amazing!
  • i have finally managed to code the slime mold simulation myself like sebastian did after being inspired by this video after ive seen it about 1.5 years ago! always wanted to try to recreate this mesmerizing simulaiton myself and got it working in the end!
  • @gblawrence034
    “This ant is too indecisive and not making much progress in life.” ....
  • Boss: Make an efficient short path search algorithm Sebastian Lague: Done, here's an ant and a slime simulator Boss: ...
  • @fubbernuckin
    16:58 this looks like some sort of organically grown future display technology up close. So cool!
  • @eboatwright_
    Currently re-watching all these old Coding Adventures videos, and I can safely say this is one of, if not my favorite YouTube series ever. Amazing work!
  • @EricDaily
    I need a Netflix series that is basically this level of production and explanation for various algorithms.
  • When Sebastian says "there's much more to explore here" I cry everytime
  • @minuspi8372
    4:04 The attention to detail in your videos is just breathtaking. Timing that to the hit in the music is incredible
  • @CompositeNation
    For real, I could cry with the 14:07 experiment, it was so beautiful to watch and see it evolving with the music, very touching!! I just admire you my friend!
  • Before: "Oh look a new Sebastian Lague video" After: "I should really learn compute shaders..."
  • @CameronChester
    Probably my favourite series on youtube. Keep up the great work!
  • Literally creates the beginning of existence and forms the universe "So, these have been pretty interesting..."
  • @lucid__enigma
    Devoting hours to develop a complex solution to something that already had a simple solution ready to go, and completely rewriting your existing code to produce a different version of imperfection are the hallmarks of a programming mind!