2. ABSTRACT
• Algorithm is developed for Micromouse routing
in maze.
• In the algorithm, a Center-First-Theorem is
applied to find out several short roads in maze,
then the shortest road can be find out among
those roads by comparing with each other.
• In practice, it is proved that this algorithm can
reduces error execution and improves efficiency.
3. MICROMOUSE
IEEE micro-mouse is maze routing competition .
It has a center, which is the destination cell for the
Micromouse.
The robot has to search the entire maze and find the
path that it can travel in the shortest possible time.
4. MICROMOUSE RULES
The robot must be completely
autonomous.
The robot must reach the center in the
least possible time.
No external power source is allowed.
5. MAZE SPECIFICATION
The maze in the Micromouse competition consists of multiples of an
18cmx18cm square.
It consists of 16x16unit squares .
The walls of the maze are 5 cm high and 1.2 cm thick
6. MICROMOUSE HARDWARE
• Chassis
• Microcontroller
• Sensors: Analog or Digital
• EEPROM
• Motor: DC or Stepper
• Motor Driver
• Power Supply
• LCD
7. MICROMOUSE SOFTWARE
The Logic Layer: Consist of logic code that would
help the robot decide which cell to move
towards on the basis of the sensor data that it
received
The Motion Layer: It is comprised of Code that
controls the motion of the robot.
8. CENTER FIRST ROUTING THEOREM
ALGORITHM
DETERMINE SEVERAL SHORT PATHS TOWARDS CENTER.
COUNT NUMBER OF STEPS AND STORE COORDINATE
INFORMATION FOR EACH PATH IN A MATRIX.
COMPARE EACH PATH AND SELECT THE SHORTEST PATH.
TRAVEL THE SHORTEST PATH WITH FASTEST POSSIBLE
SPEED.
9. MAZE INFORMATION
• FOUR POSSIBLE PATHS ARE:
– CUL DE-SAC
– STRAIGHT
– CROSSROAD
– T SHAPED ROAD
– TURNING
10. MAZE INFORMATION
• ONE BYTE IS USED TO STORE MAZE INFORMATION FOR EACH CELL.
BIT 3 2 1 0
DIRECTION NORTH(U) WEST(L) SOUTH(D) EAST(R)
BIT 5 4
NO CUL DE- SAC 1 1
1 CUL DE-SAC 0 1
2 CUL DE-SAC 1 0
BIT 7 6
1 SIDE TO GO 0 0
T SHAPED ROAD 0 1
CROSS ROAD 1 0
11. Recording coordinate and information of maze’s
cell.
• The information of cell is recorded in a matrix
whose name is maze and size is 15×15.
• Register named Dir to recording the direction.
DIR DIRECTION
0 NORTH: Y++
1 EAST: X++
2 SOUTH: Y--
3 WEST: Y++
•The original location of micro-mouse is (0, 0), and
the routing direction is north.
12. Recording coordinate and information
of maze’s cell.
DIRECTION CALCULATION
LEFT -1
RIGHT +1
TURNING BACK FROM LEFT -2
TURNING BACK FROM RIGHT +2
•VALUE OF DIR IS BETWEEN 0 AND 3.
•FORMULA FOR CALCULATING COORDINATE:
13. CUT CUL DE -SAC
• When micro-mouse makes a back turning (means there is a cul-de-sac),
both turning back from left and from right, making a marker in a register
whose name is noroad ,with the value of 1 means there is a cul-de-sac
while 0 is no.
• Set values of all cells to FFH, which belong to the cul-de-sac between the
end of it and the crossing cell nearest to it.
• Then ,marker of this direction of the nearest crossing cell is set to 1 to
prevent micro-mouse from selecting this direction when it goes here
again.
14. Implementation Of CFRT
In consideration of the information stored in the
register Dir , micro-mouse selects a direction to go.
If it has only one direction to go, it doesn’t make
choice but just go by this direction.
For a crossing, it chooses the direction pointing to
the end.
15. CALCULATION OF DIR
Dn-1: Former Cell
Dn= Present cell
Where, m = (-2, -1, 0, 1, 2),
At the same time, it uses a times register named times (original value is 0) to alternate
priority of direction x++ and y++ between
Two adjacent road junctions. The value 0 means y++ first and 1 means x++ first.
Dn=dn-1 + m
16. SHORTEST PATH
• Newroad[]: coordinates of present path.
• Short road[]: coordinate of the route searched
out at first time.
• Steps are calculated using th formula:
20. COMPARISON WITH OTHER
ALGORITHMS
• Left-right-straight algorithm(LRSRT): Left side’s priority
is first, right is secondary, and straight is last.
• Left-straight-right algorithm (LSRRT)
• Right-left-straight algorithm (RLSRT)
• Right-straight left algorithm (RSLRT)
• Straight-left-right algorithm(SRLRT)
• Straight-right-left algorithm (SLRRT)
• Random algorithm (RRT): Each side’s priority is same
and which side to choose is random.
22. CONCLUSION
• By analyzing in theory and carrying it out in
practice, we conclude that Center First
Routing algorithm can avoid a lot of work in
information recording, repairing and
managing, and can improve efficiency. At the
same time, it makes the
• Programming of route searching become
easily and reduces error execution in practice.