Coder Social home page Coder Social logo

snakeia's Introduction

snakeIA

Based on the famous game : "Snake".

I incorporate an IA who learn how to game snake and get better creating a strategy.

Prerequisites

It's imperative to have python3. Update your python version here

We need to install some external libraries like pygame, pytorch for the game. So, depending your operanting system, there are different ways to install them

Windows

Open a cmd, and enter the following command

pip3 install pygame ipython matplotlib

For pyTorch, you can download it from the offical web site here.

pip3 install torch torchvision

Mac

Open a terminal and do the following command in case you DON'T have pip

curl https://bootstrap.pypa.io/get-pip.py

And then, we install the external libraries

pip3 install pygame torch torchvision matplotlib ipython

Linux

For DEBIAN based distribution :

sudo apt-get install python-pygame

For ARCH based distros :

pip3 install pygame

Then, We install the rest of libraries

pip3 install torch torchvision matplotlib

Snake Game AI

First, we have to download the repo by

git clone https://github.com/napoknot21/snakeIA.git

Then, we enter to the cloned directory

cd snakeIA

Finally, we run the agent.py file and enjoy the show !

The projetc is based on python3, so if you have other versions, update your python version !

python3 agent.py

Game

If you only want to get fun and game to snakegame, well there's a file for that ! so run

python3 snake_game.py

Made by Napoknot21 (C. M-A)

snakeia's People

Contributors

napoknot21 avatar

Stargazers

 avatar

Watchers

Kostas Georgiou avatar  avatar

Forkers

hiraertin

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.