Table of Contents
This project is a pathfinding algorithm that uses the A* algorithm to find the shortest path between two points. The algorithm is implemented in Python and uses the Pillow library to visualize the results. The algorithm is tested using pytest and the coverage is measured using the codecov.io service. The project is set up to use GitHub actions to run the tests and measure the coverage. The results of the tests and coverage are presented in the badges above.
When the proper setup is done, the program can be run by executing the following command in the root directory of the project:
python main.py
To see the results of the different tasks look into the docs folder. Here the results are presented in a png files.
To install the A star pathfinding, one needs to have all the prerequisites installed and set up, and follow the setup guild. The following sections will guide you through the process.
- Ensure that git is installed on your machine. Download Git
- Ensure Python 3.9 or newer is installed on your machine. Download Python
- Clone the repository
git https://github.com/SverreNystad/a-star-pathfinding.git
cd a-star-pathfinding
-
Create a virtual environment (optional, but recommended)
python3 -m venv venv source venv/Scripts/activate
python3 -m venv venv source venv/bin/activate
-
Install the required packages
pip install -r requirements.txt
To run all the tests, run the following command in the root directory of the project:
pytest --cov
coverage html # To generate a coverage report
Licensed under the MIT License. Because sharing is caring :)
The dataset of Samfundet (https://www.samfundet.no/) is not made by me, and most of the code in the class Map_Obj was created by Håkon Måløy then later extended and documented by Xavier Sánchez-Díaz.
Thanks to the following libraries: