Show HN: LLM이 실시간으로 경쟁하는 Bomberman 스타일의 1v1 게임

hackernews | | 📰 뉴스
#ai #ai 모델 #autonomous #bomberman #game #gpt-5 #llm #openai
원문 출처: hackernews · Genesis Park에서 요약 및 분석

요약

두 개의 LLM 에이전트가 1대1로 대결하는 봄버맨 스타일 게임이 소개되었으며, 사람의 개입 없이 AI들이 스스로 판단하여 상대를 제압하거나 벽돌을 파괴해 점수를 겨룹니다. 에이전트는 보드 상태를 텍스트로 입력받아 JSON 형식으로 행동을 결정하고, FastAPI와 자바스크립트를 기반으로 구현된 엔진을 통해 이를 수행합니다. OpenRouter를 통해 다양한 모델을 사용할 수 있으며, 플레이어의 사고 과정과 이동 경로를 실시간으로 시각화하여 관찰할 수 있습니다.

본문

A 1v1 Bomberman game where two LLM agents play autonomously against each other. No human plays — you watch the AIs fight. Each agent receives a text description of the board state, reasons about it, and outputs a move as JSON. The game engine executes it. Built with FastAPI + asyncio on the backend, vanilla JS + Canvas on the frontend. Agents are powered by any model available on OpenRouter. - Board: 15×13 grid with indestructible walls, destructible bricks, and two spawn corners - Goal: Score points by blowing up bricks. Win by having the highest score when all bricks are gone, killing your opponent, or having more points when the 3-minute timer expires - Actions: Each agent can move to a tile,move_and_bomb (move then plant a bomb),bomb_here (plant immediately), orwait - Bombs: Explode after ~6 seconds in a cross pattern. Chain reactions are supported. Killing your opponent is an instant win regardless of score - Agents: Each LLM gets the full board as text with coordinates, active threats, bomb timers, and their own position. They respond with a single JSON line {"action": "move", "target": [7, 5], "reasoning": "Moving toward brick cluster top-center."} - Opponent eliminated by explosion → instant win - One player destroys majority of all bricks → win - All bricks gone → higher score wins - Timer expires → higher score wins; tie = draw bomba/ ├── backend/ │ ├── main.py # FastAPI app, WebSocket broadcast, game manager │ ├── game/ │ │ ├── state.py # Dataclasses: GameState, Player, Bomb, Explosion │ │ ├── engine.py # Tick loop, move execution, win condition checks │ │ ├── pathfinder.py # BFS pathfinding for agent moves │ │ └── serializer.py # Converts game state to text prompt for LLMs │ └── agents/ │ └── llm_agent.py # Async LLM agent — prompts model, queues actions ├── frontend/ │ ├── index.html # Layout, HUD, side output panels │ └── game.js # Canvas renderer, WebSocket client, interpolation ├── requirements.txt └── .env # Your API key (not committed) git clone cd bomba python3 -m venv .venv source .venv/bin/activate pip install -r requirements.txt Create a .env file in the project root: OPENROUTER_API_KEY=your_key_here Get a key at openrouter.ai/keys. The game routes all LLM calls through OpenRouter, so you can use any supported model. Edit the model names in backend/main.py : p1_model = "openai/gpt-5.4" p2_model = "openai/gpt-5.4-mini" Any model slug from openrouter.ai/models works. Faster models (sub-1s) give snappier gameplay; slower models still work but may take a few seconds per move. python3 -m uvicorn backend.main:app --port 8000 Open http://localhost:8000 and click START. - Side panels: Show each agent's raw LLM output — the parsed action badge, target coordinates, and reasoning text - ⚠ badges: If an agent makes an illegal move (unreachable tile, bomb already active, response too slow), the reason is shown in the output panel - Intent lines: Dashed lines on the canvas show where each agent is currently headed - Scoreboard: Live score, bricks remaining, and countdown timer - Death log: On player death, shows their last 5 actions with positions and reasoning - Prompt panels: Collapsible panels showing the full text prompt each agent received

Genesis Park 편집팀이 AI를 활용하여 작성한 분석입니다. 원문은 출처 링크를 통해 확인할 수 있습니다.

공유

관련 저널 읽기

전체 보기 →