This is a simple version of the classic game Snake, written in TypeScript and React, with the goal of extending it use a neural network to play the game.
Clone the repository and run npm install
to install the dependencies. Then run npm start
to start the development server.
The gameboard is zeroed at the top left, with the x-axis increasing to the right and the y-axis increasing downwards. The snake is represented by a list of coordinates, with the head of the snake being the first element in the list. The food is implemented as a list of positions, as we many want to support multiple food items.