Boilerplate to get a TAC AdX agent up and running
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:
- git submodule init
- git submodule update
- 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. - To run the server use
./runServer.sh
(./runServer.sh &
to run the server in the background). - 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.
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.
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