Skip to content

Files

Latest commit

112997f · Nov 9, 2020

History

History
32 lines (26 loc) · 604 Bytes

README.md

File metadata and controls

32 lines (26 loc) · 604 Bytes

SnakeAI

AI for Snake game using A star algorithm.

Works right in the terminal. Uses Astar to find the route

Astar: 
    fn = gn+ hn
        here,
            gn is the total moves taken for a food
            hn is the manhattan distance

Customize the game values with the constant.py file

Execution

  1. Clone the repo
$ https://github.com/AP-Atul/SnakeAI.git
  1. Install the curses package
$ pip install curses
  1. Run the main file in the terminal
$ python main.py

Screen

screen