AIs learn to WALK

Sdílet
Vložit
  • čas přidán 16. 05. 2024
  • 00:00 Introduction
    07:20 Training
    12:45 Other solutions
    16:02 Race
    Neural Networks learn to control a simple body to walk to targets.
    The project has been made using C++ and SFML.
    I will post the Github later
    This is a reupload to fix sound issues
  • Věda a technologie

Komentáře • 165

  • @PezzzasWork
    @PezzzasWork  Před 9 měsíci +279

    This is a reupload to fix sound issues

  • @MutohMech
    @MutohMech Před 3 měsíci +28

    Solution 2 is so satisfying to watch, definitely my favorite

  • @SemlerPDX
    @SemlerPDX Před 8 měsíci +62

    19:30 I love this part where Solution 2 seems to have a blip of consciousness like, "Hey! Wait a minute! These things just keep popping back up! What are we even doing here?!", before it bursts back into its programming. 🤣

  • @Zappygunshot
    @Zappygunshot Před 8 měsíci +40

    An idea for expanding this experiment:
    - limb count & length variability
    - segmentation possibility (not just adding another set of limbs, but making the whole creature longer/wider as they do it)
    - limb joint count variability (instead of each limb being a rigid stick, allowing for extra joints & muscles along the length)
    It'd be cool to see what types of body plans the AI comes up with.

  • @d.l.7416
    @d.l.7416 Před 9 měsíci +98

    Here's a simple reason why its more than 50% likely that two turns will be in the same direction:
    Consider a sequence of four points the agent travels between, A,B,C,D.
    Now draw the line through B and C.
    The turns will be in the same direction if A and D are on the same side of the line. (if you draw an example then this is clear)
    Say the probability a point is on one side of the line is p, so the other side is 1-p.
    To get the same side from A and D, you either get both left so p*p or both right so (1-p)*(1-p).
    So a total probability of p*p + (1-p)*(1-p) = 2p^2 - 2p + 1. This is always at least 1/2, and its only 1/2 when p=1/2
    So its more than 50% likely that two turns will be in the same direction. (you can check with desmos)
    It's really just that if you flip a biased coin you are more likely to get the same direction twice.
    I have also tested it empirically and indeed if you choose 4 random points in a square then you have a 61% percent chance of the turns being the same.
    There might be some complications because its a sequence tho.

    • @PezzzasWork
      @PezzzasWork  Před 9 měsíci +33

      Thank you for the effort!

    • @AlexanderWhillas
      @AlexanderWhillas Před 8 měsíci +4

      I wonder if this is an explanation for handedness?

    • @quantumgaming9180
      @quantumgaming9180 Před 3 měsíci

      @@AlexanderWhillasWhat do you mean?

    • @AlexanderWhillas
      @AlexanderWhillas Před 3 měsíci +1

      @@quantumgaming9180 well, if a bias is developed it might be the explanation for handedness in humans i.e. right verses left handedness?

    • @quantumgaming9180
      @quantumgaming9180 Před 3 měsíci

      @@AlexanderWhillas i see

  • @ryanpiotr1929
    @ryanpiotr1929 Před 8 měsíci +13

    The grey sand particles are just for show, right? With low friction of the foot, it just passes through, as if it was lifted above the sand.
    It would be quite interesting to see what walking tricks would evolve if the creatures had to push the sand out of the way and how different sand densities would affect this.
    There would probably be distinctive swimming, wading and burrowing. The creatures might learn to use an already cleared path again, building a system of tunnels over time...
    Your videos are really inspiring, making me think of a hundred more ideas to add. Never stop making those beautification features! Love your channel!

  • @Wallee580
    @Wallee580 Před 9 měsíci +7

    Orange needed a quick nap. xD

  • @AlexanderWhillas
    @AlexanderWhillas Před 9 měsíci +34

    Very cool! You have inspired me to start making my own experiments. Thank you!

  • @cerberusslavomiraarus1308
    @cerberusslavomiraarus1308 Před 4 měsíci +12

    3:45
    "I also switched to a circle"
    Proceeds to use a square

    • @texasred8424
      @texasred8424 Před 2 měsíci +4

      he meant for the training not the demonstration

  • @Bobman808
    @Bobman808 Před 8 měsíci +16

    Love your work dude - thanks for putting in so much effort!

  • @Snookers_
    @Snookers_ Před 9 měsíci +5

    Kind of interesting how the forward movement of each of the 4 solutions very closely mimics a different canine gait.

  • @Teegik
    @Teegik Před 9 měsíci

    The amount of work, and the quality ... incredible.

  • @duckyblender
    @duckyblender Před 9 měsíci +2

    Very high quality stuff. Love it!

  • @qwertyuiop2161
    @qwertyuiop2161 Před 9 měsíci +23

    will an editor/source code for predator prey simulations ever be released? I really enjoyed the videos

  • @neomorphosallomorphis7395
    @neomorphosallomorphis7395 Před 9 měsíci +2

    that's so great can't wait for the more complex structures

  • @felixmerz6229
    @felixmerz6229 Před 9 měsíci +3

    Genius idea with the snow on the floor so they leave cute little traces.

  • @hvanmegen
    @hvanmegen Před 9 měsíci +3

    Beautiful music, mesmerizing movement (love the sand addition and the particle 'explosion' effect on arrival, and the blinking of the targets.. you clearly have good taste in design and style, typically french eh ;)) and flawless presentation. (Good volume on the background information too, not too distracting).

  • @BeneathTheBrightSky
    @BeneathTheBrightSky Před 6 měsíci +2

    Hmm... You've made rocket AI, Drone AI, and walking AI. I can't help but notice that all of these would be very entertaining if you paired them with the predator/prey AI... *drone phalanx attack*

  • @emilfilipov169
    @emilfilipov169 Před 7 dny

    This channnel is so chill, i love it.

  • @Wuuzzaaful
    @Wuuzzaaful Před 9 měsíci +1

    Love how the eyes are always tracking the targets 😍

  • @CelestialityRW
    @CelestialityRW Před 9 měsíci +3

    Lets goo i love this channel sm

  • @DrHanes
    @DrHanes Před 9 měsíci

    Superb! Thank you!

  • @louge2223
    @louge2223 Před 6 dny

    this is the best youtube accounts ive found recently

  • @AHSEN.
    @AHSEN. Před 8 měsíci

    I loved the idea of placing sand to watch where they go :) It looks amazing!

  • @ArnieMcStranglehold
    @ArnieMcStranglehold Před 8 měsíci

    These are fascinating to me.

  • @RandoART2023
    @RandoART2023 Před 9 měsíci +10

    Thought this was a sequel. I got exited😢

  • @zolorc2288
    @zolorc2288 Před 9 měsíci +5

    Imma say it again but I want to see this on a slippery surface on a race track to see them control at different speeds as they accelerate

  • @ldcgadzooks1901
    @ldcgadzooks1901 Před 9 měsíci +7

    I would describe the types of movement for each solution like this:
    1. Hop
    2. crawl
    3. Trot
    4. Hop (But better able to turn)

    • @mariealba4158
      @mariealba4158 Před 7 měsíci +1

      I think it's interesting with the 3rd one because it seems to strain one side way more than the other. I don't understand why and it bothers me!😂

    • @rats748
      @rats748 Před měsícem +1

      ​@@mariealba4158 I noticed the same thing. If you look closely, Purple doesn't like to take a straight path towards the goal. It's usually turning slightly while moving, so one side is more strained than the other. Very peculiar.

  • @mariealba4158
    @mariealba4158 Před 7 měsíci +2

    With every person doing these kinds of AIs I just want to watch 100 000 generations of it, with each getting a bit more complex through mutations or whatever. It's just so interesting

    • @PezzzasWork
      @PezzzasWork  Před 7 měsíci +2

      I would also love to do so but it takes quite a lot of time and requires many watts :D

    • @mariealba4158
      @mariealba4158 Před 7 měsíci

      @@PezzzasWork Yeah I thought so! It's a real shame! :D

  • @Audey
    @Audey Před 5 měsíci +1

    Solution#2 is a legit walk that's so awesome. #3 was really interesting how it favored its right leg for power so heavily unlike the others which were a bit more symmetrical. Also I'm really surprised #1 plateaued where it did rather than refining things to something closer to #4. Really cool video thank you

  • @mmmmm1438
    @mmmmm1438 Před 9 měsíci +1

    very good ❤

  • @MonsieurBro
    @MonsieurBro Před 7 měsíci +1

    Sorry for this being not related to this video, but later on whenever you feel like touching the Pred Vs Prey simulation again, I think I have some ideas that could produce interesting results:
    Prey remaining as-is in terms of directives, but with an added caveat that if a unit is surrounded too densely by other prey, they cannot gain nutrition. Tuning this would still allow for large groupings, but discourage simply sitting in the middle of a pile creating children that also do not move nor fight back.
    Other idea would be creating a middle tier creature (purple or something maybe?), that is able to eat prey, but can also be eaten by the old predator class. Possible food chain could be Large Predators (L) can eat Prey (P) in one bite, and can eat Small Predators (S) in two bites. From there, S can eat P in 2 bites, and can sometimes fight back and eat L in 3 or 4 bites. P can only fight back against S, losing to L in one bite, and do not gain food for a kill.

  • @DIMENSIONCODE
    @DIMENSIONCODE Před 9 měsíci +3

    Oh so it's not part 2... 😔

  • @mrshotsmith
    @mrshotsmith Před 9 měsíci +2

    Liked and commented to boost algorithm as balance cos I don't intend to watch a second time so retention won't be as good.
    Great video tho.

  • @anonymousplayer315
    @anonymousplayer315 Před 9 měsíci

    lets fucking go
    favorite channel out rn

  • @Tomfoolery1980
    @Tomfoolery1980 Před 4 měsíci

    Solution 2 was easily my favourite little derp, then he just stopped dead. Now i think its my spirit animal.

  • @AndrewAhlfield
    @AndrewAhlfield Před 5 měsíci +1

    So interesting that the networks had to develop a single pattern that worked well enough to control both distance traversal and turning. I'd love to see what would happen if neural networks were encouraged to develop two separate turning and distance traversal behaviors. Then to blend the two of them together using additional nodes. Sounds like another two videos!

  • @Paulo_Dirac
    @Paulo_Dirac Před 9 měsíci +2

    so the "real" point of efficiency is in their capacity/strategy to turn.

  • @Dysiode
    @Dysiode Před 9 měsíci

    10 minutes ago!! Will leave it up in the background to build engagement

  • @motbus3
    @motbus3 Před 8 měsíci

    Hey 👋 In the fitness function Is common to define a penalty for not solving the problem.
    The penalty is hard to set, but usually what I do is to define a per step small penalty that is slightly worse than doing nothing.
    You can also set a penalty for doing nothing for too long or for not solving the problem. The latter is useful to remove stalled agents.

  • @kubstoff1418
    @kubstoff1418 Před 8 měsíci +1

    the orange guy had to reconsider some life choices at the very end 😁

  • @ZeraticVODOfficiel
    @ZeraticVODOfficiel Před 8 měsíci

    Salut l’ami ! J’adore ton travail

  • @kashpyr
    @kashpyr Před 9 měsíci +5

    I clicked so fast

  • @RitterderRedlichkeit
    @RitterderRedlichkeit Před 7 měsíci

    I am more amazed by the way you did those smooth animated body thingy. the muscles and stuff like that. You are using SFML or SDL right... HOW do I do stuff like that?!

  • @Glasmere
    @Glasmere Před 9 měsíci +4

    Reupload?

  • @gaem9625
    @gaem9625 Před 9 měsíci

    good vid

  • @Yursa_Luna
    @Yursa_Luna Před 5 měsíci

    Its really cool to see how they resemble how real animals move even with such simple muscles.
    Orange is like a quadruped walking.
    Purple is like a quadruped running.
    And Green looks like a frog hopping along.

  • @kylemaven5956
    @kylemaven5956 Před 7 měsíci +2

    Bro I know how much work it takes to make videos like this. You are doing great quality stuff but you gotta make it shorter and more engaging. Keep up the good work though don't give up

  • @Space_Reptile
    @Space_Reptile Před 9 měsíci

    i like how solution 4 is green, as its very froglike in movement

  • @moonyl5341
    @moonyl5341 Před 8 měsíci +2

    whats the difference between 1 and 4 and between 2 and 3

  • @unstablemystery4229
    @unstablemystery4229 Před 8 měsíci

    Solution 1 reminds me of a puppy running
    2 reminds me of like a lizard
    3 reminds me of a horse
    and 4 reminds me of a dog at full sprint
    And just like a lizard 2's brain just randomly shuts off haha

  • @ro-kg5vb
    @ro-kg5vb Před 7 měsíci

    This reminds me of the brandeis golem @ home project 🙂

  • @c1ty-hunt3r
    @c1ty-hunt3r Před 7 měsíci

    Damn I feel pity to old generations who looks disabled and can't catch up young one. Reminds me my dog when he got back legs sick.
    Great videos man, very educational. Thank you.

  • @GovenorGeneral299
    @GovenorGeneral299 Před 8 měsíci

    What tools / software do you use to create these simulations?

  • @StevenJAckerman
    @StevenJAckerman Před 8 měsíci

    Very nice. A lot of work to implement as well as to test and document. Is this written to SFML or BGFX ?

  • @22119980ii
    @22119980ii Před 3 měsíci

    The main problem in wheir motions is "turning", turns take up to 50% of all time while moving. Despite the fact, that Solution 2 is quicker than Solution 1 on straight distanse, S1 is better on turns, the same goes to S3, it is moving like injured, but it is very good on turns. S4 is good in both turns and moving, thats why it is winning.
    In my opinion the movement pattern of S4 is better on longer distanses or higher speeds, as we can see in IRL like Felidae family do. And movement pattern of S2 is more mobile and "flexible", the example in the wild we can see as stated in Felidae family.

  • @seagie382
    @seagie382 Před 4 měsíci

    hoping for another pvp video soon!!! Very cool though

  • @madman19931612
    @madman19931612 Před 8 měsíci +1

    Late stage solution 1 seems really cool, but when you compare it to the others it just looks like its playing basically QWOP: madly flailing, which mostly works
    but its turning is just a mess XD

  • @ZT_M
    @ZT_M Před 8 měsíci

    What do you make these things in? I see that you usually make stuff from scratch so I'm wondering how you run the code.

  • @Michael-yd9zc
    @Michael-yd9zc Před 7 měsíci

    Now we GAMBLE

  • @e-motep876
    @e-motep876 Před 4 měsíci

    Nice one gg

  • @R.B.
    @R.B. Před 3 měsíci

    I think you should have a couple more parameters for the fitness function. Penalize energy use. This can be seen as a product of muscle contraction strength and duration. Secondly, penalize node count. This may also be framed as energy conservation as more synapses firing require more support from the host. Efficiency should be a factor considered.

  • @zekejanczewski7275
    @zekejanczewski7275 Před 5 měsíci

    Scrungley litl guy.

  • @Simon-wg9lw
    @Simon-wg9lw Před 8 měsíci

    How do you run these github projects?
    I don't know much at all about programming and so I was searching and searching for some hours now
    from my understanding I need to convert the main.cpp file into a .exe file? Is it possible that you could upload the exe file to github?

  • @ericscheit5540
    @ericscheit5540 Před 9 měsíci

    I was hoping this would be a new video
    But its just a reupload ):

  • @SchoolboyZz.
    @SchoolboyZz. Před 8 měsíci

    Can you make a update on 2d budget teardown? I or atleast upload it

  • @higuy3482
    @higuy3482 Před 12 dny

    connect the movement ai with the prey vs predator ai, i think that would look fun

  • @SuitedNoob69420
    @SuitedNoob69420 Před měsícem

    hey i was wondering if you could make downloading of the ant simulation easier, Thanks!

  • @Pastel_Frito
    @Pastel_Frito Před 6 měsíci +1

    19:22 Solution 2 starts taking nap

  • @Urusi
    @Urusi Před 9 měsíci +1

    左右交互の方が早いと思わせて、結局4番が最速なの激熱

  • @vis7139
    @vis7139 Před 4 měsíci

    Would be cool to see what would happen if you started a bunch of AIs off as omnivorous. Would they split into predators and prey? Would any omnivors remain? Or would they all stay omnivors?
    (Thinking about your previous vid on predators vs prey..!)

  • @Doichin-cv7ge
    @Doichin-cv7ge Před 26 dny

    Bro makes four-legged terminators

  • @0991476937
    @0991476937 Před 6 měsíci +2

    In the race, Solution 4 (that jumps like a frog) outpaced Solution 2 (that crawls like a lizard). In real life, jumps require more energy - it's the price you pay for moving with the least contact with ground surface. On the other hand, lizard movements are really simple - you just move your limbs one by one.
    Thus, if you plan to enhance this learning algo and shot part 2, I'd vote for introducing "step price" aka "energy per movement" parameter - not to drastically improve the speed but instead to make it look closer to a real life! 🐸🦎

    • @calsalitra4689
      @calsalitra4689 Před 4 měsíci +1

      I would describe it as more of a crawl than a walk. Like how a caterpillar moves, but with less legs. What I found interesting about it is that solution 2 was actually faster in straight lines. Earlier on when all 4 solutions were close together it was noticeably faster, but when it came time to turn it always fell behind. The optimal solution would probably be solution 2s walking with solution 4s turning.

  • @KGello
    @KGello Před 8 měsíci

    Interesting how they never go backwards, instead they try to turn awkwardly every time. Aren't they symmetric?

  • @fred_bauer
    @fred_bauer Před 8 měsíci

    Why are they turning at all tho? Do they somehow get points for facing the target or something? Does it have something to do with the first simulation?
    I don't quite understand, I thought they were symmetrical.

  • @humanamlogicam2182
    @humanamlogicam2182 Před 8 měsíci

    I have always asked myself this question, is it theoretically possible to have an overload of neurons and links by dint of making generations? having a network that is too large where certain “hidden neurons” come into conflict and therefore undermine the evolution of a network.

  • @ThighErda
    @ThighErda Před 9 měsíci

    THEY WALK.!

  • @ChrisRyanWilliams
    @ChrisRyanWilliams Před 5 měsíci +1

    Favoring one direction over the other. Could this be seen in humans preferring right handedness...

  • @AlexanderWhillas
    @AlexanderWhillas Před 8 měsíci

    I don't understand how the fitness function is used to train the NN since none of the network outputs are part of the equation?

    • @AlexanderWhillas
      @AlexanderWhillas Před 8 měsíci +1

      Ah, your not running back prop! Your just evolving the network weights. So you can side step the need for a back prop. objective function. Good show!

  • @0991476937
    @0991476937 Před 6 měsíci

    Great video btw! Thank you!!

  • @FaithGamer420
    @FaithGamer420 Před 2 měsíci

    this sand Kreygasm

  • @miversen33
    @miversen33 Před 8 měsíci

    I'd be interested in seeing the final race but with a completely different target set. Something to show more "learned behavior" as opposed to "memorized movements to complete a set course".
    Not to say this isn't really cool! Just that I'd be interested in seeing how the various solution NNs handle a completely different "race" as opposed to what they were trained against. I feel that would give a better representation of which NN learned to walk better

    • @PezzzasWork
      @PezzzasWork  Před 8 měsíci +1

      The training was done using random targets sets, I use the same for the video to ease the perception of progress

    • @miversen33
      @miversen33 Před 8 měsíci

      @@PezzzasWork oh that makes sense! Great work!

  • @azathothsuzuki4434
    @azathothsuzuki4434 Před 8 měsíci

    Do you have discord?

  • @jandar2827
    @jandar2827 Před 9 měsíci

    I'm annoyed if music hasn't lower volume than the speach. Music should be in the background not dominate. That said, I can't remember anything special about the music in the first version of the video.

  • @shilohmagic7173
    @shilohmagic7173 Před 4 měsíci

    I'm curious, were they turning manually using the muscles and legs? or were the agents automatically rotating to face the goal?

    • @PezzzasWork
      @PezzzasWork  Před 4 měsíci

      All the controls are performed using muscles and friction

    • @shilohmagic7173
      @shilohmagic7173 Před 4 měsíci

      @@PezzzasWork Love it!

  • @termisher5676
    @termisher5676 Před 12 dny

    Oh 1 and 4 doff is one is pulling and other is pushing itself

  • @CarbonMatrixify
    @CarbonMatrixify Před 8 měsíci

    Hi Pezza, please consider doing an economics based video, would be interesting to see how agents learn to trade and how it affects value.
    I'm sure that would be one of the most informative videos yet!
    Love your work

  • @Kartofeuleu
    @Kartofeuleu Před 4 měsíci +1

    Un need more subs

  • @resamoc
    @resamoc Před 9 měsíci

    😊

  • @user-lp5ux8uw6x
    @user-lp5ux8uw6x Před 4 měsíci

    do you remember all of the ant simulations? well i think they re missing one thing: the diging

  • @Longtimer49
    @Longtimer49 Před 4 měsíci

    so frogs are superior. i knew it. i will no longer walk and instead hop everywhere.

  • @SU76M
    @SU76M Před 9 měsíci

    I guess the details about solutions differences are kept in secret.

    • @PezzzasWork
      @PezzzasWork  Před 9 měsíci +1

      There is not much to say actually, I just ran multiple trainings and got different results with different seeds for the pseudo random number generator

  • @m4h1_tww87
    @m4h1_tww87 Před 6 měsíci

    Hello, I have a small question: Are you currently studying computer science or have you already graduated? please answer.

  • @zecksidd4102
    @zecksidd4102 Před 16 dny

    Fais plus de vidéos !!!!!!

  • @homerynopiajr8735
    @homerynopiajr8735 Před 3 měsíci

    Where part 3 of prey vs predator

  • @krovvl13
    @krovvl13 Před 2 měsíci

    Hey m8, I'm on a school project. Would want to know if we could talk about your and mine work. If you prefer we could talk about payments and those things. Let me know!!

    • @krovvl13
      @krovvl13 Před 2 měsíci

      Nice work by the way, gonna check your whole channel

  • @goldestperson
    @goldestperson Před 9 měsíci +1

    Man I wish I knew C++

    • @DFPercush
      @DFPercush Před 9 měsíci

      No one knows everything about C++. It's not that hard to get started. Just pick a project and figure it out as you go. That's how you learn. You can do a lot just knowing how to write a for loop and an array. There's lots of open source code to help you. Here he's using SFML to draw the graphics. It starts with reading the documentation and tutorials. When you get to an intermediate level, I would recommend reading Scott Myers' book "Effective Modern C++" although it's dated to 2014, a lot of advanced features were added in 2020.

    • @AlexanderWhillas
      @AlexanderWhillas Před 8 měsíci

      Rust is better

    • @rnts08
      @rnts08 Před 8 měsíci

      Tbf any language is better than none. Get at it OP don't worry what language to start with.

    • @PezzzasWork
      @PezzzasWork  Před 8 měsíci

      Very good advice :)

    • @AlexanderWhillas
      @AlexanderWhillas Před 8 měsíci

      @@rnts08 weeeeeell, for this stor of stuff you need performance so a system programming language would be ideal.

  • @timokreuzer1820
    @timokreuzer1820 Před 3 měsíci

    Le Frog clearly won.

  • @truiteteam3428
    @truiteteam3428 Před 9 měsíci +2

    Intro : 35% of the video, ok

  • @daniellaurent4976
    @daniellaurent4976 Před 8 měsíci

    à chaque fois que je recherche des gens qui font des IA, je tombe sur des français qui parlent anglais