dib, a robot for the ICFP Programing Contest 2002

dib is written in Ocaml, a language in which we had a total of one
man-week of experience before the contest started.  But hey, good
learning oppportunity, right?  We further handicapped ourselves by
being thousands of miles away from each other.

dib uses a very straightfoward strategy.  It keeps track of locations
of packages and unexplored bases, heading for the nearest instance of
either, then picking up a group of packages likely to maximize its
points per turn while delivering.  The high-level strategist also
checks for immediate opportunities to push another robot into water
and does so.  The high-level strategy is stateless; instead of forming
a plan and following it, instead every turn it recomputes from scratch
what to do. This has disadvantages (performance, determining progress
towards a goal) and advantages (automatically copes with interruptions
like pushing or someone else picking up the packages you're heading to).

For low-level movement strategy, dib computes a global pathfind
ignoring other robots, then runs a pattern matcher against a
collection of hand-coded template situations (see patterns.dat).
The first matching pattern determines what actual movement is made.
The pattern matcher is used to go around robots that are in the way,
backing out of short 1-wide corridors, running past robots without
getting "dunked", lying in wait for robots to try to dunk them, etc.

The bidding is handled with a completely independent, parallel
subsystem, which waits to find out exactly what the command is, and
then analyzes the command and robots in proximity to determine the
best bid.  For each other robot, dib keeps an estimate outbid amount
that it thinks it needs to bid if it needs to compete with that
robot.  This is updated by incrementing it by 2 every time there's
an apparently-lost-bid. The bid subsystem automatically bids extra
to dunk and avoid being dunked.  Based on whether the other robots
might be moving to the current square or the destination square,
the bidding system computes a positive or negative bid sized to
outbid all the others.

dib was written by Team Solecist: Dan Schmidt, Sean Barrett, and Dan
Shiovitz.
