ICFP 2002 entry for OaSys
see http://icfpcontest.cse.ogi.edu/ for details of contest
Contact: Terry Stewart at terry@oasys.ca
Version 2 (non-lightning round submission)


Overview:
  A fairly simple little program.  Here's the basic logic:
     if we can drop packages to get points, do so
     if we can pick up packages, pick up groups that go to the same
         destination, if possible.  Choose the optimal group for the most weight, and bias selection
         to choose lots of small boxes rather than a fex large ones.
     if we have packages, go towards the closest one's destination
     otherwise, go to the nearest base (ignoring ones we are pretty sure are empty)
  When going towards a particular location, it will try to avoid running
    into or near other robots and going near water (as long as that doesn't slow it down getting to its target).
    it also has a 75% chance of running away if its path is blocked by another robot.  This is to
    avoid deadlocks.
  Finding a path to a location is done by determining the distance from every point on the map to
    the target (up to as far as the needed point), and caching this data, of course.

Notes:
 The entire code is just one python script file.  I've included a really
silly 'buildme' file, as requested, which makes an equally silly 'runme'
file.  I hope they work on the test system -- my shell script skills are
rather rusty.

 The main idea with this robot is to avoid
conflict and thus hopefully avoid the deadlock situation (where two or more
robots are repeatedly pushing each other and getting nowhere).  In the
short term, cooperating helps all robots in the game, but I'll assume that
in the long run it'll benefit me.

 Travelling is done by moving to the square around the robot that is closest
to the destination.  if a square is near another robot or water, the distance
is increased by 1.  This means that the robot will choose a route around a robot or
water, if one is available that is just as close (note that you can't have two
destination squares whose distances are less that 2 apart).  To avoid runnning into
deadlocks in tunnels, we have a 75% chance of adding 3 to the disance if a robot
is right on the square we're trying to move to.  This will cause the robot to back up
down a tunnel.  It's not 100% because then we get another deadlock if two shy robots
meet each other.




