JExpress: Dead Robot Delivery Service
An ICFP `02 Programming Contest entry. Brought to you by: (*) The "Committee" is staffed exclusively by Pat Tullmann UpdateOne of other contestants put up a neat page running different comparisions of the available bots: Visit NetDragons.com comparisons.JExpress does reasonably well, until the 3rd trial. Where it goes into an infinite loop because it can't handle unreachable destinations. D'oh! There goes any chance I may have had... InfoJExpress plays the game in a straightforward manner, picking a base to check out, picking up as many packages as it can, and delivering those packages. It isn't especially intelligent about picking bases (uses closest crow-flies-distance), nor about picking up packages (just first fit). It doesn't even try bidding (always bids 1). It does a better job about delivering to the most "valuable" destination, but it doesn't consider distance to travel (or even if it has enough funds to get there). It uses a textbook A* implementation to get around, though it re-computes the path on every turn (and I have a feeling this will be its downfall). If it gets really desperate for something to do, it will look for random packages dropped on the map, or even for random robots to run into. Though none of that is really tested, so who knows what it will do. Its written in Java, because that's what I know best. I should have stored the computed A* path, at least until it fell off the trail. I could really have used a cleaner mechanism to lazily process the server updates. But, I did manage to get 8 hours of sleep each night :) Submitted tar file (source included): JExpress.tar.gz (requires JDK1.4 to run)Notes:
|
webhead@tullmann.org Last updated on Thursday, March 25, 2021 |