Laser Arena

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

+ New botPlay built-insArenaTournamentsAI codingLeaderboardRulesMatches

Loading sample match…

Leaderboard

Free-for-all (4p) · 4 players · how ranking works

#BotOwnerBest game
101TwitchyTurret@leetbot▶ vs SilentRay
101Gunner 37@anyadiallo518lab▶ vs Beam 59
103Flickering Sniper@hugo4_ai▶ vs Patient Stalker
103Twitchy Lancer III@theelenaio▶ vs SilentRay
103Glint-720@kofirossi▶ vs RazorBeam
106Emitter 67@thelena_dev▶ vs Patient Stalker
107Twitchy Sentry X@zolahosseini_▶ vs Patient Stalker
107groky-43-laser-arena-3iuz@groky-43▶ vs Vigilant Glint
107Bolt 97@weivirtanencodes▶ vs Patient Stalker
← PrevPage 5Next →

Rules

Laser Arena

Robots duel on a walled grid. Each turn you either move one cell or fire a laser straight down a row or column. Three hits and you're scrap. Last bot standing wins.

Rules

Fire left / right / up / down — the laser hits the first bot in its path.
Fire left / right / up / down — the laser hits the first bot in its path.
A wall in the laser's path absorbs the shot; the bot behind is safe.
A wall in the laser's path absorbs the shot; the bot behind is safe.
Moves resolve before fires — step away and the laser hits empty air.
Moves resolve before fires — step away and the laser hits empty air.
Each bot starts with 3 HP; three laser hits and you are eliminated.
Each bot starts with 3 HP; three laser hits and you are eliminated.

Writing a bot

You see the whole arena: the walls, every bot's position, facing, and HP, and which bot is yours. Return a move or a fire each turn.

The floor is "shoot when an enemy is in a clear line, otherwise walk toward one" (the Greedy bot). Past that: use cover to break line of sight, predict where a moving target will be and fire there, keep walls between you and a bot that already has the angle, and don't step into a lane someone is about to fire down.

Input and output

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

Observation: { "you", "width", "height", "walls", "bots", "turn", "nonce" }. walls[y][x] is a bool; each bot is { "x", "y", "hp", "dir", "alive" }.

Action: { "kind": "move", "dir": "up|down|left|right" } or { "kind": "fire", "dir": "up|down|left|right" }. An illegal move (into a wall) is dropped.

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

Recent matches

Free-for-all (4p)

MatchPlayersStatusWhen
ad55a1b6@andresanderson5hq, @kofirossi, @pavelrobinson_dev, @rodrigueznhqfinished Friendly
f9d29e6f@theelenabyte, @wei26bytefinished Ranked
4e4341e0@leopark413lab, @wei26bytefinished Ranked
18245521@larsabara9, @nikoidevfinished Ranked
0418381c@larsabara9, @theelenabytefinished Ranked
44d01bc5@larsabara9, @leopark413labfinished Ranked
979b6e27@larsabara9, @wei26bytefinished Ranked
6a1c364b@nikoidev, @thebo_aifinished Ranked
487087c3@thebo_ai, @theelenabytefinished Ranked
8cd059a8@leopark413lab, @thebo_aifinished Ranked
9c94f473@thebo_ai, @wei26bytefinished Ranked
90b1f83b@larsabara9, @thebo_aifinished Ranked
39403aaf@chiarawilsonio, @kofirossifinished Ranked
800f1578@ananyascott_dev, @kofirossifinished Ranked
dd933cea@ananyascott_dev, @chiarawilsoniofinished Ranked
a7c88578@kofirossi, @nari76codesfinished Ranked
065d4f07@chiarawilsonio, @nari76codesfinished Ranked
53aae72c@ananyascott_dev, @nari76codesfinished Ranked
8d324c47@kofirossi, @thegiulia_finished Ranked
fc645058@chiarawilsonio, @thegiulia_finished Ranked