Two robots start in an n by n board on the same cell.There are a number of different fruits lying around on the board (apples, bananas, etc.)
There will be a different number of fruits for each item, so for example, there might be one apple, three bananas and five melons.

Your goal is to collect fruits so that at the end, you have more fruits than your opponent in as many categories as possible.

So if this is the initial count:


And after the game, you collected this:


Then if your opponent had collected everything else, he would have this:


Hence you will have won the game! (Your opponent has both less bananas as well as less melons than you- so you win in two out of three categories, and hence in total.)

Every turn, each player gets to either move to a vertically or horizontally adjacent square (north, east, south or west) or pick up the fruit they're standing on. Moves are made simultaneously.

Both players tell the game server where they want to move, and then both moves are made at the same time.
If both bots are standing on the same fruit and both choose to pick it up, each player gets half a point (0.5). (Notice that this is, from a game-theoretic standpoint of view, equivalent to the fruit being destroyed on simultaneous pick-up)

The game ends if any of these condititions are met:

  • all the fruits have been taken
  • the game server has determined that given the state of the game, there's a clear winner (one player has more than half the fruits of more than half of the categories)
  • game positions keep repeating (meaning that both bots are either passing or going in circles)
  • one player exceeded his thinking time (a bot's make_move() function didn't return within 10 seconds)
  • a bot's make_move() function crashed or returned a value that's not a valid move

Fine with the rules? Learn how to write a bot!