This repository contains implementations of reinforcement learning algorithms for the PyRace environment, a 2D racing game.
-
Q-Table Approach: Traditional RL with discretized state space
- File:
Pyrace_RL_QTable.py
- File:
-
Deep Q-Network (DQN) Approach: Modern deep RL implementation
- File:
Pyrace_RL_DQN.py - Details: See DQN README
- File:
The custom PyRace environment is a 2D racing game where an agent learns to navigate a track. It's implemented as a custom Gymnasium environment in the gym_race package.
Install all dependencies using:
pip install -r requirements.txtpython Pyrace_RL_QTable.pypython Pyrace_RL_DQN.pyYou can modify these files to:
- Train a new model
- Continue training from a saved model
- Play using a trained model without further learning
Both implementations allow for:
- Training from scratch
- Loading a saved model and continuing training
- Loading a saved model to play without learning
See the respective files for instructions on how to switch between these modes.
This project is part of the Reinforcement Learning course.