Maze Solving Bot (Dijkstra's Algorithm)
BenjaminGrass (13)

Create by a maze and this bot will find the shortest solution!

Just a few notes:
1. To create the maze enter 1's (the path) and 0's (the walls of the maze).
2. The maze must have a uniform row size.
3. There can only be one start (in the top row) and one finish (in the bottom row).
4. The maze can have any number of rows & columns!
5. The shortest path is represented by 2's after the algorithm has run.
Here's an example maze (albeit a simple one):

Comment any bugs you encounter please!

You are viewing a single comment. View All
BenjaminGrass (13)

@alephzero we could try just adding your JS file to my project (or my java files to yours), although I'm not sure how we could get the two to interact. Can you call a method written in a different language than the file you're calling it in? Because if so I could just use your maze generation (already converted into a 2D array of 1's and 0's) as a parameter for the solving algorithm.

Also, would it be possible for you to read an output of 0's, 1's and 2's and go back into your maze and re-color the shortest solution squares?