Coder Social home page Coder Social logo

pathfinding-visualizer's Introduction

Pathfinding Algorithms Visualizer

This is a fun, 100% desktop oriented pathfinding algorithms visualizer and playground. It's built on Angular 9 and deployed to https://joaquimgamero.github.io/pathfinding-visualizer. A pathfinding algorithm seeks to find the shortest path between two points, just like any maps app would do. The purpose of this app is to see these algorithms in action and to observe the differences between them under two dimensional, customizable maps.

Different algorithms

You can use the algorithm picker to try different algorithms. Note that some algorithms are unweighted, while others are weighted. Unweighted algorithms do not take turns or weight nodes into account, whereas weighted ones do.

Different pathfinding algorithms output different results, and the shortest path given may differ.

  • Dijkstra (weighted): the father of pathfinding algorithms; guarantees the shortest path.
  • A* (weighted): arguably the best pathfinding algorithm; uses heuristics to guarantee the shortest path much faster than Dijkstra's Algorithm.
  • Breadth-first (unweighted): a great algorithm; guarantees the shortest path.
  • Depth-first (unweighted): a very bad algorithm for pathfinding; does not guarantee the shortest path.

Using the map

You can move the starting point (a blue arrow) and the finish point (the goal, a purple diamond) clicking and dragging on them.

You can also paint walls and obstacles in order to investigate how the different algorithms work and solve the problem. Just click down and move the cursor while holding the click button, like you would do in any image editor.

When you are ready, just click on the purple Visualize! button in the header, and the algorithm will start scanning the map, eventually finding the shortest path (a yellow line).

There are some presets for the map, called mazes. You can load them with the Mazes selector. They instantly provide a complete map designed for you to see the differences between different algorithms.

Have fun!

Enjoy this algorithm visualizer and have fun messing around. I built this during the COVID19 quarantine period, 2020. Feel free to hit me up if you want to talk about this project or any other fancy stuff!

pathfinding-visualizer's People

Contributors

joaquimgamero avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.