Skip to content

jamylak/astar02

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 

Repository files navigation

astar02

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

What It Does

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.

What It Visualises

  • 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

Install

You need a C++ compiler, make, pkg-config, and Raylib installed.

On macOS with Homebrew:

brew install raylib pkg-config
make run

Controls

  • Space: step the algorithm, or hold to advance repeatedly
  • A: toggle autoplay
  • R: reset the current search
  • C: clear the grid
  • H: cycle the heuristic panel view mode
  • Left / Right: move backward or forward through the recorded timeline
  • 1 / 2: switch pages
  • Q: quit
  • Left click: place walls
  • Right click: erase walls
  • Shift + click: move the start cell
  • Alt + click: move the goal cell
  • Drag panel title bars to move panels
  • Drag panel corners to resize panels

About

A* Visualiser

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors