ICFP 2002 Programming Contest Entry

Andrew Mann<am_spm@tccgi.com>


  This is coded in C.  It doesn't use any external libraries at all.  It took about 14 hours, is about as sloppy as anything can be, and probably wouldn't make too much sense if you tried to read it.

  The "combat" functionality of it is sorely lacking - just didn't have the time to put it in.  Player bid tracking, Combat Bot identification, "Exploration" optimization, and a map generation algorithm that isn't slow as hell all didn't make it in.


  If you want to compile, simply use:
gcc -o player bases.c debug.c distancelist.c errors.c game.c logic.c map.c network.c packages.c players.c protocol.c main.c

  GCC at least version (gcc version 2.96 20000731 (Red Hat Linux 7.1 2.96-85)) will generate a pile of garbage with this source given any optimization flags.



  Edit debug.h and recompile to turn on various levels of debugging.  DEBUG must be defined for any of them to do anything.  Use #define ANSI_VIEW instead of DEBUG_MAP if you have a terminal that understands ANSI codes (no colors used, but the screen positioning is).  A nice combination is:  DEBUG, DEBUG_PROTO, DEBUG_LOGIC, ANSI_VIEW, DEBUG_INIT 

  DEBUG_MAP will probably generate output too fast to make any sense of.  ANSI_VIEW doesn't show players that didn't move during the turn.  It should have, but there's probably a simple bug in the player tracking. Players are shown by their ID mod 10 to always have a single digit 0-9.  Multiple players can thus have the same number, but it's still not too hard to follow in simple games.



  The submitted binary has all debugging turned off.




