AIs learn to WALK
HTML-код
- Опубликовано: 7 июн 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 - Наука
This is a reupload to fix sound issues
Oh okay
thanks
Man I though part 2
@thegarry7542 Yes sorry for that 😢
Aww i thought part 2 too lol
Solution 2 is so satisfying to watch, definitely my favorite
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. 🤣
Perhaps a glimpse of concsiousness, who knows...lol
Not at all
These neural networks models cant even "think" all they do is based on reflexes and instincts
@@Alexandre_Kinkela_
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.
Totally agree with you 💪
The code to make this is probably horrifying
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.
Thank you for the effort!
I wonder if this is an explanation for handedness?
@@AlexanderWhillasWhat do you mean?
@@quantumgaming9180 well, if a bias is developed it might be the explanation for handedness in humans i.e. right verses left handedness?
@@AlexanderWhillas i see
Very cool! You have inspired me to start making my own experiments. Thank you!
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*
Love your work dude - thanks for putting in so much effort!
Thank you!
Kind of interesting how the forward movement of each of the 4 solutions very closely mimics a different canine gait.
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).
3:45
"I also switched to a circle"
Proceeds to use a square
he meant for the training not the demonstration
Orange needed a quick nap. xD
The amount of work, and the quality ... incredible.
Genius idea with the snow on the floor so they leave cute little traces.
Very high quality stuff. Love it!
This channnel is so chill, i love it.
that's so great can't wait for the more complex structures
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!
I loved the idea of placing sand to watch where they go :) It looks amazing!
will an editor/source code for predator prey simulations ever be released? I really enjoyed the videos
I'm interested too
Love how the eyes are always tracking the targets 😍
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
Lets goo i love this channel sm
Superb! Thank you!
Thought this was a sequel. I got exited😢
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!
These are fascinating to me.
this is the best youtube accounts ive found recently
very good ❤
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.
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.
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
I would also love to do so but it takes quite a lot of time and requires many watts :D
@@PezzzasWork Yeah I thought so! It's a real shame! :D
Salut l’ami ! J’adore ton travail
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?!
lets fucking go
favorite channel out rn
Reupload?
yea
10 minutes ago!! Will leave it up in the background to build engagement
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
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)
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!😂
@@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.
Oh so it's not part 2... 😔
Very nice. A lot of work to implement as well as to test and document. Is this written to SFML or BGFX ?
I wrote it using SFML
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.
What tools / software do you use to create these simulations?
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.
hoping for another pvp video soon!!! Very cool though
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.
Solution 2 was easily my favourite little derp, then he just stopped dead. Now i think its my spirit animal.
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.
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?
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.
good vid
whats the difference between 1 and 4 and between 2 and 3
hey i was wondering if you could make downloading of the ant simulation easier, Thanks!
the orange guy had to reconsider some life choices at the very end 😁
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
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.
They would be selected out.
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.
so the "real" point of efficiency is in their capacity/strategy to turn.
Nice one gg
i like how solution 4 is green, as its very froglike in movement
This reminds me of the brandeis golem @ home project 🙂
I was hoping this would be a new video
But its just a reupload ):
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
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..!)
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?
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!
I'm curious, were they turning manually using the muscles and legs? or were the agents automatically rotating to face the goal?
All the controls are performed using muscles and friction
@@PezzzasWork Love it!
Interesting how they never go backwards, instead they try to turn awkwardly every time. Aren't they symmetric?
Great video btw! Thank you!!
Favoring one direction over the other. Could this be seen in humans preferring right handedness...
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.
I clicked so fast
connect the movement ai with the prey vs predator ai, i think that would look fun
Scrungley litl guy.
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! 🐸🦎
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.
Do you have discord?
19:22 Solution 2 starts taking nap
Can you make a update on 2d budget teardown? I or atleast upload it
Hello, I have a small question: Are you currently studying computer science or have you already graduated? please answer.
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
Now we GAMBLE
Bro makes four-legged terminators
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.
Un need more subs
THEY WALK.!
Reuploaded?!
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
The training was done using random targets sets, I use the same for the video to ease the perception of progress
@@PezzzasWork oh that makes sense! Great work!
左右交互の方が早いと思わせて、結局4番が最速なの激熱
this sand Kreygasm
Oh 1 and 4 doff is one is pulling and other is pushing itself
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
Fais plus de vidéos !!!!!!
so frogs are superior. i knew it. i will no longer walk and instead hop everywhere.
😊
do you remember all of the ant simulations? well i think they re missing one thing: the diging
Where part 3 of prey vs predator
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!!
Nice work by the way, gonna check your whole channel
I guess the details about solutions differences are kept in secret.
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
Le Frog clearly won.
à chaque fois que je recherche des gens qui font des IA, je tombe sur des français qui parlent anglais
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
Man I wish I knew C++
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.
Rust is better
Tbf any language is better than none. Get at it OP don't worry what language to start with.
Very good advice :)
@@rnts08 weeeeeell, for this stor of stuff you need performance so a system programming language would be ideal.