Path Finder

Path Finder aka Matrix is a project where users can arrange in set of rows and columns and blocked houses that will be defined in a squared/rectangular shaped houses, based on matrix data structure. Blocked houses will be generated on random for the matrix to create and obstacle, where users can select star and end point to find the shortest path. 

The project intially started as Matrix data structure, to better undrestand the algorithm and find the best solution for finding the shortest and best solution to the end point from the start point. By entering the start and end points and the size of the matrix and running the prgram in Terminal, it would display the shortest path between the two points.

Terminal view of the Path Finder aka Matrix.

The Matrix, finding path button only moves in 4 directions: up, dow, left and right. There are no diagonal movements for to find the shortest path.

JavaScript/React/MUI are used for front-end code development. You can view the source codes in repository here!

Initial view of the page, allowing user to set in any value to create a matrix.

Users can add in any number above 0, to set in columns and rows. They can create a square shaped Matrix or rectangular based on the numbers. The number of blocked houses can be zero, which wouldn't created any obstacle for the matrix or more which would block some houses.

a matrix with the given values will be created, with random houses being blocked.


Users can select a start and end spot and find the shortest path by clicking on the button.

Users can choose a house and click multiple times. By each click their, start which is a green circle, or red which is the end path will be placed on the house. Once one of the either options have been set, the other house has only one option to be set.

If path between start and end are blcoked, it will generate error.

There are three occasions where, the application will result in error:

  • When a values less than or equal to zero has been set for the rows
  • When a values less than or equal to zero has been set for the columns
  • When there are blcoks between start and end point, so the matrix can't find any path between the two poinst.