Skip to content

YJunZheng/A-Star-Pathfinding-Visualizer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

A* Pathfinding Visualizer

Introduction

This program is a visualizer for the A* pathfinding algorithm. The GUI is produced using the pygame library.
The algorithm is similar to Dijkstra's algorithm but uses a heuristic, the distance between the nodes, to better explore.
The algorithm can travel diagonally or in a straight direction by 1 square at a time.

Controls

  • Left click on a tile to place an obstacle
  • Right click on an obstacle to remove it
  • Scroll wheel click to place the start block
  • Scroll wheel click a second time to place the end block
  • Scroll wheel click on a start/end block to remove it
  • Press backspace to clear the grid
  • Press spacebar to begin the pathfinding process (then click it again after it has finished to continue)
  • Grid dimensions, size, and colors as well as delay can be changed in the code

Types of Blocks

  • Black - Obstacle
  • White - Empty
  • Red - Start
  • Blue - End
  • Yellow - Explored Nodes
  • Green - Path

Preview

About

A* pathfinding algorithm visualizer.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages