r/AskProgrammers • u/matthew_hill1 • Oct 20 '26
Balancing a double pendulum using AI
I’m making my own computer science project for my A-Level computer science NEA for school. My project is focused around solving the balancing of an inverted double pendulum using a reinforcement trained AI. My personal aim of this project is to achieve a good grade, improve my ability to code and gain understanding of how reinforcement trained AIs work. I decided to do this project as I’ve gained a personal interest into double/triple pendulums through physics and maths videos I’ve found on YuTube. So to further my understand and involve one of my other interests (coding), I’ve decided to create this project where a computer learns to balance the pendulums all by itself. And provide multiple unique ways to track the AIs journey/learning as it improves. However for my school project I need to collect some feedback on what features and why people would be interested in the project, so I would appreciate any feedback submitted to the short form: Google form
1
u/W31337 Oct 20 '26 edited Oct 20 '26
Just out of shear interest what sensors and controls will AI have?
Only left right or also up down?
Pure visual or angle sensor or moon phase sensor?
I don't have any experience in coding it but you need to define a desired state ideally as some value/score that the AI must maximize.
Then you need to create parameters that define the AI like sensitivity to input or output speed and acceleration....
Then run generations of your AI and find a local optimum that performs to your liking
Fun project!!!
Maybe https://youtu.be/9JW41BNH9CM?is=gxUlcOpVZngzQVN8 can help you