Reload for another initial condition. I randomize the angles that the pendulum is initially positioned at. The code does glitch out sometimes. Follow this tutorial here if you want to make something similar.