MATLAB-Reinforcement-Learning-Pendulum icon indicating copy to clipboard operation
MATLAB-Reinforcement-Learning-Pendulum copied to clipboard

Q-Learning pendulum swing-up problem with animation as it's learning.

Reinforcement learning example in MATLAB

Q-Learning Pendulum Swing-Up

Learn a control policy to optimally swing a pendulum from vertical down, to vertical up with torque limits and (potentially) noise. Both the pendulum and the policy are animated as the process is going. The difference from dynamic programming, for instance, is that the policy is learned only by doing forward simulation. No knowledge of the dynamics is used to make the policy.

Video

https://www.youtube.com/watch?v=YLAWnYAsai8