This project implements Q-Learning and Deep Q-Learning (DQN) agents on two environments from the RL Gym library: FrozenLake and Atari Pong.
The goal is to explore reinforcement learning techniques and understand the impact of key hyperparameters.
- Frameworks: Gymnasium, NumPy, PyTorch
- Environments: FrozenLake, Atari Pong
- Parts:
- Q-Learning on FrozenLake
- Policy Iteration on FrozenLake
- Deep Q-Learning (DQN) on Atari Pong
-
Clone the repository
git clone https://github.com/your-username/reinforcement-learning-q-dqn.git cd reinforcement-learning-q-dqn
-
Install dependencies
pip install gymnasium[box2d,atari] numpy matplotlib torch
-
Run FrozenLake notebook
jupyter notebook frozenlake_q_learning.ipynb
-
Run Atari Pong DQN notebook
jupyter notebook atari_pong_dqn.ipynb
- Q-Learning agent for FrozenLake with:
- Learning rate (
alpha
) - Discount factor (
gamma
) - Exploration rate (
epsilon
)
- Learning rate (
- Policy Iteration implementation for FrozenLake
- Hyperparameter experiments with 3+ values per parameter
- Deep Q-Learning (DQN) agent for Atari Pong using a neural network
- Training and evaluation visualizations
Environment | Algorithm | Performance Highlights |
---|---|---|
FrozenLake | Q-Learning | Learned to reach the goal with tuned epsilon, alpha, gamma |
FrozenLake | Policy Iteration | Faster convergence vs Q-Learning |
Atari Pong | Deep Q-Learning | Neural network agent learned to play Pong; improved performance over episodes |
โ Deep Q-Learning showed promising results in a complex visual environment.
- Understanding Q-Learning and Policy Iteration fundamentals
- Exploring the role of hyperparameters (
alpha
,gamma
,epsilon
) - Applying deep learning to approximate Q-values
- Handling high-dimensional input in Atari games
- Visualizing and interpreting RL training performance
ยฉ 2025 Anamol Khadka. All rights reserved.
This work is licensed under the Creative Commons Attribution 4.0 International (CC BY 4.0) license.
You are free to share and adapt the material for any purpose, even commercially, as long as appropriate credit is given.
For inquiries, please contact: khadkaanamol8@gmail.com