Predicting Chaotic Systems

One of the coolest things about modern artificial intelligence is its ability to predict and extrapolate. I played around with this to create a program that would model the motion of a double pendulum, one of the most famous chaotic systems.

 

The double-pendulum system is a famous example of a chaotic system, which refers to physical systems where changing the initial positions of the objects affects the results a lot. I created an LSTM (long short-term memory) network that predicted the position and velocity of the two pendulums after an arbitrary number of timesteps in a simplified version of the double-pendulum system. This project was coded in Python 3 with Pytorch and Tkinter. Read more about it below:

 

I also included an animation made with Tkinter to visualize our prediction. First it plays the motion that the equations for the double-pendulum system would predict, and then it displays our prediction.