Since the controller can output an arbitrary cart speed every timestep, it is permitted more or less infinite acceleration. It would be interesting to see how they perform if the available acceleration, (or power, or whatever) is constrained to realistic bounds
6 місяців тому+1
That's actually pretty standard to alter into a categorical/discrete step.
I'm finally starting to recover from like 3 years of intense burnout as a software engineer, and watching your videos helps me remember why I got into this field in the first place. Looking forward to the next one!
In the next videos I suggest including some articles, in the description, to delve deeper into the topics discussed. As I was searching for the sources for this project, I couldn't find them.
I do topological sorting, but then I cache all the pathways from input nodes to output nodes into lists. This way, instead of re-iterating the graph, I just do a for loop to iterate over lists of nodes instead of repeatedly recalculating paths. I haven't seen this technique used online but it makes training step much faster.
Yeah, that popped out to me as an immediate speedup opportunity. Just gotta make sure it's only valid while the topology of it doesn't change. (Maybe invalidate it in the "add node/connection" mutations)
Very interesting video! The editing and animations are so nice and makes it easy to understand, and I was wondering, what software did you use to make them?
For anyone struggling in the future, this playlist, and this video specifically, was of great help for me when writing the topological sort algorithm. To be honest, I'd actually say that topologically sorting the graph is one of the hardest steps. ua-cam.com/video/cIBFEhD77b4/v-deo.html
Double pendulum should be fun. I wonder how good a solution it will be able to find. As an aside, can't you just use the raw pendulum height (summed per frame) as a fitness function?
This is an absolutely wonderful video. If I may provide some feedback; It would be great if you could visually show how these mutations (5:47) are applied using the network chart. When splitting an existing connection in two, do they share the same connections with their parents and children? Do new connections have random weights? Also, why does my hyperbolic tangent function provide values different from yours?
Are the mutations equally distributed between those 4 possibilities? But some extra mutation decisions need to be made: where to insert a new node, which weight to change or where to add a new connection. Are these decisions also equally distributed?
Excellent content! Would love if you could compare a comparison between this and other RL algorithms like TD3, PPO, and SAC. Like how they would do solving the same problem
Hi Pezzza. I have got a question for a physics rigid body particle simulation you made ages ago, and I am dying to know since you didn’t upload the source code and can’t find what I need anywhere else. You have the feature where you are able to draw your own rigid bodies with the mouse. I believe the objects are composed of particles which are interconnected by constraints (correct me if I am wrong). I know how to implement everything apart from the constraint connections. How do I connect the particles in a way that works for any drawing and keeps the object's rigidity. A naive approach be to connect every particle to every other particle but that would suffer from performance issues. How did you implement it?
So few nodes! Unity's ML Agents default configuration is 2 layers of 128 nodes, I dont understand why it uses so much, maybe something related to reinforced learning?
Could you just tell me how you manage to get smooth animations and beautiful styles in the game? Do you use any specific library to apply the styles?@@PezzzasWork
I always found these systems fascinating, adding noise made me wonder about one thing: what if there was noise on the neurons themselves? In the real world neurons live in a chaotic systems too, so it stands to reason that there'd be sources of noise there too.
If you have the network exert a fixed amount of force or not in a bang-bang manner rather than getting to directly control speed (which is not very physically realistic) and don't expose the angular velocity, you'll have a harder task on your hands. In particular, without some kind of memory mechanism (recurrence, LSTMs, something like that), the network probably won't be able to solve the position-only input variant.
awesome video man, the graphics are super beautiful as always. you inspired me to make a network of my own, what sources did you use to learn the intricacies of the architecture? i understand the general flow but wouldn't know when at what rate should i add connections or nodes. thanks 😄
Thank you! I did use the original paper a lot and then tweaked things a bit to feet my needs. In the end these parameters have quite a lot of flexibility, there is a wide range of possible values that can lead to good results. In this case I used 5% chance to create a new node and 50% chance to create a new connection.
In theory I understand training AI, however what software do you use? Where do you write logic? How do you get an image output? How do you offload the work to a GPU for faster matrix processing? Interesting stuff, nonetheless. Great video!
What would be neat is to take an AI model that has been trained in realist physics and see if it can be applied to balance a real-world physical pendulum. There are forces and things in real-world physics that you cannot account for in a software simulation. For example, there are electrical forces, such as wire resistance, with the electric motor that drives the cart. The friction forces of the rail and the cartwheels, forces of wind if the balance operation occurred in an outside windy environment, and more. It would be fun to build something like this and train a model to control a real-world pendulum!!
This is amazing! I can actually understand how to create my own system if I wanted. Unlike some videos which don’t succeed at telling us in an understandable way.
Hey, amazing video, I was wondering how did you manage to get all the pendulums moving. I'm trying to implement this myself and like 90% of the pendulums just go to a stop seconds after I run it
Really cool video, thank you! This is an really interesting sub topic of ML, especially with such simple networks. Im wondering how it would play out, to create some intermediate game ai, which handles some decisions with this sort of mechanisms instead of a huge load of switch/if/else shenanigans. Obviously not driven fully by it for performance reasons, but in an assisting way. Btw, can you add the used resources (wiki/paper links) to the description? I would appreciate it. Thank you!
This was again an awesome and beautifully visualised video, just like I'm used from this channel. I'd love to be able to program something like this. If you were to make a more detailed tutorial that we can follow along with the videos and description I believe many people might benefit from this. Is your code open source? Thanks a lot for your awesome content!
Encore une super vidéo. Tu l'as codé dans quel langage ce projet? C'est quoi le cpu de la machine sur laquelle tu fais tourner le processus de sélection?
Very well explained! I wonder how the network would react to slight random fluctuations in the value of the nodes or just straight up removing nodes (How would it adapt?)
I really like the NEAT-algorithm and its variations. I've used them to find shapes for the unsolved mathematical problem called moving sofa. I got something similar to the currently known best solution in just a few dozen iterations. I wonder how this algorithm scales with more complex task on just a few inputs.
the double pendulum balancing problem should allow 2d movement instead of 1d to balance it because controlling 5 parameters with one output is just not feasible
after this video you convinced me to play around with neutral networks. i quickly found my first goal - make MNIST number recognition network. its my second day trying and the network consistently gets 30% error rate which really pisses me off, this must be because i did not use any libraries and slapped it together on a Unity C# project with a help of chat gpt. im planning to run network on a separate thread so i could test more variety of settings for the neural network. anyways if you are reading this, what would you suggest for me? im using traditional neural network with inputs of 784 hidden layer 128 hidden layer 32 output layer 10 and learning rate of 0,0005 in each epoch it eats 60k images after running first half of first learning epoch it shows 25-30% error rate, after second epoch error rate tends to move closer to 50% which is weird, i tried making learning rate smaller but that requires lots of time too
why is it that most youtubers that make "ai learns how to walk run..." using this method just feel like the ai makes every mistake possible to later avoid them, and if one very minor thing changes in the ai character (leg lenght, weight..) or in its environment, (stairs changing sides, extra cube..) they have to relearn every thing like a newborn instead of keeping the knowledge of how to walk
The domain is much bigger for "training an AI to walk" with many more inputs and outputs and, typically, an enormous amount of valid states for the network to learn.
Cool video! Btw, do you use Godot or some other engine? If though, how to calculate physical interactions in seconds? Because usually it is 1 scene with fixed speed of time, and to calculate all those ai decisions everything should be sped up and without graphics
how does the NEAT method you use use the reward function to optimise the network? Is that is a feature inherent to the NEAR method, or is it relying on extra work?
My implementation is a simplification of neat but the global principle is the same and the reward function is just there to drive the random operations toward better solutions by introducing a biais for better agents, at the core of the algorithm there almost only random things happening.
Please reply to this comment, I would like to know if this game was created in C++ and sfml How did you make the game have this beautiful interface, with nice styles and smooth animations?
I wanted to do the same (create my own evolution neural network) for a long time and you gave me the motivation to ! Thank a lot Your video is really great ! Love it ! I have one question, on my side I have one issue. Network are get over complexed really fast, creating many neurons in fact not necessary. How did you managed this ? Do you decrease the chance to create a new neuron depending on the current number ? Do you take the size of the network in account when scoring ? Or maybe you didn't have this issue ! If anyone have an idea about it, I take it ! (I resolved the issue by decrasing the score depending on the network size, but I'm not feeling this is a good way to solve it)
By the metric of calculations/time, this may be less efficient than networks that can use matrix math. However, as you are achieving so much with much fewer nodes, I wonder if this will ultimately surpass the matrix math version.
Nice video my friend. I would stay around for the seconds parts guys, exciting things ahead ;)
fr
BASED
I could be insane, but I would swear that a rooster just taught me AI.
He did, and a cock a doodle too!
Twist at the end: The rooster was itself an AI ...🤔
plot twist: it's a hen
The talking chicken is *slightly* cursed. It’s probably because only the beak is moving and it’s opening a bit too wide for my taste.
+ the balls like red things
hyper cursed tbh
and the balls 🤣🤣
Extremely distracting! I would prefer relevant scenes in a serious video.
I like the chicken. I find it charming :>
Since the controller can output an arbitrary cart speed every timestep, it is permitted more or less infinite acceleration. It would be interesting to see how they perform if the available acceleration, (or power, or whatever) is constrained to realistic bounds
That's actually pretty standard to alter into a categorical/discrete step.
I'm finally starting to recover from like 3 years of intense burnout as a software engineer, and watching your videos helps me remember why I got into this field in the first place. Looking forward to the next one!
He’s alive!
From a frenchmen to another, your accent has improved so much! Your videos are captivating as always.
yeah it's insane, I almost forgot that this is the same guy as 8 months ago...
Can't wait to see your next video 🙌🏾🙌🏾
Extremely excited for the next video! For some reason, AI training videos just scratch a certain itch so nicely
In the next videos I suggest including some articles, in the description, to delve deeper into the topics discussed. As I was searching for the sources for this project, I couldn't find them.
I love how you animated this! It looks so cool and made it easy to follow along
I do topological sorting, but then I cache all the pathways from input nodes to output nodes into lists. This way, instead of re-iterating the graph, I just do a for loop to iterate over lists of nodes instead of repeatedly recalculating paths. I haven't seen this technique used online but it makes training step much faster.
Yeah, that popped out to me as an immediate speedup opportunity. Just gotta make sure it's only valid while the topology of it doesn't change. (Maybe invalidate it in the "add node/connection" mutations)
Love your work Pezzza. You are a great inspiration.
I’ll binge-watch this rn
how do you binge a single 13 minute video?
@@ruolbu By rewatching it over and over again at 0.25x speed
Amazing
dedication
Finally ! I just love your content, i'm happy to see you again, also on my favorite topic
Very interesting video! The editing and animations are so nice and makes it easy to understand, and I was wondering, what software did you use to make them?
I love this channel. It's enjoyable to just watch cool coding stuff.
The first steps are always the hardest, so it might be good to show some actual code examples for them.
For anyone struggling in the future, this playlist, and this video specifically, was of great help for me when writing the topological sort algorithm. To be honest, I'd actually say that topologically sorting the graph is one of the hardest steps. ua-cam.com/video/cIBFEhD77b4/v-deo.html
Double pendulum should be fun. I wonder how good a solution it will be able to find. As an aside, can't you just use the raw pendulum height (summed per frame) as a fitness function?
I'll admit I wasn't as interested in this one as your other work, but your animation quality is *chef's kiss* such a good presentation
im trying to learn ML and DL by myself and find this super helpful, waiting for your next masterpiece
Really inspiring. Will be waiting to see the code! Great content :)
Great video! It's a very nice visual representation ... that must have been a ton of work!
This video is super nice man, waitin for the second part!
I can't wait to see what happens next with the double pendulum !
Love your videos and can't wait for the next one!
This is an absolutely wonderful video.
If I may provide some feedback;
It would be great if you could visually show how these mutations (5:47) are applied using the network chart.
When splitting an existing connection in two, do they share the same connections with their parents and children?
Do new connections have random weights?
Also, why does my hyperbolic tangent function provide values different from yours?
Your projects are amazing, and often very beautiful. I aspire to make software as good as this one day!
I did not expect you to say "double pendulum" and now you are leaving us on a cliff hanger like this :(
Hope next episode appears soon
Very neat (haha)! Also great classical controls problem!
Very nice the visual explanation
Great video! Hyped for the double pendulum :)
Thank you SOOOO MUCH!!!! I always wanted to do something like this, this will really help!!!
I love your videos ❤ ai is such an interesting topic and I'll watch part2 as soon as possible
inverted double pendulum sounds intense! looking forward to it. :)
the visualizations are epic
such a crime that one of the best youtubers in the tech space only has 138k views and only 34k views on this video after 7 days
Great video! Glad to see you again
Awsom video, cant wait for the second part
your graphics are wonderful what are you using? (Also great video im going to go play with this stuff now lol)
nice! it reminds me of the MarI/O video, it uses this algorithm too
I was wanting a video on machine learning!! It's from you aswell!
Are the mutations equally distributed between those 4 possibilities?
But some extra mutation decisions need to be made: where to insert a new node, which weight to change or where to add a new connection. Are these decisions also equally distributed?
Excellent content! Would love if you could compare a comparison between this and other RL algorithms like TD3, PPO, and SAC. Like how they would do solving the same problem
Thank you! I am actually working on this :)
Hi Pezzza. I have got a question for a physics rigid body particle simulation you made ages ago, and I am dying to know since you didn’t upload the source code and can’t find what I need anywhere else.
You have the feature where you are able to draw your own rigid bodies with the mouse. I believe the objects are composed of particles which are interconnected by constraints (correct me if I am wrong). I know how to implement everything apart from the constraint connections. How do I connect the particles in a way that works for any drawing and keeps the object's rigidity. A naive approach be to connect every particle to every other particle but that would suffer from performance issues. How did you implement it?
Great video! How are you animating the cart + pendulum as well as the visualization of the neural network as well as the graph?
This will actually help me so much in my new project
So few nodes! Unity's ML Agents default configuration is 2 layers of 128 nodes, I dont understand why it uses so much, maybe something related to reinforced learning?
The guy is back :D
Loved the UIs
I was literally about to work on a project of mine that requires AI, immaculate timing pezzza
Videos like these remind me why I got into this field. Man my job is sucking the soul out of me. Gotta do something about this.
soooo, now I want to watch the next video, it is so excited
That's an awesome video. Crazy good graphics! Mind giving us a hint on how you made them?
Thank you! I am using C++ and SFML, I will probably make a series of small tutorial to explain how I do this
@@PezzzasWork I´m waiting for it everyday. Thank you.
Could you just tell me how you manage to get smooth animations and beautiful styles in the game? Do you use any specific library to apply the styles?@@PezzzasWork
Super insightful! What tool are you using for animations?
I did create my own tool using C++ and SFML
I always found these systems fascinating, adding noise made me wonder about one thing: what if there was noise on the neurons themselves? In the real world neurons live in a chaotic systems too, so it stands to reason that there'd be sources of noise there too.
If you have the network exert a fixed amount of force or not in a bang-bang manner rather than getting to directly control speed (which is not very physically realistic) and don't expose the angular velocity, you'll have a harder task on your hands. In particular, without some kind of memory mechanism (recurrence, LSTMs, something like that), the network probably won't be able to solve the position-only input variant.
awesome video man, the graphics are super beautiful as always.
you inspired me to make a network of my own, what sources did you use to learn the intricacies of the architecture? i understand the general flow but wouldn't know when at what rate should i add connections or nodes.
thanks 😄
Thank you! I did use the original paper a lot and then tweaked things a bit to feet my needs. In the end these parameters have quite a lot of flexibility, there is a wide range of possible values that can lead to good results. In this case I used 5% chance to create a new node and 50% chance to create a new connection.
In theory I understand training AI, however what software do you use? Where do you write logic? How do you get an image output? How do you offload the work to a GPU for faster matrix processing? Interesting stuff, nonetheless. Great video!
What would be neat is to take an AI model that has been trained in realist physics and see if it can be applied to balance a real-world physical pendulum.
There are forces and things in real-world physics that you cannot account for in a software simulation. For example, there are electrical forces, such as wire resistance, with the electric motor that drives the cart. The friction forces of the rail and the cartwheels, forces of wind if the balance operation occurred in an outside windy environment, and more.
It would be fun to build something like this and train a model to control a real-world pendulum!!
Hurry up with the second part, I can't wait!
This is amazing! I can actually understand how to create my own system if I wanted. Unlike some videos which don’t succeed at telling us in an understandable way.
So after all these months in hiding, you've been secretly building Boston Dynamics Spot knock-offs 😂
Hey, amazing video, I was wondering how did you manage to get all the pendulums moving. I'm trying to implement this myself and like 90% of the pendulums just go to a stop seconds after I run it
Really cool video, thank you! This is an really interesting sub topic of ML, especially with such simple networks. Im wondering how it would play out, to create some intermediate game ai, which handles some decisions with this sort of mechanisms instead of a huge load of switch/if/else shenanigans. Obviously not driven fully by it for performance reasons, but in an assisting way.
Btw, can you add the used resources (wiki/paper links) to the description? I would appreciate it. Thank you!
So cool example! Can't wait to see how AI will handle chaotic pendulum ;)
This was again an awesome and beautifully visualised video, just like I'm used from this channel.
I'd love to be able to program something like this. If you were to make a more detailed tutorial that we can follow along with the videos and description I believe many people might benefit from this.
Is your code open source?
Thanks a lot for your awesome content!
Encore une super vidéo. Tu l'as codé dans quel langage ce projet? C'est quoi le cpu de la machine sur laquelle tu fais tourner le processus de sélection?
Merci ! J’utilise le C++ pour tous mes projets et le CPU de mon pc c’est un I7-12700K
Waiting for the next one!
Very well explained! I wonder how the network would react to slight random fluctuations in the value of the nodes or just straight up removing nodes (How would it adapt?)
Waiting for the next video!
Congratulations for the video! Could you please tell me which software you use to build the animations ?
Thank you! I am using a C++ tool I wrote myself
Nice work! Is it possible that you publish this project would very interesting to read the code.
It is planned, I am currently cleaning the code
@@PezzzasWorkThanks
excelent video. I learn a lot. Do you have any video where you explain the code?
Very neat video
The pendulum visualization looks really nice and tactile. Is it custom made, or was there some library/framework involved?
It's all custom made using C++ and SFML
That's amazing. I really like what you have done here. Can you share some of the code used in this video? It would be appreciated.
I really like the NEAT-algorithm and its variations. I've used them to find shapes for the unsolved mathematical problem called moving sofa. I got something similar to the currently known best solution in just a few dozen iterations. I wonder how this algorithm scales with more complex task on just a few inputs.
the double pendulum balancing problem should allow 2d movement instead of 1d to balance it because controlling 5 parameters with one output is just not feasible
Hi, do you have a Computer Science background? Great video! :D
Thank you! Yes I have a master degree in computer science
@@PezzzasWork that’s amazing!!! Hope to see more great CS content like this. Keep it up 💪🏻
Thank you!
after this video you convinced me to play around with neutral networks.
i quickly found my first goal - make MNIST number recognition network. its my second day trying and the network consistently gets 30% error rate which really pisses me off, this must be because i did not use any libraries and slapped it together on a Unity C# project with a help of chat gpt.
im planning to run network on a separate thread so i could test more variety of settings for the neural network.
anyways if you are reading this, what would you suggest for me?
im using traditional neural network with
inputs of 784
hidden layer 128
hidden layer 32
output layer 10
and learning rate of 0,0005
in each epoch it eats 60k images
after running first half of first learning epoch it shows 25-30% error rate,
after second epoch error rate tends to move closer to 50% which is weird, i tried making learning rate smaller but that requires lots of time too
That trippy music!
Thank you for a great video
Great video! as always!
im excited for the next video
How did you implement the visualization? It looks very nice. Thanks!
I am using C++ and SFML, I will create a series of tutorials to explain how I did as I have quite a lot of questions about it.
Yay he's back
why is it that most youtubers that make "ai learns how to walk run..." using this method just feel like the ai makes every mistake possible to later avoid them, and if one very minor thing changes in the ai character (leg lenght, weight..) or in its environment, (stairs changing sides, extra cube..) they have to relearn every thing like a newborn instead of keeping the knowledge of how to walk
The domain is much bigger for "training an AI to walk" with many more inputs and outputs and, typically, an enormous amount of valid states for the network to learn.
yes he uploaded
Cool video!
Btw, do you use Godot or some other engine? If though, how to calculate physical interactions in seconds? Because usually it is 1 scene with fixed speed of time, and to calculate all those ai decisions everything should be sped up and without graphics
Thanks! I am using my own simple engine :)
Very nice video, thanks for that
how does the NEAT method you use use the reward function to optimise the network? Is that is a feature inherent to the NEAR method, or is it relying on extra work?
My implementation is a simplification of neat but the global principle is the same and the reward function is just there to drive the random operations toward better solutions by introducing a biais for better agents, at the core of the algorithm there almost only random things happening.
That is fun! Good work
Please reply to this comment, I would like to know if this game was created in C++ and sfml How did you make the game have this beautiful interface, with nice styles and smooth animations?
I wanted to do the same (create my own evolution neural network) for a long time and you gave me the motivation to ! Thank a lot
Your video is really great ! Love it !
I have one question, on my side I have one issue. Network are get over complexed really fast, creating many neurons in fact not necessary. How did you managed this ? Do you decrease the chance to create a new neuron depending on the current number ? Do you take the size of the network in account when scoring ?
Or maybe you didn't have this issue !
If anyone have an idea about it, I take it !
(I resolved the issue by decrasing the score depending on the network size, but I'm not feeling this is a good way to solve it)
Great video as usual :D
By the metric of calculations/time, this may be less efficient than networks that can use matrix math. However, as you are achieving so much with much fewer nodes, I wonder if this will ultimately surpass the matrix math version.
cant wait for part 2 🙂
same
I feel like I've learned more in this video than in 5 hours of reading. Will you also talk about other learning algorithms?
Yes I will explore other methods!
What is the best compiler for a code made in Scratch?