+ 1

Anyone has written a code for simple maze solver on c++? I am struggling on starting it. Any help is appreciated.

i have written this so far: #include <iostream> using namespace std; int main() { cout << "Robot Maze Solver" << endl; int x, y, h, moveCount; cout << "START" << endl; int drawMaze return 0; } int drawMaze() { for (int )

27th Sep 2016, 11:50 PM
Raul
Raul - avatar
1 Answer
0
A maze solver is not really that simple. The first thing is to encode the maze. Probably as a two dimensional array where each entry is an object defining where the walls are for each square plus other info as you process the maze. Then you process the array. Find all the 'interesting' squares - those with more than two ways in and out plus the start and finish. Then find how they connect. Then follow from the start square and try alternative routes until you hit the end one. This is a very general overview it isn't easy!
8th Jan 2017, 9:24 PM
David Carter