PROJECT DOSSIER // [LEM-IN / A-MAZE-D]VIEW SOURCEBACK TO PROJECTS →

01 // PROJECT AT A GLANCE

LEM-IN / A-MAZE-D

C

Moving a whole colony across an ant farm, as fast as possible.

The program is given a plan of rooms connected by tunnels, and a number of ants to move from one end to the other. Each room can hold only one ant at a time, which creates traffic jams: the challenge is not finding a path, but distributing the colony intelligently over several paths to minimise the number of turns.

Analysing a graph of rooms and tunnels, searching for disjoint paths and scheduling the ants' movement turn by turn.

PRIMARYC
DELIVERYTEAM RECORD
VERIFICATIONCriterion
SOURCEINSPECTOR READY
MEDIA ATTACHMENTS (Images, Photos, Videos)

03 // KEY OUTCOMES

  • Exhaustive path enumeration with pruning by the length of the best known path
  • Robust parsing of a deliberately treacherous input format, with reprinting of the parsed input and precise warning messages

BEYOND THE BRIEF

  • A library enriched with a homemade my_printf and get_next_line, reused for all the parsing
  • Criterion tests on parsing

04 // SOURCE TREE

READING SOURCE…