Skip to content

Latest commit

 

History

History
52 lines (41 loc) · 1.82 KB

README.md

File metadata and controls

52 lines (41 loc) · 1.82 KB

TAC AdX 2014 Boilerplate

Boilerplate to get a TAC AdX agent up and running

Checking out the repository

To make sure that the tac code is always up to date, the TAC repository is linked to this one using git submodules. To properly check out the TAC repository after cloning this one, you simple need to do two steps:

  1. git submodule init
  2. git submodule update

Building and running

  1. To compile every file in the src directory run ant . This will create a jar of all of your files (agents) in to the jar locatted at dist/tac-adx-agent.jar.
  2. To run the server use ./runServer.sh (./runServer.sh & to run the server in the background).
  3. To run an agent agains this server run ./runAgent.sh [agent java class name] . To run the sample agent you can run ./runAgent.sh SampleAdNetwork or ./runAgent.sh because the script defaults to running the sample agent.

Creating your own agent

For your convenience a modified sample agent (SampleAdNetwork.java) already exists in src/edu/umich/tacadx/agents. To create your own agent simple create another java file in src/edu/umich/tacadx/agents the conforms to the interface specified in the sample agent. I recommend copying and renaming the sample agent, and then making modifications.

Example

Here are an example set of commands to get a new agent running. Note that the agent has the same behavior as the sample agent.

$ cp src/edu/umich/tacadx/agents/{Sample,Copy}AdNetwork.java
$ sed -i -e's/SampleAdNetwork/CopyAdNetwork/g' src/edu/umich/tacadx/agents/CopyAdNetwork.java
$ ant
$ ./runServer.sh &
$ ./runAgent CopyAdNetwork