                        Mostly Harmless

                       Team "Camls 'R Us"


This is our submission to the ICFP2002 programming contest.

The Camls 'R Us team, this year, is composed of

          Maxence Guesdon  (research programmer)
          Xavier Leroy     (researcher)
          Luc Maranget     (researcher)
          Pascal Cuoq      (PhD student)

all from INRIA Rocquencourt.

The program is written in Objective Caml 3.06, and provided as a
statically-linked executable in ./runme.  Sources are in src/ if there is 
interest.

Note: the program outputs informative messages to stdout.  Hope this is OK.

The program implements a non-aggressive two-level strategy:

- A "planner" suggests long-term actions such as "move to (11, 11),
  pick packages 2 and 3, move to (4, 11), drop 2".  
  It completely ignores the presence of other robots, focusing on
  delivering as many packages as possible while minimizing the total
  distance traveled.

- An "executor" then takes the "move to" orders from the planner and
  decomposes them into "move [N|S|E|W]" individual steps.  In single-robot
  games, this is a standard shortest path algorithm.  In multiple-robot
  games, the executor detects other robots in its neighborhood,
  and takes evasive manoeuvers to try not to get in contact with
  another robot.

Basically, we try to do our job of delivering packets, and leave robot
fights to others.  This strategy seems reasonably effective in
single-robot mode, and also when there are few other mostly
non-aggressive robots.  It has a hard time against highly aggressive
competitors, and in crowded maps too.

There is one exception to our tree-hugging behavior: if the planner
fails to find any package to deliver (e.g. in endgames), or if it dies
on an exception, the robot goes berserk and starts hunting down the
nearest package-carrying robot.
