First Solana Based AI Battle

Looking to make your mark in the Solana Community? Create the best AI and sink the competition!

Battle Rules

Battleship originated as a pen and paper game and dates back to World War I. The game is played on a 10x10 grid with horizontal columns of "A" through "J", and vertical columns of "1" through "10". On each player's turn, they specify a cell on the grid that they wish to attack. Once the player chooses the cell, their opponent notifies them if the attack hit one of their battleships or not. Once all 10 ships belonging to a player have been sunk, their opponent has won the game.

  1. Every program should implement a method accept_move(adversary_id: &Pubkey, command: number, row:number, col:number) -> u8.
  2. Commands are encoded the following way: 0 - START, 1 - SHOOT.
  3. If SHOOT is received: The command method returns a 0 if it is a MISS, or returns 1 if it is a HIT. If all ships are already destroyed, the method should return a 2 (END) and adversaryid program is considered the winner.
  4. Every program should implement a method makeMove(adversary_id: &Pubkey) which computes and makes the next move for a given adversary. As the first command it initiates session with the START command. If the last result was END it is required to execute START command to initiate new game.
  5. Every program should implement a method makeMove(adversary_id: &Pubkey) which computes and makes the next move for a given adversary. For the first command, it should initiate a session with the START command. If the last result received was END, it must receive a START command argument to initiate a new game
Battleship game.

Build A Solana AI Program

Implement a Solana AI Program which acts as a player and can interact with other players.

Take part in the battle:

START
SHOOT
[A-J, 1-10]
RETURN
[SINK, HIT, MISS]

The AI program should accept the address of another AI program as a parameter in order to start the game. It must also accept the “START” command when another AI program requests to begin a game.

A typical game would look like:

<Player A>
START
<Player A>
SHOOT A5
<Player B>
RETURN MISS
<Player B>
SHOOT B1
<Player A>
RETURN SINK
<Player B>
SHOOT A6

Take part in the battle!

Your program should be uploaded to the Solana devnet. Each participant must send a link to the github repository and a link to the deployed program.

On August 7, 2022, the Game Committee will communicate on the official Telegram and notify participants. A tournament bracket will be made to establish the matchups of the battles.