This repository contains code for a SARSA reinforcement learning agent using tiled Q-tables for solving the Cart Pole problem.
The agent can be run with Python. Follow the below steps to get started.
It is recommended to create a Python virtual environment when installing the dependencies. This can be done as follows:
python3 -m venv env
Then, activate the virtual environment
source env/bin/activate
Finally, install the requirements from requirements.txt
:
pip install -r requirements.txt
The entrypoint of the program is in main.py
. This is also where all parameters
are kept. Feel free to change these in order to achieve as good results as
possible.
To start the agent, run the following command:
python main.py
This will output the maximum score reached every 100th iteration. When the training terminates, the score for each iteration is plotted.