Learning to Swing Up and Catch

I developed PyTorch reinforcement-learning agents for single-pendulum swing-up and stabilization. The controller separated the energy-building swing from the final catch, with reward functions tailored to each stage. This made the transition into upright balance a central part of policy design.

The experiments compared discrete and continuous-control methods, including DQN, DDPG, and PPO, with training curves and trajectory visualizations used to diagnose behavior.

Simulation Results

The reported single-pendulum runs achieved 100% swing-up and stabilization success under ideal conditions and 90% under noisy conditions over 30-second simulations. The broader project also stabilized a double pendulum, although model-free swing-up remained unresolved.

Single-pendulum swing-up from rest

Single-pendulum swing-up under noisy conditions

Double-pendulum stabilization

Source code and project notes (Chinese)