AIs learn to WALK

  Рет қаралды 49,286

Pezzza's Work

Pezzza's Work

Күн бұрын

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

Пікірлер: 165
@PezzzasWork
@PezzzasWork 9 ай бұрын
This is a reupload to fix sound issues
@Creep5432
@Creep5432 9 ай бұрын
Oh okay
@spacepotato2361
@spacepotato2361 9 ай бұрын
thanks
@thegarry7542
@thegarry7542 9 ай бұрын
Man I though part 2
@PezzzasWork
@PezzzasWork 9 ай бұрын
@thegarry7542 Yes sorry for that 😢
@goldestperson
@goldestperson 9 ай бұрын
Aww i thought part 2 too lol
@MutohMech
@MutohMech 3 ай бұрын
Solution 2 is so satisfying to watch, definitely my favorite
@SemlerPDX
@SemlerPDX 8 ай бұрын
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. 🤣
@Alexandre_Kinkela_
@Alexandre_Kinkela_ Ай бұрын
Perhaps a glimpse of concsiousness, who knows...lol
@d.l.7416
@d.l.7416 9 ай бұрын
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 9 ай бұрын
Thank you for the effort!
@AlexanderWhillas
@AlexanderWhillas 9 ай бұрын
I wonder if this is an explanation for handedness?
@quantumgaming9180
@quantumgaming9180 4 ай бұрын
@@AlexanderWhillasWhat do you mean?
@AlexanderWhillas
@AlexanderWhillas 4 ай бұрын
@@quantumgaming9180 well, if a bias is developed it might be the explanation for handedness in humans i.e. right verses left handedness?
@quantumgaming9180
@quantumgaming9180 4 ай бұрын
@@AlexanderWhillas i see
@Zappygunshot
@Zappygunshot 9 ай бұрын
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.
@joelyricsandskits6223
@joelyricsandskits6223 5 ай бұрын
Totally agree with you 💪
@BisexualPlagueDoctor
@BisexualPlagueDoctor 4 ай бұрын
The code to make this is probably horrifying
@AlexanderWhillas
@AlexanderWhillas 9 ай бұрын
Very cool! You have inspired me to start making my own experiments. Thank you!
@felixmerz6229
@felixmerz6229 9 ай бұрын
Genius idea with the snow on the floor so they leave cute little traces.
@Bobman808
@Bobman808 9 ай бұрын
Love your work dude - thanks for putting in so much effort!
@PezzzasWork
@PezzzasWork 9 ай бұрын
Thank you!
@Wallee580
@Wallee580 9 ай бұрын
Orange needed a quick nap. xD
@Snookers_
@Snookers_ 9 ай бұрын
Kind of interesting how the forward movement of each of the 4 solutions very closely mimics a different canine gait.
@cerberusslavomiraarus1308
@cerberusslavomiraarus1308 4 ай бұрын
3:45 "I also switched to a circle" Proceeds to use a square
@texasred8424
@texasred8424 2 ай бұрын
he meant for the training not the demonstration
@louge2223
@louge2223 14 күн бұрын
this is the best youtube accounts ive found recently
@ryanpiotr1929
@ryanpiotr1929 8 ай бұрын
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!
@hvanmegen
@hvanmegen 9 ай бұрын
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).
@Teegik
@Teegik 9 ай бұрын
The amount of work, and the quality ... incredible.
@emilfilipov169
@emilfilipov169 16 күн бұрын
This channnel is so chill, i love it.
@duckyblender
@duckyblender 9 ай бұрын
Very high quality stuff. Love it!
@Tomfoolery1980
@Tomfoolery1980 4 ай бұрын
Solution 2 was easily my favourite little derp, then he just stopped dead. Now i think its my spirit animal.
@mariealba4158
@mariealba4158 7 ай бұрын
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 7 ай бұрын
I would also love to do so but it takes quite a lot of time and requires many watts :D
@mariealba4158
@mariealba4158 7 ай бұрын
@@PezzzasWork Yeah I thought so! It's a real shame! :D
@neomorphosallomorphis7395
@neomorphosallomorphis7395 9 ай бұрын
that's so great can't wait for the more complex structures
@Wuuzzaaful
@Wuuzzaaful 9 ай бұрын
Love how the eyes are always tracking the targets 😍
@BeneathTheBrightSky
@BeneathTheBrightSky 6 ай бұрын
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*
@AHSEN.
@AHSEN. 9 ай бұрын
I loved the idea of placing sand to watch where they go :) It looks amazing!
@Audey
@Audey 6 ай бұрын
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
@CelestialityRW
@CelestialityRW 9 ай бұрын
Lets goo i love this channel sm
@RandoART2023
@RandoART2023 9 ай бұрын
Thought this was a sequel. I got exited😢
@MonsieurBro
@MonsieurBro 7 ай бұрын
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.
@qwertyuiop2161
@qwertyuiop2161 9 ай бұрын
will an editor/source code for predator prey simulations ever be released? I really enjoyed the videos
@jeffpelevin
@jeffpelevin 3 ай бұрын
I'm interested too
@DrHanes
@DrHanes 9 ай бұрын
Superb! Thank you!
@0991476937
@0991476937 6 ай бұрын
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 4 ай бұрын
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.
@AndrewAhlfield
@AndrewAhlfield 6 ай бұрын
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!
@ArnieMcStranglehold
@ArnieMcStranglehold 8 ай бұрын
These are fascinating to me.
@ldcgadzooks1901
@ldcgadzooks1901 9 ай бұрын
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 7 ай бұрын
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 Ай бұрын
​@@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.
@mrshotsmith
@mrshotsmith 9 ай бұрын
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.
@zolorc2288
@zolorc2288 9 ай бұрын
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
@Yursa_Luna
@Yursa_Luna 6 ай бұрын
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.
@mmmmm1438
@mmmmm1438 9 ай бұрын
very good ❤
@kubstoff1418
@kubstoff1418 9 ай бұрын
the orange guy had to reconsider some life choices at the very end 😁
@motbus3
@motbus3 8 ай бұрын
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.
@c1ty-hunt3r
@c1ty-hunt3r 8 ай бұрын
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.
@StevenJAckerman
@StevenJAckerman 9 ай бұрын
Very nice. A lot of work to implement as well as to test and document. Is this written to SFML or BGFX ?
@PezzzasWork
@PezzzasWork 4 ай бұрын
I wrote it using SFML
@ZeraticVODOfficiel
@ZeraticVODOfficiel 9 ай бұрын
Salut l’ami ! J’adore ton travail
@Dysiode
@Dysiode 9 ай бұрын
10 minutes ago!! Will leave it up in the background to build engagement
@anonymousplayer315
@anonymousplayer315 9 ай бұрын
lets fucking go favorite channel out rn
@RitterderRedlichkeit
@RitterderRedlichkeit 7 ай бұрын
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?!
@seagie382
@seagie382 4 ай бұрын
hoping for another pvp video soon!!! Very cool though
@22119980ii
@22119980ii 3 ай бұрын
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.
@ZT_M
@ZT_M 8 ай бұрын
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.
@kylemaven5956
@kylemaven5956 7 ай бұрын
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
@R.B.
@R.B. 3 ай бұрын
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.
@GovenorGeneral299
@GovenorGeneral299 9 ай бұрын
What tools / software do you use to create these simulations?
@Paulo_Dirac
@Paulo_Dirac 9 ай бұрын
so the "real" point of efficiency is in their capacity/strategy to turn.
@kashpyr
@kashpyr 9 ай бұрын
I clicked so fast
@gaem9625
@gaem9625 9 ай бұрын
good vid
@Simon-wg9lw
@Simon-wg9lw 9 ай бұрын
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?
@e-motep876
@e-motep876 5 ай бұрын
Nice one gg
@fred_bauer
@fred_bauer 9 ай бұрын
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.
@shilohmagic7173
@shilohmagic7173 4 ай бұрын
I'm curious, were they turning manually using the muscles and legs? or were the agents automatically rotating to face the goal?
@PezzzasWork
@PezzzasWork 4 ай бұрын
All the controls are performed using muscles and friction
@shilohmagic7173
@shilohmagic7173 4 ай бұрын
@@PezzzasWork Love it!
@Pastel_Frito
@Pastel_Frito 6 ай бұрын
19:22 Solution 2 starts taking nap
@Space_Reptile
@Space_Reptile 9 ай бұрын
i like how solution 4 is green, as its very froglike in movement
@Doichin-cv7ge
@Doichin-cv7ge Ай бұрын
Bro makes four-legged terminators
@ro-kg5vb
@ro-kg5vb 7 ай бұрын
This reminds me of the brandeis golem @ home project 🙂
@humanamlogicam2182
@humanamlogicam2182 8 ай бұрын
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.
@hexdiqoreprime7974
@hexdiqoreprime7974 8 ай бұрын
They would be selected out.
@Glasmere
@Glasmere 9 ай бұрын
Reupload?
@ThighErda
@ThighErda 9 ай бұрын
yea
@unstablemystery4229
@unstablemystery4229 8 ай бұрын
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
@madman19931612
@madman19931612 9 ай бұрын
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
@moonyl5341
@moonyl5341 9 ай бұрын
whats the difference between 1 and 4 and between 2 and 3
@ericscheit5540
@ericscheit5540 9 ай бұрын
I was hoping this would be a new video But its just a reupload ):
@ChrisRyanWilliams
@ChrisRyanWilliams 5 ай бұрын
Favoring one direction over the other. Could this be seen in humans preferring right handedness...
@SuitedNoob69420
@SuitedNoob69420 2 ай бұрын
hey i was wondering if you could make downloading of the ant simulation easier, Thanks!
@DIMENSIONCODE
@DIMENSIONCODE 9 ай бұрын
Oh so it's not part 2... 😔
@Longtimer49
@Longtimer49 4 ай бұрын
so frogs are superior. i knew it. i will no longer walk and instead hop everywhere.
@higuy3482
@higuy3482 21 күн бұрын
connect the movement ai with the prey vs predator ai, i think that would look fun
@zekejanczewski7275
@zekejanczewski7275 5 ай бұрын
Scrungley litl guy.
@Michael-yd9zc
@Michael-yd9zc 7 ай бұрын
Now we GAMBLE
@vis7139
@vis7139 4 ай бұрын
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..!)
@miversen33
@miversen33 8 ай бұрын
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 8 ай бұрын
The training was done using random targets sets, I use the same for the video to ease the perception of progress
@miversen33
@miversen33 8 ай бұрын
@@PezzzasWork oh that makes sense! Great work!
@AlexanderWhillas
@AlexanderWhillas 9 ай бұрын
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 8 ай бұрын
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!
@KGello
@KGello 9 ай бұрын
Interesting how they never go backwards, instead they try to turn awkwardly every time. Aren't they symmetric?
@m4h1_tww87
@m4h1_tww87 6 ай бұрын
Hello, I have a small question: Are you currently studying computer science or have you already graduated? please answer.
@Urusi
@Urusi 9 ай бұрын
左右交互の方が早いと思わせて、結局4番が最速なの激熱
@user-lp5ux8uw6x
@user-lp5ux8uw6x 4 ай бұрын
do you remember all of the ant simulations? well i think they re missing one thing: the diging
@0991476937
@0991476937 6 ай бұрын
Great video btw! Thank you!!
@ThighErda
@ThighErda 9 ай бұрын
THEY WALK.!
@ThighErda
@ThighErda 9 ай бұрын
Reuploaded?!
@jandar2827
@jandar2827 9 ай бұрын
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.
@FaithGamer420
@FaithGamer420 2 ай бұрын
this sand Kreygasm
@termisher5676
@termisher5676 21 күн бұрын
Oh 1 and 4 doff is one is pulling and other is pushing itself
@Kartofeuleu
@Kartofeuleu 5 ай бұрын
Un need more subs
@zecksidd4102
@zecksidd4102 25 күн бұрын
Fais plus de vidéos !!!!!!
@resamoc
@resamoc 9 ай бұрын
😊
@Packtd
@Packtd 9 ай бұрын
Can you make a update on 2d budget teardown? I or atleast upload it
@timokreuzer1820
@timokreuzer1820 4 ай бұрын
Le Frog clearly won.
@SU76M
@SU76M 9 ай бұрын
I guess the details about solutions differences are kept in secret.
@PezzzasWork
@PezzzasWork 9 ай бұрын
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
@azathothsuzuki4434
@azathothsuzuki4434 9 ай бұрын
Do you have discord?
@krovvl13
@krovvl13 2 ай бұрын
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 2 ай бұрын
Nice work by the way, gonna check your whole channel
@daniellaurent4976
@daniellaurent4976 8 ай бұрын
à chaque fois que je recherche des gens qui font des IA, je tombe sur des français qui parlent anglais
@CarbonMatrixify
@CarbonMatrixify 9 ай бұрын
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
@homerynopiajr8735
@homerynopiajr8735 4 ай бұрын
Where part 3 of prey vs predator
@goldestperson
@goldestperson 9 ай бұрын
Man I wish I knew C++
@DFPercush
@DFPercush 9 ай бұрын
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 9 ай бұрын
Rust is better
@rnts08
@rnts08 8 ай бұрын
Tbf any language is better than none. Get at it OP don't worry what language to start with.
@PezzzasWork
@PezzzasWork 8 ай бұрын
Very good advice :)
@AlexanderWhillas
@AlexanderWhillas 8 ай бұрын
@@rnts08 weeeeeell, for this stor of stuff you need performance so a system programming language would be ideal.
@JordanShackelford
@JordanShackelford 8 ай бұрын
Instead of trying to make an improvement every single generation you should give it more time to make sure you're not getting stuck in a local optima
How to train simple AIs
12:59
Pezzza's Work
Рет қаралды 44 М.
Training a Neural Network to operate drones using Genetic Algorithm
8:54
小路飞姐姐居然让路飞小路飞都消失了#海贼王  #路飞
00:47
路飞与唐舞桐
Рет қаралды 91 МЛН
Normal vs Smokers !! 😱😱😱
00:12
Tibo InShape
Рет қаралды 104 МЛН
100❤️
00:21
Nonomen ノノメン
Рет қаралды 9 МЛН
Real time Fire Simulation
7:23
Pezzza's Work
Рет қаралды 153 М.
AI Learns Table Tennis
11:20
b2studios
Рет қаралды 958 М.
How I re-created the rhythm game osu! from scratch in C++!
5:51
Omer Hasanov
Рет қаралды 23 М.
AI vs. AI in 100m Dash (deep reinforcement learning)
11:13
AI Warehouse
Рет қаралды 2,2 МЛН
Watching Neural Networks Learn
25:28
Emergent Garden
Рет қаралды 1,1 МЛН
AI vs. AI. Two chatbots talking to each other
1:24
CornellCCSL
Рет қаралды 26 МЛН
Simulating Particle Life
18:18
Digital Genius
Рет қаралды 108 М.
Simple Fractal rendering
11:05
Pezzza's Work
Рет қаралды 126 М.
This AI Stuntman Just Keeps Getting Better! 🏃
6:23
Two Minute Papers
Рет қаралды 244 М.
C++ Ants Simulation 5, Ants Fight
9:24
Pezzza's Work
Рет қаралды 1 МЛН
XL-Power Best For Audio Call 📞 Mobile 📱
0:42
Tech Official
Рет қаралды 768 М.
How Neuralink Works 🧠
0:28
Zack D. Films
Рет қаралды 31 МЛН
Apple. 10 Интересных Фактов
24:26
Dameoz
Рет қаралды 119 М.
Nokia 3310 versus Red Hot Ball
0:37
PressTube
Рет қаралды 2,4 МЛН