Autonomous Line Maze-Solving Robot

Small robot that will be able to map out the shortest possible to the finishing point utilizing Flood Fill algorithm (Micromouse)

Similar projects worth following
Using a Pololu 3pi robot, I will attempt to autonomously traverse a self-made line maze and find the shortest possible path to the finishing point using Flood Fill algorithm. The maze will include obstacles such as dead ends and infinite loops so that the robot will not be able to find the finishing point simply with left or right hand maze-solving algorithms. After mapping out the shortest path, the robot will traverse the maze one final time with better speed and maneuvering to cut time off its run.

My project aims to create a robot that is capable of mapping out an unknown maze and then navigating the shortest possible path through the maze in the least amount of time. The idea for this project is based off of the Micromouse competition, and the robot and maze will follow the majority of the Micromouse regulations so that the robot could theoretically compete. Outside of the Micromouse competition, it seems that many robotics hobbyists as well as university research teams are looking at different methods and algorithms for maze mapping and solving. There is even a push to introduce amateurs and beginners to the fundamentals of robotics through Micromouse-esque competitions. This type of project combines many skills such as CAD, electronics work, construction, and programming, all while keeping the designer engaged with the desire to perform well in competition as an incentive. For that reason, research has been done to create a cheaper Micromouse teaching kit geared towards economically disadvantaged students and areas.

The concept of having a robot map a foreign environment can be applied to numerous real world functions. For example, self driving cars need to have the ability to detect shifts in a constantly changing environment and adjust accordingly. Similarly, mapping technology could also be applied to robots that map caves, explore new areas, or perform search and rescue operations. The idea of finding the shortest possible path is also very important in a variety of fields. The algorithm I plan to use, Flood Fill algorithm, is not just limited to the function of finding the shortest path. In computer science, optimization of a program is a key component just as traversing the shortest possible distance in a maze is. A faster program means less processing power and less time needed to execute. In real life, optimization of anything equates to a more efficient use of time and resources.

There are multiple objectives that I have set for my project. As I already stated, the overall goal of the project is to create a robot that can map all mazes and solve them by traversing the shortest path from beginning to end. In terms of cost, I would like to keep the 3pi and additional parts around at most $150. This would be easily doable if I substituted some of the parts for cheaper items (ex. cardboard wheels), but for the sake of function, I am opting to use better parts. With regard to maze completion time, I am still not entirely sure what I should set the goal for, since I am designing my own maze and there is no precedent run time to compare to. So I will just set an arbitrary goal run time at 15 seconds. For the maze, I would like to make it at least 56”x44”, which is a 2x2 grid of standard poster board sheets. I would also like to make these sheets interchangeable so that I could create more than one maze.

The maze should be fairly easy to build. I will use poster board and black electrical tape so the materials costs are minimized. I have found a tutorial for building your own line mazes on the Pololu website. To create the robot, I am taking the existing 3pi and switching out the motors to make them compatible with encoders, which allow me to measure distance traveled. For the programming, I will look at various pseudo codes and write most if not all of my program from scratch. I plan to use Arduino in order to accomplish this, since I am already familiar with the program and according to the internet is actually a suitable platform for such projects.


  • 3pi robot
  • Encoder/motor/wheel set
  • Poster board and tape


Current Timeline

I would like to complete all construction of the maze and robot by 1/8/18. The working maze solving code should be completed by 3/5/18, which would give me approximately another month to iron out the details and test my robot.


CAD of maze layout

AutoCAD DXF - 16.54 kB - 03/13/2018 at 15:10


  • 1 × Pololu 3pi robot
  • 2 × Motors 30:1 Micro Metal Gearmotor HP 6V with Extended Motor Shaft
  • 2 × Encoders Optical Encoder Pair Kit for Micro Metal Gearmotors, 5V
  • 1 × Black 3/4" electrical tape
  • 4 × 22" x 28" white poster board

  • update 4

    lbinder5 days ago 0 comments

    I have since completed construction of the maze and tested the robot's basic functions such as turning in the maze. I also decided that I want to use flood fill rather than Dijkstra's algorithm to map the maze. I am now in the process of installing encoders onto the 3pi.

  • Update 3

    lbinder01/07/2018 at 18:16 0 comments

    Since my last update, I have tested and confirmed that the basic functionalities for my 3pi robot are working fine. I am now in the process of sketching out my maze design onto the poster board and will tape it over once I am done. I have also looked at what I will need to do in order to switch out the existing 3pi motors for my own, and will be ready to solder them as soon as I am finished with the maze construction.

  • Update 2

    lbinder12/05/2017 at 00:21 0 comments

    I've since finished the design for the maze, and will begin construction as soon as my materials arrive. I'm also waiting for the motors and encoders to modify my 3pi robot for this project. In the meantime, I have added the 3pi libraries to Arduino and I am starting to code the 3pi to perform basic tasks involving maze solving, so I can become more familiar with the technology.

  • Update 1

    lbinder11/03/2017 at 03:45 0 comments

    I have now determined the methods I will use to both map out the maze and find the shortest path to the finish point. I have also placed my parts orders necessary for modification of the 3pi to complete the goal of this project. In addition, I have begun designing the maze on Autodesk Fusion 360.

View all 4 project logs

Enjoy this project?



Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates