Micromouse Maze Solving: Flood Fill Algorithm Lecture

Added:

Turn-Weighted A* Search and Dynamic Pathfinding

While the classic Flood Fill algorithm is highly effective for finding the shortest physical path in a Micromouse maze, it assumes every cell transition has an equal cost. This is a critical limitation in competitive robotics, where the goal is the fastest run rather than the shortest distance. Flood Fill neglects the physical dynamics of the robot, such as the time penalties associated with slowing down to turn versus accelerating down long straightaways. Alternative approaches, such as turn-weighted A* (A-star) search or modified Dijkstra's algorithm, introduce dynamic weighting. These algorithms assign higher costs to turns and lower costs to straight runs or diagonal paths. By incorporating the robot's kinematics and acceleration profiles into the pathfinding heuristic, these alternatives find the truly fastest path, which often differs from the shortest geometric path calculated by standard Flood Fill.

Basic understanding of 2D arrays and matrices, and how they can represent a grid-based coordinate system.
Fundamentals of graph theory and search algorithms, specifically Breadth-First Search (BFS) and queue data structures.
Proficiency in basic programming concepts (loops, conditionals, and functions) in a language like C or C++.
Familiarity with the concept of autonomous robotics and the basic objectives of the Micromouse competition.
Implementation of Modified Flood Fill, which dynamically recalculates path values in real-time as the robot moves.
Integration of sensor data (such as infrared distance sensors) to physically detect walls and update the virtual maze map.
Development of motor control systems, such as PID controllers, to translate algorithm decisions into precise physical movement.
Path-smoothing techniques and diagonal-run optimization to speed up the micromouse's run through the solved maze.
Testing and benchmarking algorithms using virtual Micromouse simulators before deploying code to physical hardware.
17.7K views308likes41:16@UCLAIEEEOriginal Release: 2021-02-19

The flood fill algorithm is a shortest-path finding technique used in micromouse robots that works by assigning each maze cell a Manhattan distance value (representing the minimum number of moves to reach the goal), then using a queue-based approach to iteratively update these distances as the robot discovers walls and learns about the maze layout; the robot always moves toward cells with lower distance values, and when it encounters a wall that blocks its path, it recalculates the distances to find alternative routes around the obstacle.