Main
Docs
Samples
ScreenShots
Downloads

SourceForge.net Logo

Updated on 27 August 2003.

Samples

Here are some sample programs for AI Bots II. Before seeing the samples, you should know that the samples are not good programs. They may not win even against poorly designed bots. The samples are given just to demostrate the capabilities of the bot function and to give you a general idea on how to go about writing a program for AI Bots II.

The following samples are ripped from the previous version of AI Bots.

Despo RG (bull.c) : This is one of the older samples, made when bombs had not been built into AI-Bots yet. Just scans for opponents and rams into them. Suitable for any map.

Maverick (maverick.c) : This fellow just moves around randomly, scanning and shooting all the time. Suitable for the map blank.

Seek and Destroy (shoot.c) : This one scans for the enemy and tries to bomb him. Suitable for any map.

Seek and Destroy 2 (shoot2.c) : This one works the same way as Seek and Destroy but moves 10 steps away from the enemy every 100 game time. Suitable for any map.

Sitting Duck (dummy.c) : This guy does nothing. He just stays where he is.

The samples given below are written specifically for AI Bots II. They involve some synchronisation and "inter bot communication".

S.A.D. bot (shootim.c) : This program is an improvised version of seek and destroy. This program assigns tasks for various bots of the team according to their index number. one bot is assigned to shoot the enemy who has the flag, three bots are assigned to patrol the map and one is assigned the function of stealing the enemy flag and retain it. Suited for the blank map, this program does well against most of the other programs including shoot.c .

Jugglers (jugglers.c) : This program demonstrates the use of the passflagto funtion. The five bots form a ring and juggle the enemy flag. This program fails horribly against even the below average bots (Remember, the samples are not designed to win ;-). they just demonstrate the various bot functions). Run this program against sitting duck to see the juggling of the enemy flag.

New Samples

Catch Me (catch.c): This program is an anti-SEEK AMD DESTROY program. The bots go in a circle that passes through the location of the enemy flag. Any SEEK AND DESTROY type bot will keep chasing these bots but will get bombed by them. All the bots go in the same circle. So if the flag bearing bot is in the front of the line, it will suffer the least damage and accumulate a lot of points.

Watch out for new sample programs in this page.