This is a port of the arcade game Ataxx.

  Rules


Game is played on a 7x7.
Board is chosen from one of the 596 possible configurations.
Game goes on until both players can no longer move or if a player has no more pieces.


Legal action:
  • There are two actions, Spawn and Jump
  • Spawn: A player may spawn a piece if there is one piece of his pieces next to it on any adjacent squre.
  • Jump: A player may jump from a cell to another cell that is two squares away in any direction(both vertically and horizontally).
  • After a piece has jumped or a piece was spawned, all the adjacent pieces will be converted to the player that moved.

Resolution of a turn:
  • A bot must output the coordinates where he wants to spawn a piece (e.g. b7) or where he wants to jump to(e.g. a7c7).

Output
  • If the coordinates are outside of the board, the game will end and the other player will win.
  • If the coordinates are inside but the square at those coordinates already is occupied, the game will end and the other player will win.

  Expert Rules

Game will end in a draw if it reaches 300 turns or if a position repeats three times regardless of the player.
Victory Conditions
  • Capture all of your opponent pieces.
  • Have more pieces than your opponent.
Loss Conditions
  • You have no pieces.
  • You do not respond in time or output an unrecognized command.

  Game Input

Initial input
First line: id: your player id (0 or 1).
Next config: The board configuration that will be played.
Input for one game turn
Next boardSize lines: a string of characters representing one horizontal row of the grid, bottom to top. ('.': empty, '0': player 0, '1': player 1, "#": wall).
Next lastAction: the last action made by the opponent ("null" if it's the first turn).
Next actionsCount: the number of legal actions for this turn.
Output
A single line containing the coordinates where you want to jump from and to. e.g. "a7c7" or the coordinates where you want to spawn a piece. e.g. "b7".
You can also print messages by doing the following. e.g. "a7c7 message".
Constraints
Response time first turn is ≤ 1000 ms.
Response time per turn is ≤ 100 ms.