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

A tool for visualising and debugging pathfinding search.

Notifications You must be signed in to change notification settings

ShortestPathLab/pf-algo-viz

 
 

Repository files navigation

2024-11-29

The PF-Algo-Viz project is complete and this repository is now retired. PostHoc is a followup project which re-implements and extends many of the ideas originally developed as part of PF-Algo-Viz. Please check out that application and our associated repository for the latest news and updates

-Dan

--

Debugging Visualiser for Pathfinding Search

This app can be used to visualise and debug pathfinding algorithms independent of any specific context. At a minimal level, all it needs is a json file search trace which is nothing but sequence of events that occurred in the execution of the pathfinding algorithm. All pathfinding algorithms speak a common search language which has standard node operations like generation, expansion and updation. Other than this, each node has some data associated with respect to cost and bound.

This app is built solely around the idea of using this basic information. The user can provide additional details about representation of nodes or operating environment to have visual representation of these algorithms as per their need. Furthermore, the tools also gives playback functionality with the help of which users can simply play, pause, step forward and backward to analyse how the algorithms are performing. The tool also enables the users to perform automatic and manual testing for common search invariants as well as trace comparisons with another algorithms.

This is web interface of the app. But it is not limited to that. The users can also download and deploy it locally on their systems as an Electron app.

The inputs required to run the app are:

  1. Search Trace(compulsory): JSON representation of event logs generated by implemented pathfinding algorithm. These also contain details about node for drawing.
  2. Operating Environment(optional): Map representation of operating environment which can be a grid or mesh or road network. This can also be empty in which case the app expects the search trace to be without without any 2d positions embedding.
  3. Compare Trace(optional): This is search trace for another algorithm(generally a known good-reference) with which we want to do comparison of current algorithm. You only require this in case you want to run a comparison for debugging.

This tool can be used as a web application(https://pf-algo-viz.org) or a desktop application(instructions below). The web app requires uploading the input files. In desktop app, the input can be passed as file names in command line parameters. This allows the users to run application with loaded traces and/or operating environment on their desktops with file mentioned as inputs.

Run the app locally

git clone https://github.com/krnbatta/pathfinder.git
cd /path/to/pathfinder
npm install
cd /path/to/pathfinder/frontend
npm install
cd /path/to/pathfinder/desktop
npm install
cd /path/to/pathfinder
npm start # run server
cd /path/to/pathfinder/frontend
npm start # run frontend webpack watcher
cd /path/to/pathfinder/desktop
python3 pathfinding-debugger.py -z mesh -m ../frontend/maps/mesh/arena.mesh -t ../frontend/algorithms/polyanya.json` # Launches desktop app

This documentation provides a general walkthrough for this app.

About

A tool for visualising and debugging pathfinding search.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 87.8%
  • SCSS 5.2%
  • HTML 4.0%
  • Python 2.3%
  • CSS 0.7%