Skip to content

Karan-Gandhi/Pathfinding-Visualiser-Project

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pathfinding-Visualiser-Project

This is a Project which will visualize different PathFinding Algorithms. This project is available on https://karan-gandhi.github.io/Pathfinding-Visualiser-Project/

Meet the various algorithms

Pathfinding Algorithms

Astar

A* (pronounced "A-star") is a graph traversal and path search algorithm, which is often used in computer science due to its completeness, optimality, and optimal efficiency. One major practical drawback is its O(bd) space complexity, as it stores all generated nodes in memory. Thus, in practical travel-routing systems, it is generally outperformed by algorithms which can pre-process the graph to attain better performance, as well as memory-bounded approaches; however, A* is still the best solution in many cases.

Dijkstra

Dijkstra's algorithm (or Dijkstra's Shortest Path First algorithm, SPF algorithm)[1] is an algorithm for finding the shortest paths between nodes in a graph, which may represent, for example, road networks. It was conceived by computer scientist Edsger W. Dijkstra in 1956 and published three years later.

The algorithm exists in many variants. Dijkstra's original algorithm found the shortest path between two given nodes, but a more common variant fixes a single node as the "source" node and finds shortest paths from the source to all other nodes in the graph, producing a shortest-path tree.

Breath-first Search:

A great algorithm; guarantees the shortest path

Depth-first Search:

A very bad algorithm for pathfinding; does not guarantee the shortest path

Maze Gereration Algorithms Algorithms

Recursive Backtraked (Flood Fill):

The Recursive Backtracker Algorithm is probably the most widely used algorithm for maze generation.

Recursive Division:

Mazes generated by Recursive Division algorithm are in the form of the rectangular nested fractal. The method results in mazes with long straight walls crossing their space, making it easier to see which areas to avoid. It also tends to have a lot of short dead-ends.

Random Basic Maze:

Simple algorithm which gives each cell a 40% chance to become a wall

Sources: