Homework #4

AI Bot control


Description

For this assignment, you will be required to create two things:

·        Create a simple level.

The only requirement for this is that there are several separate rooms and that the level is fully and correctly pathnoded. Don’t forget to put lights in your arena!

·        Create a custom GameBots.

GameBots is an implementation of an API for controlling bots in the game from a remote application.  GameBots consists of a full game mod of UT, and a Java client interface.  Each agent logs into UT separately via sockets and controls a character bot.  You need to program an AI agent by modifying the GameBots code, specifically, ExampleBot.java.


Setting up your homework project

1.      Download BotAPI from here. Extract it to your UT2004 directory.

2.   Add botapi package to UT2004.ini, and compile the package. If you are using WOTgrealDeveloper, open the GUI, click “UT2004” from menu, and then click “Refresh package/class tree”. You should see “botapi” in the class tree. Now, compile that script by clicking “UT2004”, and then “Compile scripts”.

3.      Download the botapi.ini and botapi.int from here, and extract them to UT2004/System folder.

4.      Play UT2004, choose “Instant Action”, you should see four new game types, one of which is “Remote Bot Team Deathmatch”. Choose that game type, select any map, change the number of bots to zero, and start the game. Switch out of the game, but leave the server running.

5.      You can download GameBot from here. The command line to run it is “java -jar JavaBots.jar” If your computer has JDK in windows, you should be able to run JavaBots.jar by double click it.

6.      From the GUI, select “Team” then “Add Bot”, and accept the default options (class: edu.isi.gamebots.examples.ExampleBot).

7.      Enter the address of the server (usually 127.0.0.1), leave the ports number unchanged.

8.      From the GUI, click “Connect All” to connect the bot(s) to the server.

9.      Now you can switch back into the game, and find the bots you just added somewhere in the map.

To this end, you have successfully setup the environment. Let’s do the development part.


Development Instructions

The documentation for the GameBots is here. You should also refer to the documentation included in the zip file of the GameBots. Remember that you need JDK and ant to re-compile the code after modifications.

To simplify the assignment, you are allowed to make “in-place” modifications to ExampleBots.java, but feel free to build your own class that extends ExampleBots if you feel like so.

The example agent just learns to map the world. You should create an agent in Java that does something interesting and more sophisticated than the example agent. To name a few, the agent can scout out weapons or scout out enemies, or bring the player things, etc. Just be creative! However, note that the modification you make should be really "interesting", "useful", and well-documented to receive credits.


Files that you will need

In order to complete your project you will need the following files:

BotAPI contains the UT mod code
GameBot contains the Bots code
GameType file


Testing your project

Here is how the TA will test your code. He will create a game using your map or any other working maps, let your bots join, and verify whether they behave as you described in your report.


What you must turn in

To get credit for your work, you must submit a single zip file including the following things:

The zip file should contain a level-map you made, your modified GameBots file. You should also write a readme.txt which describes exactly how your homework project works. For example, a brief description of your map, how to compile your code, what are the modifications you made, and why those modifications are interesting and useful.