Skip to content

JLance7/pathfinder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pathfinder Visualizer

This project includes two run modes in a single app:

  • Terminal mode: Generates a grid and solves it with A* search, then prints the explored cells and final path.
  • GUI mode (pygame): Interactive grid editor with animated A* exploration and final path display.

Requirements

  • Python 3.10+
  • pygame

Install dependencies:

pip install -r requirements.txt

Run

From the project folder:

python main.py --mode terminal
python main.py --mode gui

Useful Arguments

python main.py --mode terminal --width 40 --height 20 --wall-density 0.30 --seed 7
python main.py --mode gui --width 30 --height 20 --cell-size 28
  • --mode: terminal or gui
  • --width: grid width (default: 30)
  • --height: grid height (default: 20)
  • --wall-density: wall percentage for random generation (default: 0.28)
  • --seed: random seed (terminal mode)
  • --cell-size: GUI cell size in pixels (default: 28)

GUI Controls

  • Left click: place wall
  • Right click: erase wall
  • SPACE: run A* search
  • T: clear only search results
  • C: clear the full grid
  • R: random wall generation
  • S: place start on mouse cell
  • G: place goal on mouse cell
  • ESC: quit

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages