First Run Second Run Third run

Volume 56 – No.5, October 2012 12 Fig 7: Sensor readings of the right sensor

7. RESULTS AND DISCUSSION

7.1 First Run

In its first run, the robot discovers the maze, map the walls and find the target location. Each time it moves to a new cell, its mapping matrix is updated with new information about the existence of walls and the distance the cell is located from the target. The distance is indicated by the number of steps needed to move from a particular cells to the target. The first 6 steps and steps 19 20 are illustrated in Fig 8. Twenty steps are required to reach the target cell. All cell and wall data along the way are updated. . . . Fig 8: Mapping in first run requires 20 steps

7.2 Second Run

After reaching the target cell in its first run, the robot starts heading back to its original starting point. It explores the whole maze while continue mapping it by updating the wall data and the distance each cell is from the target. Steps 1 to 9 and 19 to 22 are illustrated in Fig 9. It takes the robot 22 steps to reach the starting point while seeking for an alternative route so that the whole mapping matrix can be updated. . . . Fig 9: Return to start in second run requires 22 steps

7.3 Third run

When the maze is fully mapped, the robot navigates the maze to reach the goal through the shortest route using this data. When deciding to move the next cell, it chooses the cell that hold the smallest value. This is repeated until the target is reached. This is illustrated in Fig 10. Finished Wavefront: 1 . . . . 3 . 4 . 5 . 6 . x . x . x . x . x . . . 3 . 2 . 3 . 4 . 5 . x . x . x . x . x . 3 . 2 . G . 2 . 3 . 4 . x . x . x . x . x . 4 . 3 . 2 . 3 . 4 . 5 . x . x . x . x . x . 5 . 4 . 3 . 4 . 5 . 6 x . x . x . x . x . R W5 . 4 . 5 . 6 . 7 Finished Wavefront: 2 . . . . 3 . 4 . 5 . 6 . x . x . x . x . x . . . 3 . 2 . 3 . 4 . 5 . x . x . x . x . x . 3 . 2 . G . 2 . 3 . 4 . x . x . x . x . x . 4 . 3 . 2 . 3 . 4 . 5 x . x . x . x . x . R W4 . 3 . 4 . 5 . 6 x . x . x . x . x . . W5 . 4 . 5 . 6 . 7 Finished Wavefront: 3 . . . . 3 . 4 . 5 . 6 . x . x . x . x . x . . . 3 . 2 . 3 . 4 . 5 . x . x . x . x . x . 3 . 2 . G . 2 . 3 . 4 x . x . x . x . x . R W3 . 2 . 3 . 4 . 5 x . x . x . x . x . . W4 . 3 . 4 . 5 . 6 x . x . x . x . x . . W5 . 4 . 5 . 6 . 7 Finished Wavefront: 4 . . . . 3 . 4 . 5 . 6 . x . x . x . x . x . . . 3 . 2 . 3 . 4 . 5 x . x . x . x . x . R 2 . G . 2 . 3 . 4 x . x . x . x . x . . W3 . 2 . 3 . 4 . 5 x . x . x . x . x . . W4 . 3 . 4 . 5 . 6 x . x . x . x . x . . W5 . 4 . 5 . 6 . 7 Finished Wavefront: 5 . . . . 3 . 4 . 5 . 6 . x . x . x . x . x . . . 3 . 2 . 3 . 4 . 5 x x . x . x . x . . R WG . 2 . 3 . 4 x x . x . x . x . . W. . 2 . 3 . 4 . 5 x . x . x . x . x . . W. . 3 . 4 . 5 . 6 x . x . x . x . x . . W. . 4 . 5 . 6 . 7 Finished Wavefront: 6 . . 4 . 3 . 4 . 5 . 6 . x x . x . x . x . . WR W2 . 3 . 4 . 5 x x . x . x . x . . . WG . 2 . 3 . 4 x x . x . x . x . . W3 . 2 . 3 . 4 . 5 x . x . x . x . x . . W4 . 3 . 4 . 5 . 6 x . x . x . x . x . . W5 . 4 . 5 . 6 . 7 Finished Wavefront: 19 . W. . W. . W. . x x x x x . W. W. . W. . x x M x M x M x . . WG R . W. x x . x x x . W. . . . . W. . x . x . x . x M x . W. . . . . . . . . x . x . x . x . x . . W. . . . . . . . . Finished Wavefront: 20 . W. . W. . W. . x x x x x . W. W. . W. . x x M x M x M x . . WR . . W. x x . x x x . W. . . . . W. . x . x . x . x M x . W. . . . . . . . . x . x . x . x . x . . W. . . . . . . . . Finished Wavefront: 1 . W. . W. . W. . x x x x x 5 W6 W. . W. . x x M x M x M x 4 5 WR . . W. x x x x x 3 W6 . 7 . 8 W. . x . x . x . x M x 2 W7 . 8 . 9 . 1 . 11 x . x . x . x . x . G W8 . 9 . 1 . 11 . 12 nt: 10 W W . 6 . W W W . 5 . W . 4 . W . 5 . W . 6 . W . 7 nt: 10 W W . 6 . W W W . 5 . W . 4 . W . 5 . W . 6 . W . 7 Finished Wavefront: 2 6 W7 8 W. . W. . x x x x x 5 W6 W9 1 W. . x x M x M x M x 4 5 W. 11 12 W13 x x x x x 3 W6 WR 1 W. 12 x . x M x . x M x 2 W7 . 8 . 9 . 1 . 11 x . x . x . x . x . G W8 . 9 . 1 . 11 . 12 nt: 10 W W . 6 . W W W . 5 . W . 4 . W . 5 . W . 6 . W . 7 nt: 10 W W . 6 . W W W . 5 . W . 4 . W . 5 . W . 6 . W . 7 nt: 10 W W . 6 . W W W . 5 . W . 4 . W . 5 . W . 6 . W . 7 nt: 10 W W . 6 . W W W . 5 . W . 4 . W . 5 . W . 6 . W . 7 Finished Wavefront: 3 6 W7 8 W11 12 W15 . x x x x x 5 W6 W9 1 W13 14 x x M x M x M x 4 5 W. 15 14 W13 x x x x x 3 W6 W. R W13 12 x . x M x M x M x 2 W7 . 8 . 9 . 1 . 11 x . x . x . x . x . G W8 . 9 . 1 . 11 . 12 nt: 10 W W . 6 . W W W . 5 . W . 4 . W . 5 . W . 6 . W . 7 nt: 10 W W . 6 . W W W . 5 . W . 4 . W . 5 . W . 6 . W . 7 nt: 10 W W . 6 . W W W . 5 . W . 4 . W . 5 . W . 6 . W . 7 Finished Wavefront: 4 6 W7 8 W11 12 W15 . x x x x x 5 W6 W9 1 W13 14 x x M x M x M x 4 5 W. R 14 W13 x x x x x 3 W6 W. . W13 12 x . x M x M x M x 2 W7 . 8 . 9 . 1 . 11 x . x . x . x . x . G W8 . 9 . 1 . 11 . 12 nt: 10 W W . 6 . W W W . 5 . W . 4 . W . 5 . W . 6 . W . 7 nt: 10 W W . 6 . W W W . 5 . W . 4 . W . 5 . W . 6 . W . 7 nt: 10 W W . 6 . W W W . 5 . W . 4 . W . 5 . W . 6 . W . 7 Finished Wavefront: 5 6 W7 8 W11 12 W. . x x x x x 5 W6 W9 1 W13 14 x x M x M x M x 4 5 W. . R W13 x x x x x 3 W6 W. . W13 12 x . x M x M x M x 2 W7 . 8 . 9 . 1 . 11 x . x . x . x . x . G W8 . 9 . 1 . 11 . 12 nt: 10 W W . 6 . W W W . 5 . W . 4 . W . 5 . W . 6 . W . 7 nt: 10 W W . 6 . W W W . 5 . W . 4 . W . 5 . W . 6 . W . 7 nt: 10 W W . 6 . W W W . 5 . W . 4 . W . 5 . W . 6 . W . 7 Finished Wavefront: 6 6 W7 8 W. . W. . x x x x x 5 W6 W9 1 W. . x x M x M x M x 4 5 W. . . W13 x x x x x 3 W6 W. . WR 12 x . x M x M x M x 2 W7 . 8 . 9 . 1 . 11 x . x . x . x . x . G W8 . 9 . 1 . 11 . 12 nt: 10 W W . 6 . W W W . 5 . W . 4 . W . 5 . W . 6 . W . 7 nt: 10 W W . 6 . W W W . 5 . W . 4 . W . 5 . W . 6 . W . 7 nt: 10 W W . 6 . W W W . 5 . W . 4 . W . 5 . W . 6 . W . 7 Finished Wavefront: 7 . W. . W. . W. . x x x x x 5 W6 W. . W. . x x M x M x M x 4 5 W. . . W. x x x x x 3 W6 W. . W. R x . x M x M x M x 2 W7 . 8 . 9 . 1 . 11 x . x . x . x . x . G W8 . 9 . 1 . 11 . 12 nt: 10 W W . 6 . W W W . 5 . W . 4 . W . 5 . W . 6 . W . 7 nt: 10 W W . 6 . W W W . 5 . W . 4 . W . 5 . W . 6 . W . 7 Finished Wavefront: 8 . W. . W. . W. . x x x x x . W. W. . W. . x x M x M x M x 4 5 W. . . W. x x x x x 3 W6 W. . W. . x . x M x M x M x 2 W7 . 8 . 9 . 1 R x . x . x . x . x G W. . . . . . . . . nt: 10 W W . 6 . W W W . 5 . W . 4 . W . 5 . W . 6 . W . 7 Finished Wavefront: 9 6 W7 8 W. . W. . x x x x x 5 W6 W9 1 W. . x x M x M x M x 4 5 W. . . W. x x x x x 3 W6 W. . W. 14 x . x M x M x M x 2 W7 . 8 . 9 WR 13 x . x . x . x M x G W8 . 9 . 1 . 11 . 12 nt: 10 W W . 6 . W W W . 5 . W . 4 . W . 5 . W . 6 . W . 7 nt: 10 W W . 6 . W W W . 5 . W . 4 . W . 5 . W . 6 . W . 7 Finished Wavefront: 19 . W. . W. . W. . x x x x x . W. W. . W. . x x M x M x M x R . W. . . W. x x x x x 3 W. W. . W. . x x M x M x M x 2 W. . . . W. . x x M x M x M x G W. . . . . Finished Wavefront: 20 . W. . W. . W. . x x x x x . W. W. . W. . x x M x M x M x . . W. . . W. x x x x x R W. W. . W. . x x M x M x M x 2 W. . . . W. . x x M x M x M x G W. . . . . Finished Wavefront: 21 . W. . W. . W. . x x x x x . W. W. . W. . x x M x M x M x . . W. . . W. x x x x x . W. W. . W. . x x M x M x M x R W. . . . W. . x x M x M x M x G W. . . . . Finished Wavefront: 22 . W. . W. . W. . x x x x x . W. W. . W. . x x M x M x M x . . W. . . W. x x x x x . W. W. . W. . x x M x M x M x W. . . . W. . x x M x M x M x R W. . . . . Volume 56 – No.5, October 2012 13 Fig 10: Third run requires 18 steps Compared to the first run where the robot was still learning the maze, in the final run, the robot takes two less steps because it already learned about the whole maze and knows the shortest path to the target cell.

8. CONCLUSION