Table of Contents
This game is a practice of three AI search algorithms:
- A* Algorithm
- Bidirectional BFS
- Iterative Deepening Search
The game is about a robot which tries to serve customer ASAP. At first, There is a bunch of foods on a table and all foods are given to the customers previously except for butter. This robot's duty is to give butter to the customer by putting it on a specific position on the table.
The robot's sensors gets a first perception of items on table at first. The sensor driver puts that perception as a text file with the following format into a specific directory:
First line is width and height of table. Other lines describes the table items. Items are these:
- Numbers are cost of moving over that part of table.
- 'r' is the position of the robot itself.
- 'b' is the first position of a butter.
- 'p' is a point to put a butter on it.
- 'x' is block with other foods
After finding shortest path, the output will be something like this:
This project is created by pure python3.
In this section we are explaining how to run this game.
Before running you need to install required libraries. You can install these libraries by requirements.txt file. By the following command you can install.
$ pip install -r requirements.txt
Use one of these command to run the game:
$ python3 main.py a_star
$ python3 main.py bd_bfs
$ python3 main.py ids
In Windows you can use 'python' instead of python3. In Linux you can also run by one of these commands:
$ ./main.py a_star
$ ./main.py bd_bfs
$ ./main.py ids
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
Distributed under the MIT License. See LICENSE.txt
for more information.
Mahdi Rezaie - @mahdirezaie336 - [email protected]
Project Link: https://github.com/mahdirezaie336/GimmeButter