astar02 is a small AI-generated visual demo of the A* pathfinding algorithm, built with C++ and Raylib.
This project is intentionally focused on the visual presentation and interactive explanation of the algorithm, not on code quality.
astar2.mov
It simulates an A* search from a start cell to a goal cell across a 2D grid where you can place and remove walls, then step through the search one event at a time.
- The search grid, including start, goal, walls, open nodes, closed nodes, and final path
- The current A* phase as the algorithm advances step by step
- A code panel with highlighted pseudocode and live node cost values
- The open set as both a heap tree and array view
- A timeline of search events you can scrub through
- A heuristic panel with normal, heatmap, and overlay modes
You need a C++ compiler, make, pkg-config, and Raylib installed.
On macOS with Homebrew:
brew install raylib pkg-config
make runSpace: step the algorithm, or hold to advance repeatedlyA: toggle autoplayR: reset the current searchC: clear the gridH: cycle the heuristic panel view modeLeft/Right: move backward or forward through the recorded timeline1/2: switch pagesQ: quit- Left click: place walls
- Right click: erase walls
Shift+ click: move the start cellAlt+ click: move the goal cell- Drag panel title bars to move panels
- Drag panel corners to resize panels