Skip to content

Train agents to play snake using techniques from reinforcement learning. Tabular Q-learning and Value Function Approximation are implemented (using a simple Neural Network) in Python.

Notifications You must be signed in to change notification settings

areevesman/reinforcement-learning-for-snake

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

52 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Reinforcement Learning for Snake

The code in this repository is used to train agents to play snake using techniques from reinforcement learning. Tabular Q-learning and Value Function Approximation are implemented (using a simple Neural Network).

Prerequisites

  • pygame
    • python3 -m pip install -U pygame --user

Setup

  • Clone the repository: https://github.com/areevesman/reinforcement-learning-for-snake.git
  • cd reinforcemt-learning-for-snake
  • cd code
  • To play snake:
    • python play_snake.py
  • To train a snake with Q-learning:
    • python train_q_learning.py
  • To train a snake with VFA:
    • python train_deep_q_learning.py
  • Training output will be saved to a results folder in the working directory

Authors

  • Adam Reevesman
  • Evan Liu

Acknowledgments

About

Train agents to play snake using techniques from reinforcement learning. Tabular Q-learning and Value Function Approximation are implemented (using a simple Neural Network) in Python.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages