Skip to content

Maze Solver

This algorithm solves any kind of 2D maze with high efficiency.

The input of this algorithm should be an black and white image that the walls and the paths should only be vertical and horizontal, white pixels represent the path, and the black pixels represent the walls. On both the top and bottom edges of the image, there should be walls with full length except 1 white pixel on each side that represent the entrance and the exit.

The algorithm takes 1 array (list) as the input which should contain exact 2 string elements, the first one should be the input image file as the second one the output image.

The algorithm

data = {"data": [ "data://adam/maze.png", "data://adam/maze_solved.jpg"]}
algo = c.algo("/adam/mazesolver")
response = algo.pipe(data)