This repository is for the group project we did in CSCI 323. In this project, by referring to several guides, we implemented 3 reinforcement learning algorithm Q-learning, SARSA and DQN to attempt to train an agent to navigate OpenAI's Taxi-V3 environment. There are four files which includes a jupyther notebook for our code execution and 3 python programme which is the GUI to play with the 3 reinforcement learning algorithm we implemented.
In the Jupyther notebook, you will find the training rate and performance of all 3 different reinforcement learning algorithm.
Before running the program, ensure you have the following installed on your machine:
Python 3 Git
git clone https://github.com/Jin407/AI-Group-project
Alternatively, you can download the files directly from GitHub.
pip install -r requirements.txt
python3 Q-learning_GUI.py
python3 DQN_GUI.py
WARNING: DQN algorithm takes a while to run as the number of timesteps required to train our DQN agent is very large.
python3 SARSA_GUI.py
-
cd AI-Group-project
-
pip install -r requirements.txt
-
python3 Q-learning_GUI.py (To run Q-learning GUI)
-
python3 DQN_GUI.py (To run DQN GUI)
-
python3 SARSA_GUI.py (To run SARSA GUI)
Alternatively, you can download the programmes directly from Github and run them on your preferred IDE, the dependecies used in these programme include gym, gymnasium and stable_baselines3 so kindly ensure to pip install these packages before running the programme.
The GUI provide a way to edit the learning rate, discount factor and number of training episodes/timesteps of our reinforcement learning algorithm and see how it impacts the performance of our model.
Yong, K. S. (2023, February 3). Commentary: Singapore must clear the roadblocks for driverless cars. CNA. https://www.channelnewsasia.com/commentary/singapore-roadblocks-driverless-cars-autonomous-investment-benefits-risks-3249071 Bajo, P. L. (2022, March 9). Q-learning – Hands-on RL course – Part 2. Datamachines by Pau Labarta Bajo. https://datamachines.xyz/2021/12/06/hands-on-reinforcement-learning-course-part-2-q-learning/ Androz, G. (2022, March 30). Reinforcement Learning — Teach a Taxi Cab to drive around with Q-Learning. Medium. https://towardsdatascience.com/reinforcement-learning-teach-a-taxi-cab-to-drive-around-with-q-learning-9913e611028f Androz, G. (2022a, March 30). Deep Q-Learning with Pytorch and OpenAI-gym: The Taxi-cab puzzle. Medium. https://guandroz.medium.com/deep-q-learning-with-pytorch-and-openai-gym-the-taxi-cab-puzzle-e7a3028f732