TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Can you be sure to clear a line at Tetris?

185 点作者 a3_nm大约 3 年前

9 条评论

tosh大约 3 年前
Related: in the official specification of the game the pieces (&quot;tetrominoes&quot;) are drawn from a bag to prevent the possibility of an unfavorable sequence of pieces that force you to lose the game.<p>IIRC early implementations of the game did not always behave like that.<p><a href="https:&#x2F;&#x2F;tetris.fandom.com&#x2F;wiki&#x2F;Tetris_Guideline" rel="nofollow">https:&#x2F;&#x2F;tetris.fandom.com&#x2F;wiki&#x2F;Tetris_Guideline</a><p>&gt; You might have heard of the result that you can play forever with bag randomizer, Hold and 3 previews (a similar setup even works with 0 previews). However, the opposite is true, if you play with a randomizer that can generate all piece sequences (e.g. memoryless randomizer). In this article we will present a piece sequence that will top you out - no matter what you do.<p><a href="https:&#x2F;&#x2F;harddrop.com&#x2F;wiki&#x2F;A_deadly_piece_sequence" rel="nofollow">https:&#x2F;&#x2F;harddrop.com&#x2F;wiki&#x2F;A_deadly_piece_sequence</a><p><a href="https:&#x2F;&#x2F;citeseerx.ist.psu.edu&#x2F;viewdoc&#x2F;download?doi=10.1.1.55.8562&amp;rep=rep1&amp;type=pdf" rel="nofollow">https:&#x2F;&#x2F;citeseerx.ist.psu.edu&#x2F;viewdoc&#x2F;download?doi=10.1.1.55...</a>
评论 #31089590 未加载
评论 #31088678 未加载
评论 #31095275 未加载
评论 #31089617 未加载
评论 #31093169 未加载
georgecmu大约 3 年前
If you want to test a strategy against an adversarial tetris opponent: <a href="https:&#x2F;&#x2F;qntm.org&#x2F;files&#x2F;hatetris&#x2F;hatetris.html" rel="nofollow">https:&#x2F;&#x2F;qntm.org&#x2F;files&#x2F;hatetris&#x2F;hatetris.html</a><p>The method by which the AI selects the worst possible piece is extremely simple to describe (test all possible locations of all possible pieces, see which of the pieces&#x27; best-case scenarios is the worst, then spawn that worst piece), but quite time-consuming to execute, so please forgive me if your browser chugs a little after locking each piece. If you can figure out a way to accelerate the algorithm without diminishing its hate-filled efficiency, do let me know. The algorithm for &quot;weighing&quot; possibilities is to simply maximise the highest point of the &quot;tower&quot; after the piece is landed.
评论 #31089780 未加载
评论 #31092427 未加载
评论 #31093214 未加载
评论 #31089955 未加载
Hogarth01大约 3 年前
There was a kid I knew in school who I would consider a very good tetris player. One time someone else was lamenting that they always get bad pieces and he said, &quot;The Tetris gods will never give you a piece you can&#x27;t play, you just don&#x27;t know how to play it.&quot; Which has resonated with me for an oddly long time in my life.
评论 #31089628 未加载
Arcorann大约 3 年前
qntm, creator of Hatetris [1], once did an analysis of this exact problem using brute force methods. While he managed to solve the problem for 4, 6 and 8 wide boards (including the minimum board height required, assuming game over if any part of a piece locks above the ceiling), solution eluded him for 10 wide, though he did prove that 6 height was insufficient.<p>As it happens, since this work assumes a 20 high board and there are some sequences (e.g. ZSOLJJJ) for which the solution here goes up to height 8 (it could potentially go up to height 9 but I have no plans to check), there&#x27;s a little bit of a gap that still needs to be filled.<p>[1] <a href="https:&#x2F;&#x2F;qntm.org&#x2F;hatetris" rel="nofollow">https:&#x2F;&#x2F;qntm.org&#x2F;hatetris</a><p>[2] <a href="https:&#x2F;&#x2F;qntm.org&#x2F;tetris" rel="nofollow">https:&#x2F;&#x2F;qntm.org&#x2F;tetris</a>
评论 #31096720 未加载
dragontamer大约 3 年前
Yes in &quot;Tetris Guidelines&quot;. In fact, greater feats can be accomplished in modern Tetris games, thanks to these strong guidelines.<p><a href="https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=qmG0NcbrLTE" rel="nofollow">https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=qmG0NcbrLTE</a><p>Strong players practice these loops all the time. Its possible thanks to the &quot;bag randomizer&quot;.<p>--------<p>The BT Cannon is a TSpin double (4 damage + B2B bonus) + TSpin Triple (6 damage + B2B bonus), for a total of 11 damage.<p>The DT-cannon followup is a TSpin Triple followed by TSpin Double for a total of 12 damage.<p>Finally, the Perfect Clear is 10 damage, for a total of 33 damage per loop.<p>--------<p>Other players practice triple-perfect clear starts, for 30-straight damage in some ~30 tetriminos dropped. But the BT-cannon + DT Cannon -&gt; Perfect clear setup is a beautiful arrangement.<p>The whole loop is carried out over 5 bags IIRC, or 35 pieces (5 bags * 7 pieces per bag == 35 sets of each piece). That&#x27;s enough for the 4x T-pieces needed for the BT-cannon + DT Cannon (which offer significant amounts of damage)<p>35 pieces * 4 pieces == 140 minos, or 14 lines (the Tetris board is exactly 10 pieces wide). Which lines up with not only a perfect bag loop (the 35th piece finishes the bag, meaning piece#36 is a new bag, allowing you to loop), but also divides perfectly with 140 minos aka 14 lines, meaning the perfect clear is possible.<p>------<p>Thanks to Tetris Guidelines bag randomizer, bag#6 is effectively the same situation as bag#1 (start of a new bag). So you loop the sequence and can continuously apply the BT-cannon &#x2F; DT-cannon &#x2F; perfect clear loop almost perpetually. In practice, its &quot;only&quot; a 90%+ chance of continuing each loop, but that&#x27;s a high enough probability to effectively use the technique in competitive games.<p>EDIT: The existence of the &quot;Hold Piece&quot;, in combination with the &quot;easy to count&quot; 7-bag randomizer, allows for some incredible feats in Tetris Guidelines that classic-Tetris players are unfamiliar with. Its a different game, more about quick-reaction speed and twitch reaction rather than the planning-centric classic-Tetris. But its these attributes that make Tetris-Guideline games better for player-vs-player setups. Practiced strategies are more reliable and less contingent on luck.
评论 #31090261 未加载
bombcar大约 3 年前
This is one of those questions that <i>seems</i> to be wide open for elaborate proofs - but it turns out the total number of possibilities isn&#x27;t that large, and you can simply enumerate each one.
评论 #31088897 未加载
m4lvin大约 3 年前
Is there a good way to reduce SAT or other decision problems to Tetris? Do we need to enlarge the grid to reduce larger problem instances, or can the duration of the play &#x2F; length of the sequence be used for that?<p>I would hope for something like &quot;This list of clauses is satisfiable iff there is a winning strategy to clear at least N lines when given the following sequence of tetrominoes&quot;. (Where the article here says that there is no hope for anything like this with N=1, but )<p>Or does knowing the whole sequence in advance make any sequence easy to play &#x2F; clear any number of lines?
评论 #31089573 未加载
评论 #31090375 未加载
alephnan大约 3 年前
&gt; Mathematically, we can formulate this a sequential zero-sum game with perfect information.<p>Is this not just restating that Tetris is NP-hard? <a href="https:&#x2F;&#x2F;arxiv.org&#x2F;abs&#x2F;2009.14336" rel="nofollow">https:&#x2F;&#x2F;arxiv.org&#x2F;abs&#x2F;2009.14336</a>
评论 #31093148 未加载
gerdesj大约 3 年前
This is a classic example of: &quot;Assume a spherical cow&quot;. The game is also about hand&#x2F;eye coordination, as well as solvability. So given the helpful precis:<p>&quot;Summary: it is possible to play Tetris and guarantee that you will score at least one line, no matter which pieces are given to you, i.e., even assuming they are chosen adversarially.&quot;<p>We can confidently respond: &quot;bollocks&quot;.<p>Great write up and analysis.