This is a submission for ICFP 2002, from Ian Lance Taylor.

The program is written entirely in C++.  There were probably no real
advantages over other languages, and the obvious disadvantage of
verbosity.  But it's what I've worked with most recently.  The C++
Standard Template Library provided many useful data structures.

I computed paths on the board by doing a breadth first search from the
destination, assigning a distance at each point to the destination.
Following the path is then simply a matter of choosing moves which
decrease the distance.

The program uses a set of strategies.  A strategy may suggest an
action to take.  Each strategy is called at each turn.  The most
highly recommended action is taken.  Some strategies are ordered to
execute after others, and examine the current proposals.  This is a
simple-minded blackboard system.

The program has no notion of a plan.  Each strategy examines the
current state and makes a decision.  The only memory of previous turns
is how often the robot was bumped by other robots in recent turns.
This approach appears to be reasonable, although it does mean that the
robot can get into a loop with other robots.

If I were doing this again, I would change the strategies to propose
goals, rather than individual actions, so that strategies which
examine results would have more information.

Each strategy has a value which applies to its suggestion.  The values
were determined heuristically.  It would be nice to run a competition,
perhaps with genetic-style alteration of values, to choose good ones.
But I didn't have time.

I thought of various strategies which I didn't have time to
implement.  The implemented ones are, in approximately decreasing
value:

* If caught between another robot and water, get away.

* Drop packages at their destination.

* Do something different if we are being bumped continuously.

* Pick up packages at the current location.

* If we are next to a robot next to water, push it in.

* Do something different if we have been bumped several times recently.

* Move to the nearest destination of a package being carried.

* Move to the nearest home location which has (or may have) packages.

* Move to the nearest package.

* Move away from water, if there are other robots nearby.

* Move in a random direction if there is nothing else to do.

* Move to the nearest empty home location.

* Move away from other robots.

My ten month old daughter had several screaming fits last night, and
woke up for good about 4am.  Oh well.  This code probably represents
about 24 hours of solid programming, spread over the three days.

This was a good contest.  Thanks for running it.

Ian Lance Taylor
ian@airs.com
