Deep Q Snake with PyTorch

This project explores the application of Deep Q-Learning to classic game environments. Specifically, I implemented a Deep Q-Network (DQN) using PyTorch to train an AI agent capable of mastering the Snake game, a benchmark environment for reinforcement learning.

To create a controlled and customizable environment, I developed the Snake game from scratch using Pygame, enabling full control over game mechanics and reward structures. The agent learns optimal strategies through trial and error, gradually improving its performance using Q-learning with experience replay and target network updates.

In parallel, I applied foundational MLOps practices to monitor the training process more effectively. This includes the integration of custom plotting functions that allow for real-time visualization of performance metrics such as reward progression and loss curves, aiding in both debugging and model optimization.

This project not only demonstrates how reinforcement learning algorithms can be implemented from scratch, but also how they can be made more robust and interpretable with good engineering practices.