Reinforcement Learning.
Project overview and inspiration.
This project's main inspiration was from watching OpenAI's videos on how a reinforcement learning was used to train an agent to conquer a game environment. I then decided to learn, code and train a machine learning model using reinforcement learning to solve CartPole AI, one of OpenAI's environments!
How it operates.
Mentioned previously on the use of reinforcement learning, reinforcement learning is the process by which a machine learning algorithm is trained based on rewards and punishment acquired overtime which is done through using the Markov Decision Process. The agent operates by obtaining optimal rewards from the actions the agent takes given a certain state. The state being frames obtained from the game, the actions being actions the agent can take which are moving the cart left or right and the rewards are based on whether the pole falls of the cart or not. If the pole falls off the cart, it gets a negative reward. If the pole does not fall off the cart, the agent obtains positive rewards for the duration that the pole remains stable and doesn't fall of.
How to install.
How to run and install the code can be found here
Future work.
Future project involves using a much more complex variation of reinforcement learning known as deep rainforcement learning which uses a combination of reinforcement learning and deep learning to solve an environment!
Tools used.
- Python code base.
- Open AI environments.
- Pytorch.
- OpenCV.
- Numpy.