This is a simple implementation of a reinforce agent for the CartPole-v0 environment. The agent is implemented in the reinforce object file. The train.py
file contains the main loop for training the agent.
To train the agent, run the following command:
python train.py --n_episodes [NUMBER_OF_EPISODES] --model_path [MODEL_PATH]
The following plot shows the results of the agent after 10000, 50000 and 100000 episodes of training:
This project is not affiliated with OpenAI in any way. OpenAI, OpenAI Gym, OpenAI Baselines, OpenAI Spinning Up, and the OpenAI logo are trademarks or registered trademarks of OpenAI, Inc. in the United States and other countries.
If you have any questions, feel free to contact me at contact@baptistesauvecanne.fr.