The cart-pole balancing problem is a prototypical problem for reinforcement learning. A pole is attached to a cart with a rotating joint. An agent has to balance the pole by moving the cart left or right.
Most solutions in the internet seem to use reinforcement learning with complicated Keras model to solve this problem.
In this post, I will show that if you understand your system well enough, you don't need any deep-learning schemes. In the case of cartpole balancing, all you need is some rudimentary knowledge of mechanics.