FahimeMirveisi / AI_Snake

Classic snake game with machine learning

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

AI_Snake (Implemented with ML)

Classic snake game with machine learning

MY Snake

Description

This is a project to train a neural network to play the game snake. The neural network is trained using MLP algorithm. This project is written in python and uses the arcade library for the game.

How to install

pip install -r requirements.txt

How to run

  1. Collect data and generate dataset
python generate_dataset.py

Press 'Q' on keyboard to stop collecting data and save collected dataset.

  1. Train neural network
python train.py
  1. Play game
python main_ml.py

Loss and accuracy

MY Snake MY Snake

About

Classic snake game with machine learning


Languages

Language:Python 100.0%