
EPFL · Object-Oriented Programming (C++)
Planet Donut: Multi-Robot Swarm
A semester-long C++ project for EPFL's object-oriented programming course, built with one teammate: a full agent-based simulation (the 'Planet Donut' GUI) of a robot swarm that explores a world, finds resource deposits, and hauls them back to base, all while every robot must keep a live communication link to its home base.
Connectivity is the heart of it. Each robot is a node in a communication graph, and a recursive depth-first search (DFS) walks the graph from every robot to decide whether it can reach the base's central communication robot; robots that can are flagged remote (radio-linked) and may act, while disconnected ones fall back to autonomous behaviour. Communication robots deploy in 8 directions at multiples of the communication radius to maximize coverage.
On top of connectivity sit four coordinated behaviours: prospectors sweep outward in steps of ΔD to detect deposits, foragers are dispatched to any deposit richer than ΔR, and transporters ferry the extracted resources back to base. The strategy was written as a separate module to keep the earlier building blocks stable, and the trickiest bug (segmentation faults) was traced to pointer handling.