snake-rl

My Concordia Honours Project (COMP 490)

https://github.com/fredpell1/snake-rl

Science Score: 44.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (10.6%) to scientific vocabulary
Last synced: 10 months ago · JSON representation ·

Repository

My Concordia Honours Project (COMP 490)

Basic Info
  • Host: GitHub
  • Owner: fredpell1
  • Language: Jupyter Notebook
  • Default Branch: main
  • Size: 1.98 MB
Statistics
  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • Open Issues: 0
  • Releases: 0
Created over 3 years ago · Last pushed about 3 years ago
Metadata Files
Readme Citation

README.md


COMP 490: Honours Project 2023

Deep Reinforcement Learning for Snake
Link to (unpublished) paper »

Table of Contents
  1. Welcome
  2. Installing Dependencies
  3. Environment
  4. Models
  5. Training
  6. Testing and Demo

Welcome

My Concordia Honours Project, supervised by Dr Frederic Godin. The purpose of this project was to first apply proven Deep Reinforcement Learning techniques to the game Snake. A secondary goal was to empirically study the impact of the neural net's architecture on performance.

Installing Dependencies

  • python -m pip install -r requirements.txt (if you use pip and venv)
  • conda install --file requirements.txt (if you use conda)

Environment

The environment is implemented with PyGame, gym, and numPy. The source code can be found here.

Models

Several models/approaches were tried, namely TD($\lambda$) learning with Neural Networks, Deep Q-Learning with a feedforward neural network, and Deep Q-Learning with experience replay and with CNNs. You can find the hyperparameters of these models in the config folder and the implementation here.

Training

Each model was trained for 50 000 games. The code can be found here and here.

Testing and Demo

The successful models were then tested for 50 games. You can see the results here. There's also a CLI to run the model in training, testing, or demo mode.

Owner

  • Name: Frederic Pelletier
  • Login: fredpell1
  • Kind: user

Currently pursuing a Bachelor of Computer Science with Honours at Concordia University

Citation (CITATION.cff)

# This CITATION.cff file was generated with cffinit.
# Visit https://bit.ly/cffinit to generate yours today!

cff-version: 1.2.0
title: SnakeRL
message: >-
  If you use this software, please cite it using the
  metadata from this file.
type: software
authors:
  - given-names: Frederic
    family-names: Pelletier
    email: fredericpelletier7@gmail.com
repository-code: 'https://github.com/fredpell1/snake-RL'
url: 'https://github.com/fredpell1/snake-RL'

GitHub Events

Total
Last Year

Dependencies

.github/workflows/formatting.yml actions
  • actions/checkout v2 composite
  • rickstaa/action-black v1 composite
  • stefanzweifel/git-auto-commit-action v4 composite
requirements.txt pypi