Giter VIP home page Giter VIP logo

deep-snake's Introduction

Deep Snake

This repo is a adaptation of Deep Policy Networks to play the game of Snake. It has been coded in Python using Tensorflow. To get started, you can have a look at our iPython notebook.

Below is a short demo. Note that the Snake dos not eat the fruit in the first place to avoid being trapped and loose the game. Have fun !

  1. Setup

  2. Playing around

  3. Going further

Setup

You can find the requirements in the file requirements.txt. All coding files can be found in the snake folder.

Playing around

We implemented a simple snake envioronment (snake.py). To play it yourself and try to beat the best AI score, simply run

python demo_snake.py

We also implemented the policy network algorithm as described in our report in the file policy_gradient.py. You can try your own network structure (folder models). The pretrained weights are avilable in the weights folder (there is a warm_restart argument to the training function) and the output graphs are available in the graphs folder. To try our implementation, simply run

python demo_policy.py

Going further

The detailed theoretical explanations, the setup parameters and experimental results can be found in the report folder.

deep-snake's People

Contributors

louismartin avatar pierrestock avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

Forkers

pierrestock

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.