botZilla : A Programming Challenge.

by Steve Baker


Frequently Asked Questions:

Can we enter as a team?

No - this game is strictly a single person contest. Whilst we obviously can't stop a group of people collaborating, it is intended to be a solo effort.

Why can't I submit my program in JAVA/FORTRAN/ADA/SNOBOL/COBOL/LISP/... ?

Because we have to link your program to the city simulator and have it be portable between Windows and Linux and it's just too much of a problem to support other languages.

Maybe in the future we'll include more languages if there is high demand - but for the moment, it's completely out of the question.

Why are there all these horrible restrictions on the libraries we can call and the headers we can include?

The idea is that you write all of the code for the robot yourself - pulling in external libraries would muddy the waters and make this a less 'pure' activity. It also makes the build environment easier to manage and keep portable if we don't have to worry about what versions of what libraries each bot needs.

OK - so why do you allow a handful of math and string functions?

Because these are things that are likely to be needed by even the most basic bots - and nobody wants to rewrite the trig functions themselves.

But it's tough to debug a robot without standard I/O and such.

There is nothing to stop you using standard I/O and any other libraries while you are debugging your robot. Just be sure to strip all traces of that out before you submit it or you'll be disqualified.

Why aren't there more fancy commands for the robots? What about powerups? What about taking into account the 3D nature of the buildings? What about having a less regular city layout? What about monsters that fly? How about 'Capture the Flag' or 'King of the Hill' contests?...etc.

We didn't want to scare people off from participating by making it overly complex. Now we are in the second year of the contest, we have added a few new features - but we plan to do this slowly and carefully.

Why can't my bot shoot over the top of those low buildings?

Because the graphics that you see are only a rough representation of the actual combat arena that the robots are fighting in. As far as they are concerned, the world is a two-dimensional place. Buildings and enemy bots might as well be infinitely tall for all they care about, rubble and dead monsters don't exist for them as anything other than flat ground. Buildings collapse instantly for them - and the smoke and flames that result don't exist.

Why doesn't the graphic display exactly reproduce the simple design of the 'world' as seen by the bot software?

I wanted to make the competition be something that non-programmers could appreciate and understand. Adding eye-candy makes it much more interesting to watch. Programming as a spectator sport! The graphic is a way for mere mortals to watch and understand the more abstract underlying action that we programmers are to be concerned about.

Can I customise the look of my Bot?

Not right now. The graphics for the bots use some unusual tools that I happen to have access to at home - and they had to be turned out in record time. There are about 15 pre-made models to choose from.

It would be nice to allow some of the excellent 3D graphic artists out there to join in by contributing robot designs...but again, that'll have to wait for some future version.

The one thing you can do is to choose which robot has which graphic. Read the comment at the top of data/robots.dat to see how to do that.

Can I run this on a Macintosh/FreeBSD/SGI/Sun/BeOS machine?

Maybe. The PLIB library that the game uses is pretty portable and has run on all of those platforms at some time in the past. I'll try to help you if you want to do that - but there are no promises.

I have a Windows machine at home - but no C/C++ compiler.

Download the free Microsoft Visual C++ Toolkit 2003 from It contains the compiler and libraries needed to build 'bots, but no IDE or debugger.

Hey - No Fair! You know how the City Simulator works!

The full source code for the City Sim is in the download package for your reading enjoyment!

I judged the first event - so I didn't enter a bot this year. However, the 'complex_robot' sample code is mine - and it's pretty competitive.

I have a machine at home - but it doesn't have a good graphics card can I still participate ?

Well, probably not. That's unfortunate. The graphics engine uses a fair amount of graphical horsepower.

What if I find a bug in the system?

Please let me know. If this happens, I'll fix it as soon as I can and get a new version out to everyone as quickly as possible. That's why it's important for all contestants to sign up to the mailing list.

So far, the city simulator code looks to be extremely robust. Suspect a bug in your own robot code first!

Who put this together?

I'm Steve Baker - I wrote the rules, did the programming and modelled some of the buildings. My 14 year old son, Oliver built the bots, animated them and made the rest of the buildings. We did it for fun, for free, in our own time over a single marathon weekend session.

Thanks are due to David Lenihan who ported my code from Linux to Windows and made other valuable contributions.

Numerous OpenSource enthusiasts from all around the world contributed to the PLIB library on which this game is based.

That Building Looks Vaguely Familiar?!

Many of the buildings in the game are models of actual buildings in 'historic downtown' area of Cedar Hill. The Telephone Exchange, Sam's Pizza, the Old Bank, Williams Chicken and some of the light industial buildings down by the railroad track have been turned into computer graphics for this project.

Can I build the City Simulator from source?

Yes, the sources are included in the package. You'll need to download the PLIB library from - however, there shouldn't be any need to do that because the robot code is linked dynamically by the main program.

If a program crashes during the run, how will you know which one it was?

Ack! I wish you hadn't asked that!

Clearly, it's not possible to know for sure. I really, deeply hope this doesn't happen - and if it does that it doesn't change the results of the contest. I'll run the game from inside the Linux debugger - that will narrow down which bot's code was executing when the crash happened. That doesn't *PROVE* that bot was the cause of the problem - but it raises a red flag. We'll take this as we come to it. The phrase "The Judges Ruling Is Final" is a handy one here!

I encourage everyone to write secure, reliable code that takes no risks. Being the winner of the contest will have bragging rights associated with it. Losing after a noble fight loses you little face. But seeing your program crash and burn in front of all of your co-workers is NOT GOOD!

Where can I ask questions?

Please email questions to the mailing list - that way, everyone gets to hear the answers and they are archived - so it's fair for everyone.