Skip to content

Josephbakulikira/Astar-visualization-python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Astar-visualization-python

Subscribe to Auctux

Requirements

pygame : pip install pygame


Run

In The terminal:
    python main.py
    
- Press "Space" To start The simulation

Controls (Commands)

  • S -> To show node details(costs) text
  • W -> To Toggle Drawing walls
  • Left Mouse Button -> To Remove Walls
  • Right Mouse Button -> To Add Walls
  • Space -> To pause and Resume
  • R -> To reset
  • Enter(Return) or P -> To toggle setting Panel
  • Esc -> To quit (close the window)

bugs- Unsolved issues

This code need a lot of refactoring , and the ui implementation is poorly done and can affect the performance


About

    Astar algorithm in python using the pygame library, 
    A* is a graph traversal and path search algorithm, 
    which is often used in many fields of computer science due to its completeness, 
    optimality, and optimal efficiency. One major practical drawback is its O(b^d) 
    space complexity, as it stores all generated nodes in memory.

Screenshot (233) Screenshot (234) Screenshot (218) Screenshot (216) Screenshot (220) Screenshot (219)