Regarding period selection: instead of choosing random real numbers, choose a random natural multiple of the base period (2, 5, 15, etc.). This will ensure all movements are synchronised within the desired timeframe. Finally, regarding the selection of an alternate function: because your solution is defined to be periodic, Fourier proved that any solution will be of the form of a summation of sine waves scaled and shifted across all frequencies. As such, you could simply include more sinusoids at higher frequencies for each DoF.
Great ideas! Using integer multiples seems obvious looking back now. I had planned on adding more sine waves for each dof but never got around to it. I was toying with the ideas of either having a set number of waves for each dof or having a set number for each solution and control what dof each one corresponds to in the genes.
put rear-most leg into soft contact with ground, lift front up fully so it pivots up on the rear legs, lower rear to contact frame, drop front. repeat. is basically falling forwards by altering the pivot points. It's not generational learning, but I wonder if it's learned forwards speed can physically surpass that basic movement sequence? (It has to not bind it's gantry while doing it obviously)
Thanks I’ll keep that in mind. In the sim I didn’t actually have multiple robots running in parallel or spawn/despawn new bots. I just ran a solution on the one robot, noted how far it went, then tried the next solution on it. All of the starting, stopping and recording distances was in a ros2 node that would send joint positions to the robot in gazebo. I’ll try to get all the code together and make it public if anyone would be interested in that.
Nice project ! I think a couple good changes would be, - Add rubber ' feet' the lack of traction seems to be hurting the performance. - perform the tests for more iterations with perhaps a larger population? I'm not sure what your population size was but most videos I watch on these topics have between a 100 and 1000 members and test for 1000 to 10 000 iterations. If you do plan on testing, in simulation, what geometry would be best, you should combine that with finding the optimum gate. As geometry and gate would be linked. This will increase simulation complexity however. If you can perform these simulations on a campus computing system, I would suggest that. Looking forward to your next video on this!
Thank you! I ended up using a population size of 30 for most of the simulations. Increasing that and the number of generations would be great, but I'll have to improve the code and maybe use a faster computer for that.
Nice project. Rubber pads in the legs contact surface may allow for greater speeds... Shifting the wave form towards the ground may reduce 'no contact' time... Using NEAT to 'punish' unwanted behaviours (long no contact times, wrong movement direction, etc) may generate better solutions...
Very cool! How did you generate the footage of multiple bots at once? (eg. at around 7:12) I'd be very keen to see how you go if you decide to optimize for geometry as well as gait. I also wonder how modifying the friction between the legs and the ground would affect the speed 🤔 From the footage at the end (eg. 16:33), it looks like there's quite a bit of slipping, though it's difficult to know whether that helps or hinders the movement. Keep it up!
Thank you! To animate the multiple bots, I had all their joint positions, pose data, generation numbers, and other topics saved to a bag file while the sim ran. Then I had a python script that could get that data and set keyframes for my model in blender (the animation software) Good eye on noticing the slipping. I have rubber feet on the base which makes its friction much higher than the arms. I think it helps on the gaits it found but I agree trying different friction values could be interesting. Maybe having every other arm be grippy or some other combination could have good results.
@@harrisonlow I don't know of any way to import them with mates. I imported STLs that I used for 3d printing and modeled some of the other components in blender.
Perhaps designing a sequence of stages with different constraints on evolution would yield interesting results - for example, if you first ran several generations with the fixed sine wave phase, then took the best offspring as starting points for another several generations in which the phase is allowed to vary, and maybe another factor is locked instead. Different orders of the same constraints could lead to wildly different solutions - it would basically be a genetic algorithm of genetic algorithms, simulating a slowly changing environment... From that last thought, I wonder if the specific constraint changes could also be determined algorithmically in a way that simulates each generation's impact on the environment...
Great video! Really enjoyed this project. Curious what your background is? Did you have much programming experience or previous genetic algo experience before beginning this? How long did this all take you?
I really like the video and how you explained everything really easily. If I wanted to learn how to create a walking robot on my own where would I start?
Thank you! If you don’t have experience with electronics yet I’d start with an arduino project. There’s a ton of simple projects with great tutorials out there. If you want a bit more challenging project or are interested in my robot specifically, keep an eye on my channel as I’m planning on releasing all the files for this project soon.
It would be interesting to see if replacing the basic sine wave with a Fourier series of maybe 5 terms would yield better results. This emulates the nature of real-world gaits well, which are usually periodic and smooth, but not quite sinusoidal.
JD Robotics, Such a cool project! I am a fan of genetic algorithms myself, have you taken a look at Real-Coded Genetic Algorithms (RCGAs)? They are similar to Binary-Coded Genetic Algorithms (BCGAs) but use real values in their genes instead of binary. There are a handful of cool crossover events as well that you can do with real values. I don't know if it would have changed the results of your simulations but if you are ever interested it could be fun to see the difference in effectiveness between the two types of genetic algorithms. I had initially brought this up to argue your crossover event. My thought was that representing floating point values with binary could cause crazy values to result when your crossover splits up a mantissa. This is not the case! I worked an example out to myself and it actually results in very reasonable values! I'll keep my comment here though just in case you have not seen RCGAs before! (And it would still be cool to see a comparison between RCGAs and BCGAs on a real bot), I have not done extensive work with comparing BCGAs and RCGAs so I do not know if there will be a difference if applied to the same problem. best, random internet commenter and new subscriber
Thanks! I actually started off with some sort of real-coded algorithm, I wasn't using any special types of crossover though, and my mutation would just randomize an entire parameter. Switching over to the binary-coded helped, but I also improved other things at the time, so it's hard to say how much. I'll have to look into how RCGAs handle crossover and mutation. I hadn't heard of them before, thanks for letting me know!
I think if you increase the number of generations, you will get better results. GA is very sensitive to local minimum and more generations give it the chance to escape from this through mutation.
Hey can you share a link to your code, this is perfect for me, i have built a worm/snake like robot that uses only 2 motors for x and y directions i'd like to see some optimum solution to it's motion
Imagine the horror of your stewart platform crawling in your room at night like a water bug lol.
😂😂😂
Regarding period selection: instead of choosing random real numbers, choose a random natural multiple of the base period (2, 5, 15, etc.). This will ensure all movements are synchronised within the desired timeframe.
Finally, regarding the selection of an alternate function: because your solution is defined to be periodic, Fourier proved that any solution will be of the form of a summation of sine waves scaled and shifted across all frequencies. As such, you could simply include more sinusoids at higher frequencies for each DoF.
Great ideas! Using integer multiples seems obvious looking back now.
I had planned on adding more sine waves for each dof but never got around to it. I was toying with the ideas of either having a set number of waves for each dof or having a set number for each solution and control what dof each one corresponds to in the genes.
Ah yes, the equivalent of performing jpeg compression on a large neural network
This is amazing. Great content. Can't wait to see more.
put rear-most leg into soft contact with ground, lift front up fully so it pivots up on the rear legs, lower rear to contact frame, drop front. repeat. is basically falling forwards by altering the pivot points. It's not generational learning, but I wonder if it's learned forwards speed can physically surpass that basic movement sequence? (It has to not bind it's gantry while doing it obviously)
Very impressive!
Thanks!
I'd be interested in seeing a tutorial on how you used gazebo. How did you enter your robot, duplicate your robots and simulate your robots?
Thanks I’ll keep that in mind. In the sim I didn’t actually have multiple robots running in parallel or spawn/despawn new bots. I just ran a solution on the one robot, noted how far it went, then tried the next solution on it. All of the starting, stopping and recording distances was in a ros2 node that would send joint positions to the robot in gazebo.
I’ll try to get all the code together and make it public if anyone would be interested in that.
@@JDRoboticsYes please
@@xenophobe3691Everything is public now! Join the discord if you have any questions or want to help!
Next step: The Robot Learns to make a partner
Very nicely put together video!
Nice project !
I think a couple good changes would be,
- Add rubber ' feet' the lack of traction seems to be hurting the performance.
- perform the tests for more iterations with perhaps a larger population? I'm not sure what your population size was but most videos I watch on these topics have between a 100 and 1000 members and test for 1000 to 10 000 iterations.
If you do plan on testing, in simulation, what geometry would be best, you should combine that with finding the optimum gate. As geometry and gate would be linked. This will increase simulation complexity however. If you can perform these simulations on a campus computing system, I would suggest that.
Looking forward to your next video on this!
Thank you!
I ended up using a population size of 30 for most of the simulations. Increasing that and the number of generations would be great, but I'll have to improve the code and maybe use a faster computer for that.
Nice project.
Rubber pads in the legs contact surface may allow for greater speeds...
Shifting the wave form towards the ground may reduce 'no contact' time...
Using NEAT to 'punish' unwanted behaviours (long no contact times, wrong movement direction, etc) may generate better solutions...
This is awesome.
It is very simmilar with explanation of evolution.
This video per se, is a masterpiece.
it needs shoes
This was so cool, very well explained
Very cool!
Very cool! How did you generate the footage of multiple bots at once? (eg. at around 7:12)
I'd be very keen to see how you go if you decide to optimize for geometry as well as gait. I also wonder how modifying the friction between the legs and the ground would affect the speed 🤔 From the footage at the end (eg. 16:33), it looks like there's quite a bit of slipping, though it's difficult to know whether that helps or hinders the movement.
Keep it up!
Thank you!
To animate the multiple bots, I had all their joint positions, pose data, generation numbers, and other topics saved to a bag file while the sim ran. Then I had a python script that could get that data and set keyframes for my model in blender (the animation software)
Good eye on noticing the slipping. I have rubber feet on the base which makes its friction much higher than the arms. I think it helps on the gaits it found but I agree trying different friction values could be interesting. Maybe having every other arm be grippy or some other combination could have good results.
@@JDRobotics Very interesting! If you don't mind my asking, how did you go about getting the CAD into blender (presumably with mates intact)?
@@harrisonlow I don't know of any way to import them with mates. I imported STLs that I used for 3d printing and modeled some of the other components in blender.
@@JDRobotics Interesting! Cheers for the reply 😊
Perhaps designing a sequence of stages with different constraints on evolution would yield interesting results - for example, if you first ran several generations with the fixed sine wave phase, then took the best offspring as starting points for another several generations in which the phase is allowed to vary, and maybe another factor is locked instead. Different orders of the same constraints could lead to wildly different solutions - it would basically be a genetic algorithm of genetic algorithms, simulating a slowly changing environment...
From that last thought, I wonder if the specific constraint changes could also be determined algorithmically in a way that simulates each generation's impact on the environment...
Superb content, great work
good job bro
also love your content
Great video! Really enjoyed this project. Curious what your background is? Did you have much programming experience or previous genetic algo experience before beginning this? How long did this all take you?
Good video 📸
Great video 👍
I really like the video and how you explained everything really easily. If I wanted to learn how to create a walking robot on my own where would I start?
Thank you! If you don’t have experience with electronics yet I’d start with an arduino project. There’s a ton of simple projects with great tutorials out there.
If you want a bit more challenging project or are interested in my robot specifically, keep an eye on my channel as I’m planning on releasing all the files for this project soon.
It would be interesting to see if replacing the basic sine wave with a Fourier series of maybe 5 terms would yield better results. This emulates the nature of real-world gaits well, which are usually periodic and smooth, but not quite sinusoidal.
Great idea!
maybe add sinewaves with difrent frequencies like in a forier transform
We did Q Learning
Great work! What software did you use for the simulation?
JD Robotics,
Such a cool project! I am a fan of genetic algorithms myself, have you taken a look at Real-Coded Genetic Algorithms (RCGAs)? They are similar to Binary-Coded Genetic Algorithms (BCGAs) but use real values in their genes instead of binary. There are a handful of cool crossover events as well that you can do with real values. I don't know if it would have changed the results of your simulations but if you are ever interested it could be fun to see the difference in effectiveness between the two types of genetic algorithms.
I had initially brought this up to argue your crossover event. My thought was that representing floating point values with binary could cause crazy values to result when your crossover splits up a mantissa. This is not the case! I worked an example out to myself and it actually results in very reasonable values! I'll keep my comment here though just in case you have not seen RCGAs before! (And it would still be cool to see a comparison between RCGAs and BCGAs on a real bot), I have not done extensive work with comparing BCGAs and RCGAs so I do not know if there will be a difference if applied to the same problem.
best,
random internet commenter and new subscriber
Thanks! I actually started off with some sort of real-coded algorithm, I wasn't using any special types of crossover though, and my mutation would just randomize an entire parameter. Switching over to the binary-coded helped, but I also improved other things at the time, so it's hard to say how much. I'll have to look into how RCGAs handle crossover and mutation. I hadn't heard of them before, thanks for letting me know!
Rather than do a simple sine wave, have you considered using a random noise pattern and then doing an inverse FFT to drive the servos?
I haven’t. That sounds interesting though I’ll have to look into it more
I think if you increase the number of generations, you will get better results. GA is very sensitive to local minimum and more generations give it the chance to escape from this through mutation.
Hey can you share a link to your code, this is perfect for me, i have built a worm/snake like robot that uses only 2 motors for x and y directions i'd like to see some optimum solution to it's motion
Everything is on github now!
take the sticks and table off.
or design a robot thats made for walking instead of uselessly tilting a plate.