惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Vercel News
Vercel News
Recorded Future
Recorded Future
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
The GitHub Blog
The GitHub Blog
Application and Cybersecurity Blog
Application and Cybersecurity Blog
Google DeepMind News
Google DeepMind News
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
Microsoft Azure Blog
Microsoft Azure Blog
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
M
MIT News - Artificial intelligence
云风的 BLOG
云风的 BLOG
Y
Y Combinator Blog
N
News | PayPal Newsroom
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
Help Net Security
Help Net Security
博客园 - Franky
SecWiki News
SecWiki News
Recent Announcements
Recent Announcements
T
Troy Hunt's Blog
The Register - Security
The Register - Security
The Last Watchdog
The Last Watchdog
Webroot Blog
Webroot Blog
S
Security Affairs
博客园 - 司徒正美
S
Schneier on Security
I
InfoQ
博客园_首页
www.infosecurity-magazine.com
www.infosecurity-magazine.com
T
Threat Research - Cisco Blogs
Forbes - Security
Forbes - Security
腾讯CDC
N
Netflix TechBlog - Medium
N
News and Events Feed by Topic
Cloudbric
Cloudbric
T
The Exploit Database - CXSecurity.com
P
Proofpoint News Feed
A
About on SuperTechFans
Engineering at Meta
Engineering at Meta
Recent Commits to openclaw:main
Recent Commits to openclaw:main
B
Blog
V
Vulnerabilities – Threatpost
C
Check Point Blog
Google DeepMind News
Google DeepMind News
Google Online Security Blog
Google Online Security Blog
C
Cyber Attacks, Cyber Crime and Cyber Security
Hacker News - Newest:
Hacker News - Newest: "LLM"
C
Cisco Blogs
Schneier on Security
Schneier on Security
O
OpenAI News
K
Kaspersky official blog

Hacker News

Introducing Claude Opus 4.7 Qwen Studio The Future of Everything is Lies, I Guess: Where Do We Go From Here? GitHub - SeanFDZ/macmind: Single-layer transformer in HyperTalk for the classic Macintosh Show HN: Agent-cache – Multi-tier LLM/tool/session caching for Valkey and Redis Moving a large-scale metrics pipeline from StatsD to OpenTelemetry / Prometheus GitHub - Nightmare-Eclipse/RedSun: The Red Sun vulnerability repository GitHub - SethPyle376/hiraeth: Local AWS emulator focused on fast integration testing, with SQS support, SQLite-backed state, and a debug-friendly web UI. GitHub - macOS26/Agent: Any AI, replaces Claude Code, Cursor, OpenClaw. Over 18 LLM providers (Claude, OpenAI, Gemini, Ollama, Zai, HF, Qwen) wired into a native Mac app that writes code, builds Xcode projects, bumps versions, manages git, automates Safari, use AppleScript, JS or Accessibility, extend Agent! w/ MCP Servers, run tasks from your iPhone via Messages. YouTube now lets you turn off Shorts I Made a Terminal Pager Burgers | マクドナルド公式 Commands — HackerNews CLI documentation ChatGPT for Excel PiCore - Raspberry Pi Port of Tiny Core Linux Live Nation illegally monopolized ticketing market, jury finds Google Broke Its Promise to Me. Now ICE Has My Data. Founding Engineer at Adaptional | Y Combinator CRISPR takes important step toward silencing Down syndrome’s extra chromosome GitHub - saffron-health/libretto: The AI toolkit for building reliable browser automations US v. Heppner (S.D.N.Y. 2026) no attorney-client privilege for AI chats [pdf] Unexpected €54k billing spike in 13 hours: Firebase browser key without API restrictions used for Gemini requests Retrofitting JIT Compilers into C Interpreters IPv6 – Google The Accursèd Alphabetical Clock Cybersecurity Looks Like Proof of Work Now Fragments: April 14 Cal.com Goes Closed Source: Why AI Security Is Forcing Our Decision | Cal.com - Scheduling Software for Online Bookings Laravel raised money and now injects ads directly into your agent When moving fast, talking is the first thing to break Too much Discussion of the XOR swap trick – Heather Cafe Introduction to Spherical Harmonics for Graphics Programmers The Grand Line Building a Z-Machine in the worst possible language High-Level Rust: Getting 80% of the Benefits with 20% of the Pain GitHub - duguyue100/midnight-captain: Inspired by Midnight Commander, tailored to my taste. How to build a `git diff` driver · Jamie Tanna | Software Engineer Center for Responsible, Decentralized Intelligence at Berkeley The Local Universe’s Expansion Rate Is Clearer Than Ever, but Still Doesn’t Add Up - A new synthesis of astronomical measurements confirms a persistent mismatch that could point to physics beyond current models The air throughout our homes is infused with microplastics. But there are things you can do to breathe less of them The disturbing white paper Red Hat is trying to erase from the internet – OSnews The Future of Everything is Lies, I Guess: Annoyances ‘Abhorrent’: the inside story of the Polymarket gamblers betting millions on war Productive procrastination — Max van IJsselmuiden maps, territory and LMs 447 Terabytes per Square Centimetre at Zero Retention Energy: Non-Volatile Memory at the Atomic Scale on Fluorographane Show HN: Pardonned.com – A searchable database of US Pardons 20 Years on AWS and Never Not My Job The Seasons are Wrong Artemis II crew splashes down near San Diego after historic moon mission We gave an AI a 3 year retail lease in SF and asked it to make a profit | Andon Labs How a dancer with ALS used brainwaves to perform live On filing the corners off my MacBooks Installing every* Firefox extension OpenClaw’s memory is unreliable, and you don’t know when it will break Steve Blank Nowhere Is Safe Chimpanzees in Uganda locked in vicious 'civil war', say researchers watgo - a WebAssembly Toolkit for Go linux/Documentation/process/coding-assistants.rst at master · torvalds/linux GitHub - callumlocke/json-formatter: Makes JSON easy to read. Founding Product Engineer at Bild AI | Y Combinator A compelling title that is cryptic enough to get you to take action on it GitHub - Keychron/Keychron-Keyboards-Hardware-Design: Industrial design files for Keychron keyboards and mice. 100+ models with CAD assets in STEP, DXF, DWG, and PDF. Source-available, with commercial use allowed for original compatible accessories within the license terms. [ANNOUNCE] WireGuardNT v0.11 and WireGuard for Windows v0.6 Released 1D-Chess Helium Is Hard to Replace Cooperative Vectors Introduction | Evolve Keeping a Postgres queue healthy — PlanetScale Our response to the Axios developer tool compromise Do Americans read print books, e-books or audiobooks more? The Zettelkasten Method in Obsidian: A Practical Setup Guide Artemis II Is Competency Porn and We Are Starving For It WeakC4 Flight Viz — Cockpit View A Mexican surveillance giant you’ve never heard of is now watching the U.S. border Surelock: Deadlock-Free Mutexes for Rust RISC-V 101 – what is it and what does it mean for Canonical? | Ubuntu The Problem That Built an Industry How Much Linear Memory Access Is Enough? | Solidean Investigating Split Locks on x86-64 Simplest hash functions Sybilproof reputation mechanisms (2005) [pdf] What is a property? How Complex is my Code? Static code analysis in Kotlin — tools overview Toffoli gates are all you need PGLite evangelism dcmake: a new CMake debugger UI Clojure on Fennel part one: Persistent Data Structures Fragments: April 2 Python Release Python install manager 26.1 The Life and Death of the Book Review - Liberties Introducing Database Traffic Control — PlanetScale Bitcoin miners are losing $19,000 on every BTC produced as difficulty drops 7.8% God sleeps in the minerals Building slogbox Apple Silicon and Virtual Machines: Beating the 2 VM Limit Who was “Not Even Wrong” first? Pokemon Evolution Vs Darwinian Evolution The APL Programming Language Source Code
Cheating at Tetris
2026-04-22 · via Hacker News

Let’s imagine you have a friend who’s very good at Tetris. You’ve challenged them to a game with a twist: you get to pick which pieces they have to play. You agree that if your friend can survive 100,000 blocks then you’ll declare them the winner; but if they get game over before this, you win the challenge. So what do you do?

Tetris is a puzzle game of falling blocks that you can rotate and move as they fall. Forming complete horizontal lines clears all the squares in that line, and the aim is to prevent the blocks from stacking all the way to the top of the playfield, which results in game over.

The playfield is 10 cells wide and 20 cells tall and the game is played with seven different blocks, called one-sided tetrominoes, that are each made up of four squares. They are labelled I, J, L, O, S, T and Z because they look a bit like these letters.

There are many different versions of Tetris but, for the challenge against your friend, you will be playing a very simple version where you can pick any block you like, regardless of what has been picked previously, and the speed of the blocks falling stays the same through the whole game.

How to lose

First let’s look at the worst strategy you could go with: choosing the same block 100,000 times.

It’s easy to see that the I, J, L and O blocks fit very neatly together and can always be arranged to completely clear the playfield. The playfield will be cleared after only ten I blocks, ten J blocks, ten L blocks or five O blocks have been placed.

Ten $J$ blocks.

…or ten $L$ blocks fit together nicely then all disappear.

Ten $I$ blocks also fit together nicely
then all disappear.

For the S, T and Z blocks it’s a little less obvious. All three follow the same idea, so let’s look at how it works for the S block:

You can see that after a number of block placements it loops back to a previous step, but never back to the start. But the stack can always be kept between two cells and four cells tall, so S blocks can be played infinitely without resulting in game over, despite never clearing the playfield.

So, regardless of the block you choose, it can always be played as many times as you like without resulting in game over. Since your friend is the best Tetris player you know, this strategy will pretty certainly result in you losing the challenge.

How to win

Let’s instead consider a combination of S and Z blocks. S blocks fit nicely with other S blocks, and Z blocks fit nicely with other Z blocks; but S and Z blocks don’t fit well together.

Two $S$ blocks or two $Z$ blocks fit together nicely…

…but an $S$ block and a $Z$ block don’t.

Because of this, if you choose an alternating sequence of S and Z blocks, the best way for your friend to avoid game over is to construct columns of only S blocks and columns of only Z blocks. The playfield is 10 cells wide and each column will be two cells wide, so there will be five columns, which is odd, resulting in either three S columns and two Z columns, or two S columns and three Z columns.

Since the S and Z blocks are simply the reflection of each other, consider (without loss of generality) the scenario with three S columns and two Z columns. This will result in the Z columns growing faster than the S columns and eventually both Z columns will reach the top of the playfield. At this point, to avoid game over your friend must place a Z block in an S column, creating a one cell wide and two cell high `hole’.

Eventually, your friend is forced to play a $Z$ block in an $S$ column

Filling these holes causes issues later on in the game since there are a finite number of times they can be filled without creating new holes elsewhere. So new holes will continue to form and your friend can only create so many gaps before they reach game over.

But will this happen within 100,000 blocks?

How many blocks?

A more in-depth explanation can be found in Heidi Burgiel’s paper How to lose at Tetris (1997), but the most important parts are the following facts that were proved:

The maximum number of alternating S and Z blocks that can be placed before a hole must appear is 240 blocks.

The maximum number of times an S or Z block can be used to fill existing holes is 120 times, each time removing two holes.

The maximum number of holes the board can contain without resulting in game over is 50 holes, which is 10 holes per column.

By calculating the total number of holes that can possibly appear on the board before game over, including the ones that get filled in, and then multiplying by the number of block placements required for each hole to appear, we get an upper bound for how many blocks will force game over. The number of holes that can appear is $(120\times2)+50=290$, so game over must occur within $290\times240=69600$ alternating S and Z blocks.

Since this is well within 100,000 blocks, you now have your winning strategy. Choose only alternating S and Z blocks and even if your friend is the Tetris world champion you’ll be sure to beat them!

Infinite Tetris?

What would happen if you were to pick blocks at random instead?

In the finite game that you and your friend are playing, the probability of a sequence of 69,600 alternating S and Z blocks occurring at any point within 100,000 blocks is incredibly small, but not zero.

Despite being very unlikely to happen during your challenge, the game-ending sequence of S and Z blocks is guaranteed to occur at some point in a long enough game of Tetris. Because of this, every game of Tetris must eventually end.

Another way to think about this is in terms of the infinite monkey theorem, which states that a monkey randomly hitting keys on a typewriter for an infinite amount of time will eventually end up typing the entire works of Shakespeare. Instead, imagine that the typewriter only has the letters I, J, L, O, S, T and Z, and the monkey hitting the keys chooses the next block in the Tetris game. Given an infinite amount of time, the monkey will eventually end up typing the sequence of 69,600 alternating Ss and Zs, ending the Tetris game it was choosing blocks for.

Back to reality

In regular Tetris games, the speed at which the blocks fall steadily increases. This causes players to make more and more mistakes and, just like the holes in the S and Z columns, these mistakes will stack up until game over is inevitable. Ultimately, small mistakes due to the time constraints will likely be what causes your friend to lose the challenge, so you probably won’t have to wait 69,600 blocks to beat your friend.

But maybe next time pick someone who isn’t as good at Tetris!

Ffreuer is a maths graduate from Warwick University who spends all her spare time explaining how to pronounce her name (it’s pronounced ‘Freya’). Despite her keen interest in the maths behind the game, she has yet to actually play through a level of Tetris!