FaladosQuickSilver
72 Hour Robot
Author: vagabond@netdragons.com
Lanague: Delphi (Object Pascal)
Tool: Kylix Pro (http://www.borland.com/kylix/)
Web Site (Company): http://www.netdragons.com/
Web Site (Personal): http://vaga.flame.org/~vagabond/ 

0.1: Sorry

Sorry about the mostly comment free/messy code.  The base of the program 
was done for the 24 hour deadline.  I didn't have much time to comment the 
code or make it look very nice.

0.2: Special Thanks

Thanks goes out to Ion, my pet cockatiel, who had to deal with me staying 
up long nights programming long after my SO had already left.

1.1: Fancy Display

This program comes with an optional fancy display for debugging and fun.
To enable the nice text output delete the NODISPLAY file (rm NODISPLAY), 
to turn it off again, create a NODISPLAY file (touch NODISPLAY). Turning
the fancy display on will cause a sleep for 50ms between turns.  Average 
turn time with the display off is less then 500ns (1.8Ghz P4, Debug Code)

1.2: Fancy Display Map

'#' - Wall
'@' - Home Base or location of known packages
'G' - Gather Point (See AI 2.3)
'M' - My Robot (always in the map center)
'W' - Water
'-' - Shore Line (next to water, higher movement cost)
'R' - Another Robot, without any packages
0-9 - Another Robot, carring the number of packages indicated
'%' - Another Robot, carring 10 or more packages

2.1 AI Overview

The AI is fairly basic, just a bunch of states that cause the robot to 
reacte in different ways.  Some randomness is programmed into the bot to
prevent it from getting involved with bots with the same (similar) path
finding abilities.  

2.2 AI Path Finding

The path finding starts at the end point and fills the map with movement 
costs.  The best (shortest) path is always found.  To prevent the robot
from getting close to water shore lines (open spaces that border water) 
are given a higher impendence value.  Randomness is programmed into this 
AI.  If going North and West provide the same step value then a
random direction will be selected.

2.3 Gathering

The robot uses some tricks when other bots aren't around (within 12 
turns).  The robot will pick up and drop off all packages in an area on
the same spot in the oppisite direction of their intended destination 
(worse possible path).  If the other players haven't scanned the package 
list at the given locaion they either have to waste their time to checking 
all package drop points or ignore the robots hidden stash or packages. A 
different gather drop point will be picked for every gathering session.  
This prevents new players from learning of old gather areas.

2.4 Bidding

The robot will always bid 1 if another robot isn't near by.  If the robot 
can be push bidding values go up based on the desperation of the 
situation. For example the robot will be very high to avoid getting pushed 
into water.  If another robot is 2 turns away, i.e. it has to chance to 
push/be pushed after one of us moves the bid is set to -1.

2.5 Push to Oblivion

This will push another robot that has packages to its death if the chance 
presents itself.  The price the robot is willing to pay is 150% the 
average cost of delivery on the map.  100% is used to push the robot to 
the water, 50% used to push it in. All 150% is used if it's just one 
turn away. 50% is used the first turn, 100% the second if it's two turns 
away.  
