yr4000 / Slither-ML-bot

4 stars 1 forks source link

Slither-ML-bot

In this project we attempted to create a machine learning model to learn the slither.io game. We explored and implemented differented technics which you can inspect in this code.

For further information, it is recommended to read the mini-article and the bot manual.

Table of Contents

Prerequisites and Installation

To install the bot please follow the "README" of the original bot: https://github.com/ErmiyaEskandary/Slither.io-bot, Then please follow our bot manual to install our javascript code.

Usage

To run the bot execute the following programs in the order presented:

Machine Learning Modes

There are three possible machine learning modes implemented in this project. you can switch between them by pressing 'M'.

Possible bug

The function getMyScore extracts an information from a div element, which in most browser is the 17th child of the body element. If that's not the case on your local browser, you will see when you run the DQN model that the average score per epoch is always 10. simply switch the index from 17 to 16, or use the developer tools to debug it.

Have fun!