Skip to content

dpes-neupane/Path-visualization-algorithms

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Path visualization

Using Depth-first Search, Breadth-first Search, Bidirectional search algorithm, A star path finding algorithm

Using pygame, the path visualization program will find a path from the start node to an end node. You can choose a start node and an end node by yourself! You can also add and delete blocks! Needs pygame module to work!!

DFS:

grab-landing-page

BFS:

grab-landing-page

Bidirectional

grab-landing-page

A-star

grab-landing-page

Note: A-star is a little bit inconsistent since the priority queue will not let different nodes with same fScore into it. I have added a tuple of (fScore, count, node) into it. The count variable will decrease as the path is more traversed. This makes the priority queue to compare the same fScored node with count and that has less count value will take more priority!

Better method to remedy this situation will be appreciated!