The Interface

superply.jar - this is the server. It now comes with source!
superply-algebra.jar - this is the algebra game server.
You can probobly double click to run it on most platforms, but if you want to go from command line or try some flags do it like this:
java -jar superply.jar HOST PORT MODE TIME
Host and port are just that. Mode is the word "random" or "deterministic" and time is the number of seconds in a turn.
It has a mouse interface, so you can play against your algorithms or even against yourself, I guess.

Algebra Game Board

find x   6   4x-6 4x+2   -18   4x+6 4x+10 4x-2 4x-10
2x+2 2 4 0 -10 -2 -4 2 6
8x+6 0 -3 -1 -3 0 1 -2 -4
2x-4 5 1 -3 -6 -5 -7 -1 3
6x-6 2 0 4 -2 6 8 2 -2
6x 1 -3 1 -3 3 5 -1 -5
8x-2 1 -1 1 -2 2 3 0 -2
2x+8 -1 7 3 -13 1 -1 5 9
2x-2 4 2 -2 -7 -4 -6 0 4

HINT Constraints

These will be the only hints available in the game. The deterministic game will issue the hints in exactly this order, repeating the entire sequence once the end is reached and skipping over hints that do not correspond to the value in any unclaimed cell to the next hit that does. In the random case, they will be issued in an even distribution ignoring invalid hints. The hints are:
HINT odd
HINT even
HINT between 0 18
HINT between 18 81
HINT contains 4
HINT odd
HINT even
HINT between 0 16
HINT between 16 36
HINT contains 2
HINT odd
HINT even
HINT between 12 42
HINT between 20 54
HINT contains 5
HINT odd
HINT even
HINT between 8 20
HINT between 18 30
HINT contains 1

The Protocol

Connect to the server as we have done before by sending it your player name on a single line. As with before spaces are allowed, but line breaks are not.

When the game begins, you will receive the message INIT board_size (deterministic, random)board_size is a number indicating the width and height of the game and the word deterministic or random will indicate how the hints will be chosen.

You will then see X num1 num2 ... numboard_size followed by Y num1 num2 ... numboard_size These indicate the values across the top and side respectively. You are left to calculate the value at each cell of the grid.

You will frequently be updated on the status of the game with this message: STATUS name1 r c r c r c ... , name2 r c ... where name1 is the first player's name, name2 is the second player's name, each r followed by a c is a zero indexed row column pair in which he has successfully played. You can look here to discover if you are first or second player, depending on where your name occurs. First player will try to make a connection from left to right, while second player will be trying to make a connection from top to bottom.

When it is your turn to move you will receive a constraint message. You will always receive a status message directly before a constraint message. The constraint message is of the following form:
HINT odd only odd valued cells are valid moves
HINT even
only even valued cells are valid moves
HINT between num1 num2
only cells valued between num1 and num2 inclusive are valid moves. You will see this often because greater than and less than constraints are issued with this message. Please note that num1 and num2 may be values that do not occur on the board or even within the range of possible values on the board.
HINT contains num1
only cells whose value contains num1 in their decimal representation are valid.

You will respond in the following way: r c where r and c is a zero indexed row column pair separated by a space. Valid moves are only those cells whose value satisfies your hint constraint and within [0 .. board_size -1] where brackets means inclusive.
YOU WILL NOT BE NOTIFIED directly whether your move succeeds or fails. You must check for this the next time a STATUS message is sent to you.

The following command may be sent at any time WARNING milliseconds this indicates that you only have milliseconds time remaining in your aggregate turn clock.

If you do not send a move within milliseconds time you will be issued the message TIMEOUT and your opponent will be declared the victor.

When the game ends you will receive one of the following messages depending on how clever you were:
After receiving one of these your socket will the disconnected.