-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
51 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,28 @@ | ||
# SnakeAI | ||
AI for Snake game using A star algorithm | ||
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 | ||
``` | ||
2. Install the curses package | ||
``` | ||
$ pip install curses | ||
``` | ||
3. Run the main file in the terminal | ||
``` | ||
$ python main.py | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.