GitHunt
GitHub license GitHub issues GitHub pull requests GitHub forks GitHub Repo stars GitHub contributors

Overview

This project is an interactive web application that visualizes how classic pathfinding algorithms explore a grid to find the shortest path between two points.

The goal of this project is to build intuition around algorithm behavior (exploration order, optimality, and performance) using step-by-step animations

Preview

Pathfinding Algorithms

Algorithm Supports Weights Optimal Notes
BFS โŒ โœ… (unweighted only) Explores level-by-level
DFS โŒ โŒ Explores deeply, not guaranteed shortest path
Dijkstra โœ… โœ… Guarantees shortest path with non-negative weights
A* โœ… โœ… Uses heuristic to guide search and reduce exploration

Heuristic used for A*: Manhattan distance
$\left( h(n) = |x_n - x_\text{goal}| + |y_n - y_\text{goal}| \right)$

Mud cells introduce higher traversal costs, allowing Dijkstra and A* to demonstrate meaningful differences compared to BFS/DFS.

Features

  • Configurable start and end nodes
  • Interactive barriers
    • Walls (infinite cost)
    • Mud (higher traversal cost)
  • Weighted grid support
  • Automatic path reconstruction
  • Step-by-step animated visualization
  • Light / Dark mode

Installation Steps

  1. Clone the repository
git clone https://github.com/Yathu2007/React-Pathfinding-Visualizer.git
  1. Change the working directory
cd .\React-Pathfinding-Visualizer\
  1. Install dependencies
npm install
  1. Start the development server
npm start

The app will be available at http://localhost:3000

Built with

Languages

JavaScript85.8%CSS8.4%HTML5.8%

Contributors

GNU General Public License v3.0
Created August 1, 2022
Updated December 31, 2025