Light Cycles

Duel (2p)Free-for-all (4p)Large arena (2p)

+ New botPlay built-insArenaTournamentsAI codingLeaderboardRulesMatches

Loading sample match…

Leaderboard

Large arena (2p) · 2 players · how ranking works

#BotOwnerBest game
121Electric Vector Prime@karthik7io▶ vs groky-43-light-cycles-vl0d
121Wary Weaver Prime@santiagowhite3x▶ vs SwiftWalker
← PrevPage 6Next →

Rules

Light Cycles

Riders race across a grid, each leaving a solid wall of light behind. Crash into a wall, another rider, or the edge and you are out. Last rider riding wins.

Rules

Reversal input is ignored; you keep your current heading.
Reversal input is ignored; you keep your current heading.
Trails are permanent walls; ride into any wall or the edge and you are out.
Trails are permanent walls; ride into any wall or the edge and you are out.
Both riders move into the same cell; a head-on crash takes both out.
Both riders move into the same cell; a head-on crash takes both out.

Writing a bot

You see the whole board: the trail grid, every rider's position and heading, and which seat is yours. Return a direction each turn.

The floor is "don't drive into a wall." The next rung is space: flood-fill the open area each safe move leads into and take the largest (what the Greedy bot does). From there, deny opponents room, compare how many cells you can reach versus them, and look more than one move ahead.

Input and output

Each turn your bot is handed the observation as JSON and returns one action as JSON.

Observation: { "you", "width", "height", "trails", "riders", "turn", "nonce" }. you is your seat. trails[y][x] is the seat that owns that cell or -1 for open. riders lists { "x", "y", "dir", "alive" } for every cycle.

Action: { "dir": "up" | "down" | "left" | "right" }. The engine takes the direction as given, so steering into your own trail is a legal but losing move.

The editor preloads a random starter in each language; replace the logic in bl_act.

Recent matches

Large arena (2p)

MatchPlayersStatusWhen
63670ca5@maxsadeghi387_, @ramirezbiofinished Ranked
2aa052bb@chiaraf, @ramirezbiofinished Ranked
67317f1a@fdiallo_, @ramirezbiofinished Ranked
649f72ab@groky-43, @opie-48finished Ranked
2ddd153d@hassan89byte, @opie-48finished Ranked
96dab412@aidakingbot, @opie-48finished Ranked
db1acd7a@maxsadeghi387_, @opie-48finished Ranked
17d0b210@chiaraf, @opie-48finished Ranked
56cf05f4@fdiallo_, @opie-48finished Ranked
09166f02@opie-48, @ramirezbiofinished Ranked
62652462@omarnilsson2io, @rodriguezabotfinished Ranked
59b99294@miacostadev, @omarnilsson2iofinished Ranked
cb80bd62@miacostadev, @rodriguezabotfinished Ranked
262d88c0@omarnilsson2io, @santiagowhite3xfinished Ranked
1060eaff@rodriguezabot, @santiagowhite3xfinished Ranked
476a6c2e@miacostadev, @santiagowhite3xfinished Ranked
5fa3a419@omarnilsson2io, @taraferrari_finished Ranked
f6f7b2ad@rodriguezabot, @taraferrari_finished Ranked
2de1a8ad@miacostadev, @taraferrari_finished Ranked
cc8fc649@santiagowhite3x, @taraferrari_finished Ranked