Skip to content
This repository has been archived by the owner on Sep 3, 2024. It is now read-only.

Interactive pathfinder application built as a university assignment work. Dijkstra, A* and JPS!

License

Notifications You must be signed in to change notification settings

joonarafael/visualpathfinder

Repository files navigation

VISUAL PATHFINDER

example workflow codecov

Aineopintojen harjoitustyö: Algoritmit ja tekoäly, Joona Kettunen, periodi 3 kevät 2024.

The application is constantly up and running here hosted by Railway.

Website favicon is by Freepik.

It's recommended to check all the documentation provided within this folder. Instructions on how to clone this repository, modify the source code for your own use, and get it up and running on your local machine can be also found within that folder.

General

This is a web application demonstrating visually different pathfinding algorithms with an interactive map allowing detailed algorithm comparison on both ready-made maps and custom user maps. Included algorithms are Dijkstra, A*, and JPS (Jump Point Search) (main learning content for the course). All 3 algorithms support 8-way movement (e.g. cardinal directions and diagonal traversal).

Technical overview

This is a React web application built in TypeScript constantly running on a Node.js server. All algorithms and other application logic executes on the client machine.

Application uses Tailwind CSS for styling and additionally features ready-made UI components provided by the shadcn/ui library.

Automatic software testing powered by the Jest library. Tests cover the core application logic and perform robust testing for the 3 provided algorithms. The user interface is not covered by automatic testing. Coverage report of the automatic testing can be found here.

Algorithms

All three pathfinding algorithms, as well as all helper functions and classes, are written in TypeScript. More detailed documentation about the algorithms can be found from this document.

Credits for Maps

Benchmark maps are created entirely by me.

Baldur's Gate

Downloaded from the MovingAI Benchmarks.

City Maps

  • CITY 1 (stored in the file named city0) generated from this map.

  • CITY 2 (stored in the file named city1) generated from this map.

  • CITY 3 (stored in the file named city2) generated from this map.

These city maps have been cropped, rescaled, and converted into 1bit color scheme. Out of this 1bit image, a specific Python script has been used to generate an appropriate array for permanent data storing.

Virtual Maps

All virtual maps are downloaded from MovingAI Benchmarks. The original .map files have been converted into one-dimensional arrays using a specific Python script to suit the application logic (0/1 syntax).