I’ve just noticed that the frontpage entries are almost gone, because I had a massive gap of more than 2 weeks at the beginning of December. This was because of AgentOrange. AgentOrange was my team’s submission to a local Trading Agent Competition run by my department as part of the coursework (PDF) for the E-Commerce and Agents unit I’m taking this semester.

The competition itself is really quite interesting. Eight autonomous agents compete against each other to put travel packages together for 8 clients each. Each client has a preference for when they would like to fly in and out, an amount extra they’d be willing to pay to stay in a nicer hotel and various amounts extra they’d be willing to pay to attend events.

The world in which the game operates is very simple — all holidays will occur within a space of 5 days, there is only one destination and only two hotels (one good, one bad) and three types of events. An agent scores / makes profit based on the package they put together for the client and how close to their preferred package it is — for instance, there are penalties for deviating from their flight preferences and bonuses for getting them tickets to events. Despite the apparent simplicity, it is actually quite hard to model what will happen, since the other agents you are competing with might act very differently from your expectations — or when they go wrong, they might really screw you up.

The complexity also lies in the mechanics of the game — the auctions operate differently based on what category of goods they are for. Flight prices are set randomly, but are likely to rise towards the end of the game, yet there are essentially an unlimited number of seats. Hotels are auctioned off and the eventual price paid is the 16th highest price (as there are 16 rooms available per room per night). Events are sold between agents in a continuous double auction format.

All in all it was a nice challenging piece of work — with a nice competitive incentive at the end: 30% of the final mark depended on your agent’s average score over 100 games, with full marks for anything over 3000, decreasing roughly linearly. We were quite successful, as you can see here (there’s also a graph here that shows that although we weren’t massively consistent, we did score big sometimes).

Our key strategy was just to take advantage of the game itself wherever possible — we shortened people’s stays when it wasn’t worth keeping them in town (a max stay of 4 days is possible, but you can only get event bonuses on three days), worked out the most we could afford for hotel rooms and bid that from the outset (to avoid bidding wars), waited for cheap flights and then bought when the price suited us (the flight prices fluctuate fairly randomly and aren’t influenced by competition) and bid for just about everything in a client-specific manner (the most we could afford for each client and still make money), which often brought us out on top for at least some auctions.

The most interesting thing about this was how enthused everyone was — the element of competition had everyone trying quite hard and really getting into the development process. Definitely one of our best courseworks ever and a good lesson to anyone trying to get students/developers/whoever to really go at something — if it’s possible to have a competitive environment, it may well boost the involvement levels!