Skip to content

Implantation of the A* pathfinding algorithm to find the shortest path between two points and it has visualizations to show the algorithm in action.

Notifications You must be signed in to change notification settings

SverreNystad/a-star-pathfinding

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

66 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A* path finding

Workflow Status (with event) codecov.io GPT-dungeon-master top language GitHub language count Project Version

Table of Contents
  1. A* path finding
  2. Introduction
  3. Usage
  4. Installation
  5. Tests
  6. License
  7. Acknowledgment

Introduction

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.

Usage

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

Results

To see the results of the different tasks look into the docs folder. Here the results are presented in a png files.

Task 1

Task 1 Task 1 exploration

Task 2

Task 2 Task 2 exploration

Task 3

Task 3 Task 3 exploration

Task 4

Task 4 Task 4 exploration

Task 5

Task 5 Task 5 exploration

Installation

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.

Prerequisites

Setup

  1. Clone the repository
git https://github.com/SverreNystad/a-star-pathfinding.git
cd a-star-pathfinding
  1. Create a virtual environment (optional, but recommended)

    On Windows:

    python3 -m venv venv
    source venv/Scripts/activate

    On macOS and Linux:

    python3 -m venv venv
    source venv/bin/activate
  2. Install the required packages

pip install -r requirements.txt

Tests

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

License

Licensed under the MIT License. Because sharing is caring :)

Acknowledgment

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:

About

Implantation of the A* pathfinding algorithm to find the shortest path between two points and it has visualizations to show the algorithm in action.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages