Skip to content

SamEthanMathew/A-Algorithm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Implements a from-scratch A* shortest-path solver with pluggable heuristics (zero/Dijkstra, Manhattan, Octile, Euclidean) and a generic neighbor API. Includes simple grid demos (4- and 8-neighbor movement) with ASCII visualization, plus optional NetworkX parity checks to verify that costs/paths match on random weighted graphs and equivalent grid graphs.

4-neighbor grid demo (Manhattan heuristic)

python main.py --demo grid4

8-neighbor grid demo (Octile heuristic)

python main.py --demo grid8

Parity on random weighted graph (A* with h=0 == Dijkstra)

python main.py --demo nx --n 100 --p 0.1 --seed 7

Parity on a grid (same map/heuristic in both implementations)

python main.py --demo nxgrid4 --W 12 --H 12 --wall_x 4 --gap_y 6 python main.py --demo nxgrid8 --W 12 --H 12 --wall_x 4 --gap_y 6

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages