https://github.com/jayexdesigns/a-star-visualizer
A visualizer for the popular A* algorithm
https://github.com/jayexdesigns/a-star-visualizer
a-star algorithm pathfinding visualizer
Last synced: 7 months ago
JSON representation
A visualizer for the popular A* algorithm
- Host: GitHub
- URL: https://github.com/jayexdesigns/a-star-visualizer
- Owner: JayexDesigns
- Created: 2022-02-11T02:05:06.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2022-02-11T02:05:31.000Z (almost 4 years ago)
- Last Synced: 2025-05-02T10:11:33.102Z (7 months ago)
- Topics: a-star, algorithm, pathfinding, visualizer
- Language: JavaScript
- Homepage:
- Size: 34.2 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README

A* Algorithm Visualizer
A* is one of the most used pathfinding algorithms in computer science
Usage
First, you can change the amount of columns and rows you want to have on the grid, the minimum is 2 columns and 2 rows and the maximum is a hundred for both since I don't think any computer should be tortured to generate more than a thousand divs.
Then you can set the start and end points anywhere in the grid, there can only be one starting point and one ending point, you can also put barriers so the path gets harder. The algorithm will try to go from the start to the end without passing through a barrier.
You can also reset the grid if you want to start again. Pressing the start button will show another menu with two options, the first one starts the algorithm and waits until you tell it to proceed to the next step, the second one will ask you for a delay in milliseconds so it can execute each step automatically.
Once the algorithm starts it will evaluate nearby nodes, those will be color yellow, once it finishes evaluating one node it will turn pink, if it finishes the path followed will be painted blue. If you click a tile it will show you some data about it, the position, status, costs and the previous node.
An explanation of how the algorithm works can be found here.
TRY IT!