Skip to content

sdpatel1986/ng8-pathfinder

Repository files navigation

Angular Pathfinding Algorithms Visualizer Tool

see it live here: Heroku Demo

Generates an interactive visualization of the algorithm.

Alt Text

Features

1. Visualisations of the algorithms
  • Dijkstra's Algorithm (weighted): the father of pathfinding algorithms; guarantees the shortest path
  • A Search* (weighted): arguably the best pathfinding algorithm; uses heuristics to guarantee the shortest path much faster than Dijkstra's Algorithm
  • Greedy Best-first Search (weighted): a faster, more heuristic-heavy version of A*; does not guarantee the shortest path
  • Swarm Algorithm (weighted): a mixture of Dijkstra's Algorithm and A*; does not guarantee the shortest-path
  • Convergent Swarm Algorithm (weighted): the faster, more heuristic-heavy version of Swarm; does not guarantee the shortest path
  • Bidirectional Swarm Algorithm (weighted): Swarm from both sides; does not guarantee the shortest path
  • Breath-first Search (unweighted): a great algorithm; guarantees the shortest path
  • Depth-first Search (unweighted): a very bad algorithm for pathfinding; does not guarantee the shortest path
2. Mazes and patterns

Create sample mazes with walls and weights:

  • Recursive Division
  • Recursive Division (vertical skew)
  • Recursive Division (horizontal skew)
  • Basic Random Maze
  • Basic Weight Maze
  • Simple Stair Pattern
3. Adjust the path drawing speed

The app allows to adjust the speed to draw the path with 3 levels: fast, average and slow.

Development

Build and run

Install Angular CLI:

$ yarn global add @angular/cli

Install node modules:

$ yarn install

Run the app

$ yarn start

To build production:

$ yarn run build

Testing

Running unit tests

Run ng test to execute the unit tests via Karma.

Running end-to-end tests

Run ng e2e to execute the end-to-end tests via Protractor.

Thanks