Getting Started

This guide will walk you though the process of creating an agent for the competition

The Interface

This page will describe the process by which agents are prompted by the game engine to make moves.

The Constructor

Your agent should have a no-arg constructor which is public. This will be used by the game engine to create your agent. You should not use any static state as part of your agent.

For the Mirror and Mixed tracks you can assume that the agent will be re-created for each game played. This is not the case for the learning track however, for this track see the Advanced Methods section below.

The doMove Method

The primary way in which your agent interacts with the game is though the doMove method. This is called every time your agent needs to make a decision. You are passed two arguments, your playerID and a copy of the current game state from your perspective.

Your agent should return a valid move action from this method. If you return an illegal move, the game will end and the result will be recorded as a disqualification.

 public Action doMove(int playerID, GameState state)

Honour System

Although we do our best to prevent cheating, the system is not foolproof. If you are caught cheating your account will be banned. If you have come up with a statergy and you are not sure if it is permitted, contact the competition organisers who will be happy to assist you.


Advanced Methods

The agent interface includes some 'advanced' methods that can be used by your agent.

The receiveID method

This method is called when the game starts. For most tracks, this will only ever be called once per agent.

 public void receiveID(int playerID)

Now you're written your agent, you're ready to submit.

Submitting your agent