TubeReads

I Taught Claude Code to Play Tetris... It Broke the World Record

What happens when you give an AI the ability to control your browser and teach itself to play games? The creator started with simple browser automation tasks — filling forms, searching Best Buy — but quickly wondered if an AI could learn to play and master games through trial and error. After building three games with a single prompt, the real test began: could Claude Code's agent train itself to beat these games, and what would happen when it faced Tetris? The stakes escalated from scoring 10 points in a simple block runner to potentially surpassing a 40 million point world record.

Длительность видео: 8:26·Опубликовано 11 мар. 2026 г.·Язык видео: English
4–5 мин чтения·1,948 произнесённых словсжато до 837 слов (2x)·

1

Ключевые выводы

1

Claude Code successfully taught itself to play three different games through iterative self-correction, debugging its own scripts after each failure until it achieved the specified goals.

2

The Tetris bot achieved over 40 million points on multiple simultaneous runs, surpassing the stated 40 million point world record, and appeared capable of playing indefinitely without losing.

3

Browser automation with Claude Code using Playwright CLI enables AI to perform any computer task a human could do, from form filling to real-time game playing, opening vast practical automation possibilities.

4

The learning curve was visible: the block runner bot needed six attempts to score 10 points, while the Tetris strategy evolved from instant hard-drops scoring 16,000 points to optimized play scoring over 40 million.

Вкратце

Claude Code's browser automation capabilities extend far beyond mundane tasks — with the right setup, it can learn, adapt, and master complex interactive challenges, demonstrating that AI agents can now do virtually anything you would do on a computer, given enough iteration and self-correction.


2

From Browser Automation to Game Mastery

Claude Code's browser control evolved from simple form-filling to self-teaching game bots.

The experiment began with practical browser automation tasks — filling out forms, searching Best Buy for laptops and iPads, downloading reports without API access. But the creator noticed something interesting: each time Claude Code runs a script, it takes a screenshot, analyzes the result, updates its approach, and tries again. This iterative learning loop sparked a question: if it could learn to navigate websites, could it learn to play games?

The setup was remarkably simple. Using a one-shot prompt, the creator asked Claude Code to generate game ideas, then build them all. Three games emerged: a simple block runner, Tetris, and checkers. The real test wasn't whether the AI could execute pre-written game logic, but whether it could write its own bot, fail, understand why it failed, and iteratively improve until it succeeded.

The technical foundation was Playwright CLI, which Claude Code researched and installed autonomously. The creator simply asked it to figure out the best browser automation method, and the AI handled the entire setup — a demonstration that the barrier to entry for powerful automation has collapsed to a simple conversational request.


3

Block Runner: Six Attempts to Understand Timing

The simplest game required six debugging iterations to achieve a score of 10.

1

Attempt 1: No Jump The initial bot failed to jump at all, running directly into the first obstacle without any evasive action.

2

Attempt 2: Premature Jumping After debugging, the bot began jumping but triggered too early, missing the obstacle timing entirely and failing again.

3

Attempts 3-5: Double Jump Strategy The bot experimented with triggering two jumps in sequence, gradually improving pixel-distance calculations and scoring its first points.

4

Attempt 6: Exact Target The bot achieved exactly 10 points by refining its understanding of obstacle spacing and jump timing, demonstrating successful self-correction.


4

Tetris Strategy Evolution

Initial Speed Strategy
The first Tetris bot used instant hard-drops, playing as fast as possible and scoring 16,000 points almost immediately. However, this aggressive approach lacked precision and strategic placement.
🎯
Precision Adjustment
When instructed to slow down slightly, the bot scored lower (under 6,000) in dual-tab tests. The AI concluded that the 2-second delay was counterproductive and reverted to instant hard-drops.
🏆
Optimized Mastery
After multiple iterations, both simultaneous Tetris bots surpassed 40 million points and appeared capable of playing indefinitely without losing, demonstrating that the AI had cracked an optimal strategy.

5

Breaking the World Record

Both Tetris agents simultaneously exceeded 40 million points and showed no signs of stopping.

Stated Tetris World Record
40 million points
The creator looked up this figure to benchmark the AI's performance.
First Successful Dual Run (Agent 1)
47,000 points
Initial attempt after optimizing from the 2-second delay mistake.
First Successful Dual Run (Agent 2)
38,000 points
Running simultaneously with Agent 1 in the first successful optimization.
Final Observed Score (Both Agents)
Over 40 million points
Both agents surpassed the world record simultaneously and appeared capable of continuing indefinitely.
Observed Peak During Testing
46 million points
Referenced when the creator noted the AI's Tetris score before the checkers match.

6

Human vs. AI: A Checkers Defeat

The creator lost decisively to the AI in a live checkers match.

I thought I outsmarted it, but then I realized that you can't outsmart the AI.

Creator/Host


7

The Practical Implications

This experiment demonstrates AI's ability to autonomously perform any computer task through iteration.

💡

The Practical Implications

The real breakthrough isn't that an AI can play Tetris — it's that Claude Code can now autonomously control a browser, observe results, debug itself, and iteratively improve until it masters any interactive task. With Playwright CLI installed via a simple conversational request, the barrier between intent and execution has essentially disappeared. The creator emphasizes that «Cloud code can now do anything that you would do on a computer» with enough training and script refinement, pointing toward a future where complex automation requires nothing more than describing the desired outcome.


8

Люди

Creator/Host
AI Developer/Content Creator
host

Глоссарий
Playwright CLIA command-line interface for Playwright, a browser automation tool that allows programmatic control of web browsers for testing and automation tasks.
Hard dropIn Tetris, instantly dropping a falling piece to the bottom of the play field rather than letting it fall slowly.
One-shot promptA single instruction or prompt given to an AI that results in complete task execution without additional back-and-forth guidance.

Отказ от ответственности: Это ИИ-сводка видео с YouTube, подготовленная в образовательных и справочных целях. Она не является инвестиционной, финансовой или юридической консультацией. Всегда проверяйте информацию по первоисточникам перед принятием решений. TubeReads не связан с автором контента.