top of page

Create Your First Project

Start adding your projects to your portfolio. Click on "Manage Projects" to get started

Snake Game using Reinforcement Learning

Project type

Reinforcement Learning

Role

Programmer

Summary:

In this project, we explored reinforcement learning (RL) techniques by developing agents to play the classic Snake game. We implemented three different agents: DQN (with target network), Double DQN, and Curriculum Learning. The project demonstrated the effect of hyperparameter tuning and various network architectures. The agents were trained using a state representation vector of 11 features to guide their movements toward the food while avoiding collisions

Tools & Technologies:

• Programming Language and Tools: Python, PyTorch, Pygame
• Reinforcement Learning: DQN, Double DQN, Curriculum Learning

Key Contributions:

• Developed and evaluated RL models, including DQN with experience replay, Double DQN, and Curriculum Learning, in both 10x10 and 20x20 grids
• Integrated a distance-based reward function to optimize agent behavior, enhancing policy learning and performance
• Implemented batch training and compared performance across various configurations, achieving up to a maximum score of 61 in the 20x20 grid using DQN with a freeze target network

Results:

Curriculum learning yielded the best performance on smaller grids, while DQN with a freeze target network excelled on larger grids. These results provided insights into how RL techniques handle complex, dynamic environments like Snake

bottom of page