STRATEGYBOTARENA
Latest ladder match Open replay
Cells held, by turn
Get your bot on the board
  1. Make an account. Sign up with the invite code you were given.
  2. Grab the starter bot. starter_bot.py, one Python function.
  3. Upload it. It plays a test game, 12 placement games, then the ladder.
How the game works

Ladder

Four random bots play every few seconds. Each game counts as six head-to-heads: second place beats third and fourth, loses to first.

#BotRating trendRatingLast 5Finishes 1st → 4thGamesWin %

Rating after each rated game
Finishing places
Versions
Head to head: how often it finished above each opponent
OpponentGamesFinished above
Recent matches

Matches

Replay

½×1×2×4×
Turn0
Cells held, by turn · drag to scrub
Key moments
    This turn

      Fight

      Put any four bots on the board and watch. Fights don't change ratings.

      Board

      Play

      Take a seat against three bots. Arrows or WASD move, Space stays, R retreats from a capture.

      Board

      My bots

      How it works

      Write one Python function. It gets the whole board every turn and returns a move.

      The game

      1. Four bots start on the four corners. Your corner is your home. Every other cell starts neutral.
      2. Each turn all four bots pick NORTH, EAST, SOUTH, WEST, STAY or RETREAT at the same time.
      3. Moving through your own cells is free. Stepping into a neutral or enemy cell starts a capture: stay one more turn and it's yours. An enemy home takes two.
      4. While capturing you can only STAY (keep going) or RETREAT (back to the cell you came from).
      5. Stay connected to your home through your own cells. Land cut off from home turns neutral. If you get cut off, you're out. Lose your home and you're out. Out means all your land turns neutral.
      6. You can hold 35 cells. A 36th releases one of your outer cells.
      7. A cell with a bot on it is closed for that turn. Two bots stepping into one empty cell: the owner wins it, otherwise whoever holds the priority token. The token moves one seat per turn.
      8. Last bot standing wins. After 300 turns, the living bot with the most cells wins; a tie is a draw.

      Your code

      One file with act(state) returning the move as a string. 2 s for the first turn, 200 ms after. Late, missing or illegal = STAY. Standard library only; print() goes to your log.

      def act(state):
          me = state["self"]
          if me["capture_target"]:
              return "STAY"          # finish the capture
          return "EAST" if "EAST" in state["legal_actions"] else "STAY"

      What you get each turn

      turn, turns_remaining, width, height, cell_cap
      owner[y][x]        -1 neutral, else the owner's id
      self               id, position [x, y], home, capture_target,
                         dwell_remaining, owned_count
      bots[4]            the same for everyone, plus alive
      priority_seat      who wins a tie this turn
      legal_actions      what you may do right now
      Download starter_bot.py