A pole is attached by an un-actuated joint to a cart, which moves along a frictionless track. The pendulum starts upright, and the goal is to prevent it from falling over by increasing and reducing the cart's velocity.
Before executing the program install the following dependencies-
1:)pip install gym 2:)pip install numpy
After installing open cmd and type python cartpole.py
initially it will try to reach the score of 200, but ofcourse you can change the amount of reward.