If you need to solve the maze, meaning to find the shortest path to the exit, here's an ideea for you:
Have your robot built with sensors that will detect openings on both sides.
Make an array of nodes, all being 0 at start.
Follow the RH style driving, but every time you get at a opening to a side, that is a node, add a 1 to the value in the array if you turn right, a 2 if you go forward, or a 3 if you turn left. If the sum equals 4, make it 0 again and go to the previous node instead to the next node.
When the robot exits the maze, put it back at the begining without turning it off and have it follow the array every time it turns.
Lets have an example:
| __ |__ ___ o
| |____| |____|
i means in and o means out
At the entrance there is an opening to the left, so following the RH rule, we go straight, that means we add a 2 to the N1 in the array. Two cells down we have another opening to the left, we turn left and add a 3 to the second node of the array, N2. Then we have a 3 for the third node, then a 1 to the N4 node, then a 1 to the N5 node, a 3 to the N6 node, then we hit the dead end. We turn around, and when we get to the opening to the right, we add a 1 to the N6 node. So N6 will now be 4, we make it 0 again and at the next opening (on the left) we go straight so we add a 2 to the N5 node, N5 will now have the value 3. We go to the next cell and we turn right so we write a 1 to the N6 node, move to the next cell and turn right again, adding a 1 to the N7 node, add a 1 to the N8 node, hit another dead end, turn back, add a 3 to the N8 node, N8 will be now reset to 0, add a 1 to the N7 node, N7 will have the value 2 and we got at the exit. We ended up with this array:
N1 N2 N3 N4 N5 N6 N7 N8 N9 N10
2 3 3 1 3 1 2 0 0 0
Now the robot will take each turn using the value in the array, taking the shortest path to the exit.
Hope this helps...