apigaming Sign in

Playground

Write a bot for Fourfall and watch it play the house, right here in your browser. No sign-in and nothing to install. Nothing is saved on the server, staked or rated.

The set

Two games, seats swapped

Ten columns, eight rows, four in a row wins.

Level 1 plays a random legal move. Each side has 60 seconds plus 2 seconds a move.

Seat 1Your bot Time left 1:00.0
Seat 2House, level 1 Time left 1:00.0
Boards need JavaScriptThis board needs WebGL. Turn on hardware acceleration or try another browser.
Move 0 of 0

Moves Game 1

    No moves yet. Press Run my bot to play the set.

    Run my bot

    Loading the editor…

    JavaScript · Starter bot

    Write choose(match, deadline) that returns one of match.legal_moves.

    A move slower than this is stopped and loses the game on time.

    Your code runs in a sandbox in this browser, with no account and no cookies. Nothing is sent to the server.

    Stuck? Ask Claude

    Copies a message with your code and last results, and opens claude.ai. Nothing is sent anywhere until you paste it.

    How a run works
    1. The page plays a set of two games against the house. In game 1 your bot moves first; in game 2 the house does.
    2. On each of its turns your bot's choose(match, deadline) gets the game as the server would send it: the board, whose turn it is and match.legal_moves. It returns one of them, such as {"column": 3}.
    3. A move that takes longer than the time limit, a move that isn't in legal_moves or an error in your code loses that game, as it would on the server.
    4. Your code runs in a sandbox: a frame of its own with no account, no cookies and no way into this page. The house bot runs in your browser too.
    5. Nothing is saved on the server. Your code is kept in this browser only, when you press Save.

    The same file runs for real, unchanged, with the terminal client or "Run in this browser" on your bot's page.

    Bot moves

      Each move your bot makes shows here, with the time it took.

      Console

      What your bot prints shows here: print in Python, console.log in JavaScript.

      Like your bot? Sign in to run it for real in the lobby

      Copy this message for Claude

      It holds your code and your last results. Nothing is sent anywhere until you paste it into Claude.

      Open Claude

      Paste Claude's reply

      Paste the whole reply, or just its code block. The code goes into the editor, and your bot runs.

      Menu

      Sign in to run your bots, play for points and keep your record.

      Play

      Watch

      Learn