Skip to content

jhy6219/Genetic-algorithm-walking-simulation

Repository files navigation

Simulation of the Physical Movement for Machine Learning with R

Recently, machine learning algorithms are used popularly in the engineering field, and simulation of the specific situation becomes one of the important processes. In this talk, we propose an environment for simulation of the physical movement in robots with R. We carried out the optimization of robot gait which is a major issue in the robotics area. As an optimization algorithm, GA (Genetic Algorithm) was used. In our physical simulation, we considered two options. The first option is about position and velocity when forces are applied to the body. We solved this dynamic equation of a robot's body placed in 2-dimensional space using the 3rd order Runge-Kutta method. The second option is for constraining the position and velocity when a body contacts the ground. The sequences of the robot's body position were visualized with animation package in R. This virtual robot has a body, and five parameters determine its walking trajectory. GA package in R was used to optimize these parameters. We successfully get some values that enable robots to walk steady and fast. Through this study, we expect simulation in robotics engineering area can be conducted with R as well.

New generations walk faster than old generations.

<1st generation>

walkingg1

<5th generation>

newwalkingg5

<20th generation>

newwalkingg20

<100th generation>

newwalkingg100

Did GA find the farthest walking robot? A red dot is distance of 100-generation robot for 5 seconds. Therefore, we reached the global maximum using Ga.

GIF

About

The presentation video is on YouTube below. (UseR!2019 conference in Toulouse)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages