Dang 2010
Dang 2010
Abstract—this paper presents an efficient IEEE standard robot represent the distance from any cell on a maze to the
maze-solving algorithm. According to the actual situation of destination cell. The flood fill algorithm mainly contains four
the robot searching maze, this algorithm improved the flood parts: update walls, flood maze, turn determination and move
fill algorithm in maze-solving. Comparing with the results of to next cell. The four parts of this algorithm is introduced in
using flood-fill algorithm directly, experiments show that this [2].
algorithm works better and more efficiently, and also, it has
the advantage of little searching time and high speed of maze- III. PROBLEM OF THE FLOOD FILL ALGORITHM
solving. So it can be used to some areas like robot finding path.
Although the robot using flood-fill algorithm can find the
Keywords-robot; maze-solving; finding path; intelligent shortest path to destination, but some problems still exist
algorithm when using this flood fill algorithm in the process of maze-
solving. The problems are shown as follows.
• First, in each cell the robot arrived, it must run the
I. INTRODUCTION
four steps: update walls, flood maze, turn
Today, robots are used in more projects as substitution determination and move to next cell. That’s the
for human. In most of these projects, robots should move or problem. Time is the key factor in this competition.
walk and find their path. Therefore, the ability of robot to This will affect the robot searching speed extremely.
consciously find their way around the terrain is needed in • Second, flooding one time of a maze with 256 cells
human life. At the present time, a maze-solving robot, self- will costs the robot much time.
contained without using energy source, is more necessary • Third, in order to find the destination as soon as
than it was in previous years. The speed of robot to find its possible, which direction the robot should to make
path, affected by the applied algorithm, acts the main part in when it gets to a cross cell which has two or more
the present projects. In this paper the proposed algorithm is directions have the same value.
used to increase the solving speed and its efficiency. A lot of In this situation, a new algorithm is presented. It works
maze-solving robotic competitions are held around the world better and solves the above problems. The detail is shown in
to achieve faster and superior robots. To test the new the following parts.
algorithm, it is used in one of these competitions, called
"Micromouse" and the algorithm is tested in this kind of IV. THE NEW PROPOSED ALGORITHM
competition's maze. While the rules and the maze of this According to the actual maze-solving, it is found that a
competition is formulated by the IEEE community, and this lot of small channels exist in a maze. Three channels are
robot’s competition is called IEEE Standard Miromouse shown out in Fig. 1 and other existed channels are not shown
Competition today. The IEEE standard maze has 16×16 out. The channel means that once the robot enter, it only can
square cells, and each cell’s length and width are both 18 move to its front cell (here suppose the robot’s front has the
centimeters. Micromouse is a small wheeled-robot that high priority). So, in order to reduce the robot’s calculation,
consisting infrared sensors, motors and controller and act. It there is no need to perform the four steps in those channels
can find the optimal path to get the destination automatically when it comes to searching the maze.
in the IEEE standard maze. Generally, the destination cell is
center cell in 16×16 maze. The start cell is the left down
corner cell or right down corner cell. This is very important.
About this competition’s rule and the IEEE standard maze is
introduced in [1]. In this paper, after overview the flood fill
algorithm in section 2, the problem of flood fill algorithm is
introduced in section 3. And then, in section 4 a new
proposed algorithm is presented and in section 5 the results
are stated. Finally, conclusion is given in section 6.
II. OVERVIEW OF FLOOD FILL ALGORITHM
Flood Fill algorithm is one of the best maze solving
algorithms. The flood fill algorithm involves assigning
values to each of the cells in a maze where these values Figure 1. channel explanation
begain
Update wall
Figure 3. the robot’s infrared sensor location 1,2 the left and right
Is the cell the Y sensor,3,the front sensor;2,4 the left 45 degree sensor and right
channel ? 45 degree sensor.
N
TABLE I. THE WALL INFORMATION .W-WEST;S-SOUTH;E-EAST;N-
Flood maze NORTH
Bit No. 7 6 5 4 3 2 1 0
Wall W S E N
Make choice
The four directions (W, S, E, and N) is the absolute
direction. It’s the direction of maze, so it’s not changed once
Move to next cell fixed; the robot’s direction is the relative direction, its
reference is the robot itself. So it changes a lot while the
robot searching maze. The wall information detected by the
N robot is relative, so the robot must change the relative
Is the end cell ?
direction’s wall information to absolute direction. Because
Y comparing with the relative direction, the wall information is
easier to process and save under the absolute direction. The
end robot’s relative direction is shown in Fig. 4. Number 0
presents the front; number 1 is right; number 2 is the back;
number 3 is left.
Figure 2. the new algorithm flow chart We define 0 as the North of absolute direction; 1 as the
East; 2 as the South and 3 as the West and RDIR as the
current relative direction, ADIR as the absolute direction.
A. Update the Wall The RDIR is changed often when the robot making turn
According this new algorithm, we assume the robot only action. At the begin, RDIR = 0 , if robot turns right,
can turn four directions in each cell through building the four the RDIR add 1; if robot turns back, RDIR add 2,if
directions’ coordinate system. when the robot stays at a new the RDIR > 3 ,then the RDIR = RDIR %4 ; if the robot turns
cell, the first thing it should do is to detect its right, left, front left, RDIR subtract 1, if RDIR < 0 ,then the
and back, checking whether there has a wall in that direction.
The detecting method is using the infrared sensor which is RDIR = RDIR %4 .
installed on the robot. The location of five installed infrared In order to change the relative direction to absolute
sensors on the robot is as shown in Fig. 3. Actually, it only direction, the converting table is showing in table 2.
needs to detect the right, left and front direction. Because it Using this table the robot can easily change its direction, and
comes from its back, so this direction always has no wall. then save the wall information to the right bit. Firstly, we
While these walls will affect the distance values in the maze, define absolute North as the front of the robot’s relative
so we need to keep track of them [2]. There are 256 cells in a direction when it begins to start. This situation the
real maze, so 256 bytes will be more sufficient to keep track RDIR = ADIR .The RDIR records the robot’s current
of the walls. There are 8 bits in the byte for a cell. relative direction, so if the RDIR = 3, that means the robot
The first 4 bits can represent the walls leaving you with current relative front is absolute west. That is the ADIR = 3 ,
another 4 bits for your own use. It is initialized with 0. If the according to this, we can judge out robot’s right is the
south direction has a wall, the S bit is set to 1; if the north absolute north; its back is the east; its left is the south. So it
direction has a wall, then the N bit is set to 1 and the same can easily save the wall information to absolute direction
situation for W, E bit. A typical cell byte is shown in table 1. using this.
80
87
which direction it should turn. For example, if the robot in a
cell with RDIR = 2 and the east of maze has an exit
according the wall information and distance values, that
means the dest _ DIR = 1 , so the CDir = 1 according to (1).
Therefore, the robot must turn left. That’s the right action the
robot should make.
CDir = ( dest _ DIR + 4 − RDIR )%4 (1)
the direction which has the smallest distance values. It’s easy Time Table 8×8maze 16×16maze
to make choice in this situation according to the flooding A3(s) 50.4 251.1
distance values. But there exists another situation we must A2(s) 30.9 83.0
consider. Due to the maze destination is the center of maze
cell and the maze is random. So, there may be appear two or From the Table 4 and Table 5, the results show that the
more directions have the same distance values. In this case, a new proposed algorithm is better. its searching time is much
rule is needed to process this situation. Here, because the shorter than the time of the Deep-first algorithm and the
robot turning action will cost time and limit its speed, so flood fill algorithm. And also the new algorithm has the
moving front has the highest priority, and moving back has advantage of high efficiency of maze-solving and can
lowest priority. The right and left action is random, which is finding the shortest path only searching parts of the maze.
no fixed. In Chinese 2009 IEEE Standard Micromouse
When the robot needs to take action, it must convert the Competition, the semifinal maze and the final maze are
absolute direction to relative direction so that it can know shown in Fig. 5 and Fig. 6. In semifinal competition, one
which action it should make. We first calculate the robot used the new algorithm. Its searching route is shown
CDir using (1). According to table 3, the robot can find out by the real line in Fig. 5, and exhausted time is 109 seconds,
its last spurting route is shown by the broken red line in Fig.5,
81
88
and the exhausted time is 21 seconds. In final competition, operation time largely and therefore, increasing its searching
using the same algorithm, the same one robot searching speed.
route is shown by the real line in Fig. 6, and exhausted time
is 97 seconds, its last spurting route is shown by the broken VI. CONCLUSION
line in Fig. 5, and the exhausted time is 22seconds.and also Maze-solving involves Control Engineering and
is the fastest robot. Artificial Intelligence. Using a good algorithm can achieve
the high efficiency of finding the shortest path. The proposed
maze-solving algorithm works better and has short searching
time and low space complexity, and it is significant for
robot’s finding path in some areas like maze-solving.
ACKNOWLEDGMENT
This paper is supported by projects of the Study on
Digital Broadcast and Television Controller of Shaanxi
province Grant#2008K05-26 and the Graduate Innovation
Fund of Shaanxi University of Science and Technology. We
would like to thank the supports sincerely.
REFERENCES
[1] http://ewh.ieee.org/reg/1/sac/Main/RegionalEvents/StudentConf/Micr
omouseRules.pdf.
[2] Kazerouni B.H.Moradi.“Variable Priorities in Maze-Solving
Algorithms for Robot’s Movement”,Seville:Proceedings IEEE
International Conference on Industrial Informatics. vol. 6,pp181-185,
2003.
[3] Tondra De, Dfew Hall. “The Inception of Chedda: A detailed design
and analysis of Micromouse”,University of Nevada, Las Vegas
Figure 5. the route of the semifinal maze Senior Design. vol. 5, pp39-44, 2004.
[4] Huo Zhe Fu. “A Design and Realize for Micromouse’s Maze-
solving”,Microcomputer Appfications.vol 9,pp59-62. 2008.
[5] Jin Liang Fang, Yi Jun Zhou. “Micormouse Based on ARM of IEEE
Standard”, Machine Building and Automation.vol.5,pp99-101,2008.
[6] UK Micromouse contest, held each year in United Kingdom.
[7] Kazuo Sugihara , John Smith. “Genetical algorithms for adaptive
motion planning of anautonomous mobile robots” ,Problems IEEE
Trans.USA:SIM,19997.
[8] MicroMOuse, California State University at Northridge,
http//homepage.mac.com/SBenkovic/MicroMouse/index.html.
[9] Dieguez A R,Sanz R,Lopez J. “Deliberative on-line local path
plannning for autonomous mobile robot”,Journal of Intelligent and
Robotic Systems,vol. 37,pp1-19,2003.
[10] http://www.micromouseonline.com.
[11] MicroMousel02 IEEE standard Micromouse data manualm, 2007.
[12] LV Qiang WANG Ke-ke.“The Research of Range Measurement
with Infrared Sensor in MicroMouse”,Micocomputer Information.vol.
12,pp118-120, 2008.
[13] Chatila R.“Path Planning and Environment Learning in a Mobile
Robot System”, In:Proc of the European Conf on Al,1982.
[14] Frank Lingelbach.“Path Planning using Probabilistic Cell
Figure 6. the route of final maze Decompostition”,Proceedings of the IEEE Inetmational Conefernce
on Robotics and Automation(ICRA), New Orlenas LA, 2004.
Above all, there always have a lot of channels in a maze, [15] Morten Strnadberg.“Robot Path Plnnaing:An Object-Oriented
so this new proposed algorithm decreases the robot’s Approach”,Automatic Control Department of Singals, Sensors and
Systems Royal Institute of Technology, 2004.
82
89