Coding Tournament

  • Presenters: Lasse Koskela & Markus Hjort
  • Type: Activity
  • Duration: 120 minutes
  • Audience: The target audience is anyone from "apprentice" level up with programming skills.

The objectives are largely defined by the participants in that the Coding Tournament is an opportunity to experiment with a new technique (TDD, pair programming, etc.) or a new programming language (Java, Ruby, etc.) in a safe environment and with people who have been using those techniques or who are already familiar with the particular programming language. The session's role is really to provide a meaningful context and facilitate the creation of this safe environment. The rest of the magic is provided the participants themselves.


The coding tournament is a fun-oriented social even where teams of brave delegates are presented with a task involving a simple, yet challenging multiplayer game. The teams will develop a game bot that interfaces with a game server provided by the organizers. The bots can be implemented using either Java or Ruby as the organizers will provide client libraries for those two programming languages. If a participant wants to use some other language, she will just need to implement a simple XML-RPC client and server (i.e. the client library) in addition to the bot itself.

While the ultimate goal of the tournament is to have fun, participants are encouraged to use this occasion as a chance to experiment with engineering practices such as test-driven development and pair programming. In the grand finale of the the event, the actual tournament is carried out by playing the teams' bots against each other on a projector while the teams and their supporters cheer ferociously.

Participation requires either walking in as a team, or just walking in as an individual--we will form teams for the individual participants on a best effort-basis (meaning that we'll use common sense in coming up with solutions that help people get what they're looking for from the session). Each team must consist of at least 2 people and the team must have a laptop with a network connection. The best team(s) will be awarded with endless fame, street credibility, and possibly some other small prizes.

The game and coding challenge we have developed for the tournament is based on the card game known as Indian Poker.

The rules of the game are simple. A game of Indian Poker start by the dealer dealing a single card to each player. At the same time, each player raises the card to their forehead, but not so they can see it. The card is placed face-out on their forehead so that each player can see everybody else's card but their own. The first two players left from the dealer are forced to place "blind" bets while the rest can decide whether to fold (without paying) or to pay the bet based on how strong they imagine their own card will fare against what they're seeing on the opponents' foreheads. Players can also decide to raise which means everyone else will have to either pay the raise, re-raise, or fold out from the game. After a maximum of three raises, whoever has the highest card collects the pot. In the case of several cards with equal rank, the pot is split even.

The teams' bots will be communicating with the server over a network connection. The game logic is driven and controlled by the server and game activities are visualized on the projector through the server's user interface, including an audio narrative by a quasi-intelligent computer commentator. In the name of entertainment, the server introduces deliberate delays for players' actions in an attempt to simulate "think time".

Benefits of participating

The Coding Tournament is a unique chance to experiment with and experience new development techniques or programming languages. Not everyone has enough slack at work to develop their programming or design skills by implementing a web server for the 14th time using yet another obscure scripting language. Not to mention being able to do this experimentation without needing to worry about one's coworkers witnessing your first stumblings. Besides, there's no better way to have geeky fun at a conference than a proper "code-fest"!

Session Outline

  • 15 mins: Introducing the coding challenge and the client API(s)
  • 60-90 mins: Teams implementing their bots for the tournament
  • 15 mins: The tournament itself where bots play against each other
The participants will have the opportunity to iterate their bots by running test tournaments against a set of sample bots, provided by the organizers.


A group of conference delegates unable to stop thinking about how to improve their bot.


Inspired by The First International RoShamBo Programming Competition we have organized similar tournaments internally at Reaktor Innovations. It worked very well with people cheering ferociously while the bots played against each other, eventually leading to the Coding Tournament session described by this submission getting organized as an activity at the XP2006 conference where teams chanted viciously at their bots for folding a pot with an ace of spades in hand (on forehead)...