Presentation is loading. Please wait.

Presentation is loading. Please wait.

July 20041 School of Engineering, Mechanical Engineering Division Singapore Robotics Games 04 Symposium Title: An Efficient Maze Solving Algorithm for.

Similar presentations


Presentation on theme: "July 20041 School of Engineering, Mechanical Engineering Division Singapore Robotics Games 04 Symposium Title: An Efficient Maze Solving Algorithm for."— Presentation transcript:

1 July 20041 School of Engineering, Mechanical Engineering Division Singapore Robotics Games 04 Symposium Title: An Efficient Maze Solving Algorithm for a Micromouse Presented by Mr. Hui Tin Fat htf@np.edu.sg Alpha Centre Ngee Ann Polytechnic

2 July 20042 School of Engineering, Mechanical Engineering Division 1. Abstract In a competition, the performance of a micromouse is largely dependent on two factors. They are the maze searching ability and the maximum maze cruising speed of a micromouse. The maze searching ability of a micromouse reflects on the elapsed time for it to reach the goal and the elapsed time for it to finalize the dash path. The dash path is crucial for a micromouse to score its fastest runtime. This paper demonstrates a method of using a simple expert algorithm to complement the Bellman flooding algorithm to tackle a maze-solving problem. Considerations are given to a limited on-board processing power and memory space. Results from implementation and simulation of the algorithm using for a competing micromouse are presented.

3 July 20043 School of Engineering, Mechanical Engineering Division 2. How to describe a Maze? A maze is formed by a group of alleyways arranged in longitude and transverse directions in an enclosed square platform. The maximum length of a alleyway is 16 units and the minimum length is 1 unit. In a maze, the alleyways will form the junctions when the transverse and longitude meets, the dead ends when the alleyway closes in one end, the loops when a alleyway joins at the begin and end. All the alleyways are assembled from walls and poles. They are either made in plywood or plastics. The maze starts at one of the four corner squares and it finishes at one of the center 4 squares.

4 July 20044 School of Engineering, Mechanical Engineering Division 3. A Sample Maze

5 July 20045 School of Engineering, Mechanical Engineering Division 4. How to define the complexity of a maze? For Human Brain The characteristics of human brain is the sense of direction and the sense of position are not strong. The brain is easily confused by the similar environments. It is difficult to identify the same location and orientation. Therefore if a maze comprises of many junctions, dead ends and loops. The maze is considered a complex one for people. For Micromouse Brain The micro-controller is able to remember the orientation and position correctly. This is due to the ability of software algorithm and the retrieval from memory storage. Therefore a maze with many junctions, dead ends and loops is no longer difficult for the micromouse to solve.

6 July 20046 School of Engineering, Mechanical Engineering Division 5. How to define the complexity of a maze for a micromouse to solve? When a maze comprises of many long dead ends, it is considered as a complex maze because the micromouse requires extra-efforts to reach the goal and locates the dash path between the start and goal. We can evaluate the performance of a maze solving algorithm by the number of backtracks carried out by the micromouse. If there is less backtrancks, it shows the algorithm more efficient. In micromouse competition, the performance does not only judge on how soon the robot reached the goal but also how much time to spend for locating the dash path. By counting the number of backtracks carried out in both tasks, we can judge whether the algorithm is good or not.

7 July 20047 School of Engineering, Mechanical Engineering Division 7. Bellman Flooding Algorithm Bellman flooding algorithm is a common maze solver using by the contestants. The standard Bellman algorithm solves a given maze for the shortest route but this is not always the fastest. Many contestants modify the algorithm which floods with time instead of distance. There will be different time constants assigned to the flooding array according to the movement to reach the new square such as a straight, a 90 0 turn or a 180 0 turn. The Modified Bellman Flooding Algorithm is implemented as following: a) There is only boundary walls along the outside perimeter. No internal walls. b) The target square is number 0. The squares joining the target square(s), - front, right and left; with no separating walls, are numbered by the time constant taken to travel there from the target square.

8 July 20048 School of Engineering, Mechanical Engineering Division 7. Bellman Flooding Algorithm (continued) c) The squares, front, right and left; joining the above squares, with no separating walls, are also numbered by the time constant taken to travel there from the target square. d) The c) process will be continued until the flooding stops when the square being renumbered is the current mouse square. e) The mouse makes the fastest move from the current mouse square by selecting the lowest flooding number. f) If the flooding encounters a situation where there are two possible routes, with the same Bellman number, then the mouse will select the route with the following priority as straight first. Otherwise, the algorithm chooses the route with lower flooding number.

9 July 20049 School of Engineering, Mechanical Engineering Division 7. Bellman Flooding Algorithm (continued) 30272421242500 33262318152801 34372017120902 43404314110603 46415249080704 47424546474805 S435249100906 Bellman Flooding Array

10 July 200410 School of Engineering, Mechanical Engineering Division 7. Bellman Flooding Algorithm (continued) EESSWWN NESESNN NWESESN ENWESEN NNESEEN NNWWWWN SNENEEN Bellman Direction Array

11 July 200411 School of Engineering, Mechanical Engineering Division 7. Bellman Flooding Algorithm (continued) Determine next square for micromouse Instruct the micromouse to move to new square Update wall information on move Wait for micromouse to reach new square A B

12 July 200412 School of Engineering, Mechanical Engineering Division 7. Bellman Flooding Algorithm (continued) Has wall information Changed? Re-calculate Bellman Flooding Array Check Flooding direction Yes No A B

13 July 200413 School of Engineering, Mechanical Engineering Division 8. Does Bellman Flooding Algorithm Work Well? From the Bellman flow-chart, it is easily to point out that every new wall information update, the algorithm has to re-calculate again. It may cause too much CPU time for a high speed micormouse. To overcome this, a suggestion is to re-calculate the flooding array only when it really needs such as to obtain a back-track path or a dash path. A simple expert algorithm is proposed to resolve the micromouse movement when it reaches a new square. An expert rule array is used to determine the next move, front, right or left. Since no calculation involved, this algorithm only requires the minimum CPU time. It is very effective for a fast speed micromouse.

14 July 200414 School of Engineering, Mechanical Engineering Division 9. A Simple Expert Maze Solving Algorithm The algorithm assumes each square in the maze is a junction. A pre-determined rule will be assigned to the square. If the micromouse reaches this square, the rule will be draw from the expert rule assay of this square to decide the next move. The expert rules are derived from the movement, front, right, back and left.according to the priority of checking the openings in the square. There are total 24 rules. They are North-East-South-West, North- East-West-South, North-South-East-West, North-South-West-East, North-West-East-South, North-West-South-East, and etc. The assignment of the top priority of expert rules to each square can be done according to the design of past competition mazes. The second and third priorities are assigned either according to the outcome of the movement that leads to the goal or starting square.

15 July 200415 School of Engineering, Mechanical Engineering Division 9. A Simple Expert Maze Solving Algorithm (continued) 0 1 234 5 67 North Expert rules assignment for the Algorithm

16 July 200416 School of Engineering, Mechanical Engineering Division 9. A Simple Expert Maze Solving Algorithm (continued) Determine next square for micromouse Instruct the micromouse to move to new square Update wall information on move Wait for micromouse to reach new square B A

17 July 200417 School of Engineering, Mechanical Engineering Division 9. A Simple Expert Maze Solving Algorithm (continued) Has wall information Changed? Re-calculate Bellman Flooding Array Check Flooding direction Yes No A B Back-track or dash run Check expert rule direction Yes No B

18 July 200418 School of Engineering, Mechanical Engineering Division 10. Conclusion The Expert Rule Maze Solving Algorithm is applied in the school micromouse kit that performs outstandingly. It reduces the paused time whenever the micromouse reaches new junction square. The values of time constants assigned for the flooding array are reduced to 1 for the diagonal dash path. But it requires a software to covert the dash path from curve turns to diagonal turns. My experience in the micromouse project is the speed of micromouse playing a vital role beside the maze-solving algorithm for winning the championship title in a competition.

19 July 200419 School of Engineering, Mechanical Engineering Division Thank You!


Download ppt "July 20041 School of Engineering, Mechanical Engineering Division Singapore Robotics Games 04 Symposium Title: An Efficient Maze Solving Algorithm for."

Similar presentations


Ads by Google