Brainhack 2024: Mastering the Drone Maze Challenge

Sharmaine Teo was part of the Tech Showcase team at Brainhack 2024 — DSTA’s flagship event to unite tech enthusiasts, developers. She and fellow drone aficionados designed an intellectually stimulating challenge: the Drone Maze. This year, participants were tasked with navigating a RoboMaster TT drone through a complex 5x5 grid maze, showcasing their skills in coding, problem-solving, and robotics. With only fifteen minutes to perfect their code and achieve the fastest exit time, the competition was intense.

d*classified
d*classified
4 min readJun 14, 2024

--

The Maze and the Drone

The maze itself, a grid of 5x5 cells, each measuring 60 cm by 60 cm with a height of 120 cm, was filled with potential obstacles in the form of walls between the grids. The goal: guide the drone from its starting point at grid 3 to the exit at grid 23. However, navigating this maze required a combination of precise control, clever algorithms, and the ability to dynamically map and traverse the maze.

RoboMaster TT drones, equipped with time-of-flight sensors and vision positioning systems, were the stars of the show. The time-of-flight sensor allowed the drone to measure distances to obstacles, while the vision positioning system used a downward camera to estimate the drone’s coordinates on a special carpet with unique patterns, ensuring accurate navigation through the maze.

The Starter Code

Participants were provided with starter code, a crucial foundation to build upon. This code outlined the basic structure for navigating the maze, utilising the djitellopy Python library to command the drone and the networkx library to model the maze as a graph. However, the starter code contained planted bugs that participants needed to identify and fix to successfully complete the challenge.

Identifying and Fixing Bugs

All engineers cut their teeth fixing problems!. We were very sneaky and slipped in some bugs within the starter code to hinder the drone’s navigation. Some bugs included:

  • Incorrect Maze Dimensions: The code incorrectly listed the number of rows and columns of the maze, leading to errors in grid indexing and pathfinding.
  • Incorrect Angle Rotation: Errors in the rotation logic caused the drone to create incorrect edges between nodes, resulting in a flawed maze map.
  • Inefficient Pathfinding: The depth-first search algorithm was not optimised, causing the drone to waste time retracing steps unnecessarily. Optimising the search priority could significantly increase time savings.
All who wander are not lost

Evaluation

The Drone Maze Challenge at Brainhack 2024 featured a two-tier system to test participants’ skills comprehensively. The first tier focused on identifying and fixing intentional bugs in the starter code with successful debugging earning participants 50 points. The second tier challenged participants to optimise the drone’s pathfinding algorithms, enhancing the efficiency of the backtracking mechanism and prioritising search paths to minimise navigation time, which could earn an additional 20 points. This tiered approach ensured a balanced evaluation of both problem-solving and optimization skills.

Stumped by buggy code
Next year’s maze design — just kidding
Next year’s Drone Maze Challenge — Just kidding! Photo by Benjamin Elliott on Unsplash

Maze-masters

The Drone Maze Challenge at Brainhack 2024 was a testament to the participants’ ingenuity and technical prowess. Our team of budding engineers cum maze-masters enjoyed immersing fellow geeks in the fascinating intersection of robotics, coding, and problem-solving, fostering a community of tinkerers ready to tackle the challenges of tomorrow — one drone flight at a time.

Drones dream team from Air Systems Programme Centre & Digital Hub

Let your imagination take flight at DSTA

Excited by astro-aerospace engineering and drone technology? There could be a thinker and tinkerer in you that seeks a greater challenge and a community with us. Learning never stops — chart your next adventure, and push the envelope in defence tech with us through the Young Defence Scientist Programme.

Slide into our DMs here to fuel your passion for science and technology and be mentored by Singapore’s top engineers and developers

The PC4-DH Tech Showcase team:

Sharmaine Teo, Bryan Chai Siong Yi, Rayna Phua Mei Xuan, Samuel Lee Wen Jin, Luo Xin Yue, Yong Donovan, Benjamin Loo Qi En, Nigel Lee Hong Wei

--

--