Reinforcement Learning-based Snake Game

Abstract

This project reimagines the classic Snake Game with exciting twists, combining nostalgic gameplay, modern AI training techniques, and retro-style visuals. It features a vibrant and engaging experience where players control a snake to eat food, grow in size, and avoid obstacles. Unique elements like red food that increase your score and yellow food with penalties add strategic challenges. The game offers multiple modes, including a traditional play mode, an AI training mode where a Deep Q-Learning Agent learns to play through trial and error, and a challenge mode with added complexities. The AI leverages a neural network to make decisions, improving over time and showcasing its progress through real-time graphs. A retro-inspired menu enhances usability, allowing players to switch between modes seamlessly. Additionally, the game tracks and saves progress for both players and the AI, ensuring sessions can be resumed anytime. With its lively graphics, immersive sound effects, and innovative AI integration, this project blends fun, learning, and nostalgia into a single, user-friendly package.

Country : India

1 Dr. Lokesh Jain2 Vasant Kumar

  1. Associate Professor, Department of IT, Jagan Institute of Management Studies, Rohini, Delhi, India
  2. Department of IT, Jagannath University, Haryana, India

IRJIET, Volume 8, Issue 12, December 2024 pp. 98-101

doi.org/10.47001/IRJIET/2024.812014

References

  1. Reinforcement Learning Concepts: Sutton, R. S., & Barto, A. G. (2018). Reinforcement Learning: An Introduction (2nd Edition). MIT Press.
  2. Deep Q-Learning: Mnih, V., Kavukcuoglu, K., Silver, D., et al. (2015). Human-level control through deep reinforcement learning.
  3. Game Development: Pygame: For creating the Snake game interface. Pygame Documentation: https://www.pygame.org/docs/
  4. Visualization Tools: Matplotlib: Hunter, J. D. (2007). Matplotlib: A 2D graphics environment. Computing in Science & Engineering, 9(3), 90–95.
  5. Learning from GitHub Projects: Various GitHub repositories related to snake game AI or reinforcement learning served as references for structure and implementation patterns:
  6. OpenAI Gym: Brockman, G., Cheung, V., Pettersson, L., et al. (2016). OpenAI Gym. arXiv preprint arXiv:1606.01540.