Skip to content

Groszczu/pathfinding-tool

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

47 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pathfinding tool

This application was deployed on Github Pages. See the result here.

About

This project was created to learn how to use Redux, Redux Toolkit and React-Redux. Therefore performance of this application is not priority. I'm aware of disadvantages of using React in this kind of application (lots of DOM re-renders). If you find yourself in need to increase speed and performance of this app, you can replace React <Nodes> component with canvas implementation.

Pathfinding algorithms

Used algorithms:

  • Dijkstra's algorithm (weight of all nodes are equal to 1)
  • A* algorithm
  • Greedy algorithm (priorities nodes closest to the end node, doesn't use distance from start in calculations)

User interface

Toolbar

By selecting suitable button from the toolbar you can change node to one of the following type:

  • #ffeadb empty node
  • #4a3f35 wall node
  • #3cc200 start node
  • #ff0000 end node

Functional buttons

  • To start visualization of pathfinding click 'Start' button underneath the grid.
  • To reset nodes setting use 'Reset' button.
  • 'Clear' button leaves walls, start node and end node untouched but clears all visited (#00a7e9) and result (#f7bd00) nodes.
  • Button in bottom left corner allows to toggle between full screen and normal mode.