Neuroevolution: How to Stop a Double Pendulum

Опубликовано: 24 Апрель 2026
на канале: Richters Finger
5,080
141

Reupload since one of the panels showed the wrong data [1].
See also the source code+demo: https://github.com/RichtersFinger/ne_... .

0:00 regular double pendulum
0:20 result after 10'000 generations
0:40 comparison with intermediate results

The popularity of neural networks has risen rapidly over the recent years. Similarly, the broadness of their deployment has increased as well. Here, a very basic neural network (with a single hidden layer of 40 neurons) is used to solve a simple common task from control engineering, i.e. stopping the motion of a, in this example, double pendulum as fast as possible by appropriately moving the suspension driven by some motor.
The double pendulum is a physical system well-known for its property to generally oscillate in a chaotic manner and therefore constitutes an interesting candidate for testing. The output of the neural network then determines the suspension's acceleration based on the pendulum's current position in the phase space as well as the position and velocity of the suspension. The motor is limited by both the maximum acceleration it can achieve and the space it can move in.
The network's weights have been fitted to minimize the average total energy relative to the initial energy in a given amount of time with an evolutionary approach [2].

[1] Original video:    • [Erroneous - see description] Neuroevoluti...  
[2] K. O. Stanley et al., "Designing neural networks through neuroevolution", Nature Machine Intelligence 1, 24 (2019).