Answers.Body: <p>I've come up with 23, in the following position, with promotions: </p>
  
  <pre><code>[Event "?"]
  [Site "?"]
  [Date "????.??.??"]
  [Round "?"]
  [White "?"]
  [Black "?"]
  [Result "*"]
  [FEN "nb2k3/2p5/1pP5/1Pp5/2P1p1p1/3pPpPp/3P1P1B/4KNBN w - - 0 1"]
  </code></pre>
  
  <p>*</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-09-25T06:59:13.730Z
Answers.Text: Good work. I have experimented a bit and I think you can add Qg1, Rg2 and Rh3 for White (last sequence of legal moves, *backwards*: e3, Nf1, Qg1, Rg2, Rg1, Bh2, Rh3, Rh2, Bg1, Rg2, Rg1).
Answers.UserDisplayName: Annatar
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-09-25T07:23:13.187Z
Answers.Text: @Annatar with Rg2 it's not a dead position as black has fxg2.
Answers.UserDisplayName: RemcoGerlich
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-09-25T07:24:41.003Z
Answers.Text: @RemcoGerlich Oh darn. I focused too much on White's move options, not Black's. Forget about it, then.
Answers.UserDisplayName: Annatar
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-09-25T07:24:44.343Z
Answers.Text: This is not a dead position, white can play Bg1, Nh2, Nxg4.
Answers.UserDisplayName: RemcoGerlich
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-09-25T12:33:53.053Z
Answers.Text: Fixed the cook, with a promotion.
Answers.UserDisplayName: Herb
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-09-25T02:28:19.457Z
Answers.LastActivityDate: 2017-09-25T12:32:23.183Z
Answers.LastEditDate: 2017-09-25T12:32:23.183Z
Answers.UserDisplayName: Herb
Answers.Body: <p>Funny task. I think I'm still pretty far from the maximum, but here is a suggestion with </p>
  
  <p><strong>23 men</strong>:</p>
  
  <pre><code>[Event "?"]
  [title "Challenge 3, 23 units"]
  [FEN "NRN1k1bn/QRKpPp2/PPpP1Pp1/2P3Pp/7P/8/7B/8 w - - 0 1"]
  </code></pre>
  
  <p><strong>With black to move, an almost-dishonest trick to reach 25</strong>:</p>
  
  <pre><code>[title "Challenge 3, BTM, 25 units"]
  [FEN "BRN1Nkbn/QRKpPp2/PPpP1Pp1/2P3Pp/7P/8/1r6/B7 b - - 0 1"]
  </code></pre>
  
  <p><strong>27 with promoted units</strong>:</p>
  
  <pre><code>[title "Challenge 3, Check, 27 unit, including promoted"]
  [FEN "QNBk1bnr/RBpPpKbr/PpP1Pp1p/1P3P1q/6P1/8/1R6/b7 w - - 0 1"]
  </code></pre>
  
  <p><em>explanation</em>: 
  This is a dead draw because after the forced moves 1.gxh5 Bxb2, White could only play his king back and forth on f7 and g6 while Black's bishop explores the bottom half of the board.
  wRb2 could be replaced by a wB or a wN (or a wQ with obvious adjustment of the nature of the upper-left-corner stranded pieces), or even by a fourth bB while preserving legality. This is so many "degrees of freedom" that I strongly feel that 27 is not the maximum, and someone will soon come up with (at least) 28...</p>
  
  <p><em>edit</em>: indeed, Laska just scored a pretty 28 (or even 30 with "the trick").</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-09-25T09:55:38.307Z
Answers.Text: Your '24' needs promoted units too (Black has two black-square bishops)
Answers.UserDisplayName: AakashM
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-09-25T09:56:28.673Z
Answers.Text: Oh, you're right of course.
Answers.UserDisplayName: Evargalo
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-09-25T10:21:58.123Z
Answers.Text: I like the trick for this 24!
Answers.UserDisplayName: RemcoGerlich
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-09-25T10:29:37.423Z
Answers.Text: Wow, it seems the 26 is even legal, black a-pawn captures twice to promote on a1 or c1, black d-pawn captures once, accounts for all white's missing pieces. The g-pawn may have promoted on g1 and got there because white's g-pawn captured twice on its way to g8, which happens to be white. Nice :-)
Answers.UserDisplayName: RemcoGerlich
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-09-25T13:42:47.513Z
Answers.Text: The trick for 24 is fine.
Answers.UserDisplayName: supercat
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-09-25T13:53:46.080Z
Answers.Text: What's happened to the 26 position?  It seems to have become a non-solution since White is checkmated.
Answers.UserDisplayName: supercat
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-09-25T16:30:48.253Z
Answers.Text: I think some of these violate the terms of the question: "It would be possible to play an arbitrary number of legal moves" and "No legal sequence of legal moves would produce checkmate or stalemate".
Answers.UserDisplayName: D M
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-09-25T17:10:48.850Z
Answers.Text: @DM: There are three questions in one, which might or might not all have the same best answer.  A situation where the player on move would have no legal move that didn't force stalemate would be a valid answer for the first.  A situation where two players repeat the same sequence of four positions endlessly would qualify for any of them, since in the absence of a rule about draws by repetition, that sequence could be played arbitrarily many times, and in the presence of such a rule even the starting position would eventually lead to a draw by repetition if the game didn't by other means first.
Answers.UserDisplayName: supercat
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-09-25T17:12:16.947Z
Answers.Text: @OlivierPucher: It might be helpful to add annotations showing how things would play out until the repeat.  I got tripped up because your previous position had black to play, so I was looking for Black to do likewise on the last one.
Answers.UserDisplayName: supercat
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-09-25T17:13:38.167Z
Answers.Text: @supercat I missed that it says "either".  OK.
Answers.UserDisplayName: D M
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-09-25T08:18:20.030Z
Answers.LastActivityDate: 2017-10-12T08:26:50.860Z
Answers.LastEditDate: 2017-10-12T08:26:50.860Z
Answers.UserDisplayName: Evargalo
Answers.Body: <p><strong>EDIT</strong> 30-Dec-2023: added the R(1,D) position with 32 units. So Challenge 1 is now completely resolved.</p>
  <p>Apologies that the first few lines are a bit theoretical. I reach the actual chess as soon as I can! :)</p>
  <p><strong>Living &amp; dying moves</strong></p>
  <p>In a position, if there are no legal moves, then the game ends immediately: in <strong>checkmate</strong> (if check) or <strong>stalemate</strong> (if no check). Otherwise, there is at least one legal move. Then we can describe each legal move as either <strong>living</strong> (if there's a checkmate still possible after playing it) or <strong>dying</strong> (if there is no checkmate anywhere ahead in its game tree). Quality of play is not a consideration: all sequences of legal moves are valid.</p>
  <p><strong>Living &amp; dead positions</strong></p>
  <p>Under FIDE Laws, the game ends immediately in <strong>Dead Position (DP)</strong> if there's at least one legal move, and <em>all</em> of them are dying. A position with a living move we call <strong>living</strong>.</p>
  <p>So there are four kinds of position: checkmate, stalemate, dead &amp; living. These are exhaustive &amp; mutually exclusive. In particular, stalemate &amp; dead position are disjoint. (This last point wasn't obvious to me at first, but clearly it's the intention of the FIDE Laws.)</p>
  <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th style="text-align: center;">Summary</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td style="text-align: center;">A living move gives a living position or checkmate.</td>
  </tr>
  <tr>
  <td style="text-align: center;">A dying move gives a dead position or stalemate.</td>
  </tr>
  </tbody>
  </table>
  </div>
  <p><strong>Zombies</strong></p>
  <p>From a DP, the moves aren't actually played (except over-the-board by accident or from ignorance sometimes: see <a href="http://wismuth.com/chess/illegal-moves.html" rel="nofollow noreferrer">http://wismuth.com/chess/illegal-moves.html</a>). Such legal but unplayable moves are called <strong>zombie moves</strong>. Similarly, a legal but unreachable position is called a <strong>zombie position</strong>.</p>
  <p><em>Formally the game terminates as soon as DP is reached.</em> There is no arbiter involvement needed. I have spoken with the Head International Arbiter at the time (Stewart Reuben) and the Rules Committee member who invented the DP rule (Igor Vereshchagin), who confirmed. When they designed the rule as a replacement for draw by insufficient material, they were aware of the potential for entertainingly complex positions, but reckoned (correctly I think) that almost all practical situations encountered would be very simple. The rule seems to have bedded in well in the last 25 years.</p>
  <p>Zombie moves are hypothetical, because in all such positions the game has already finished. But in fact you <em>need</em> hypothetical moves, in order to explore the game tree and determine if a position is living or dead in the first place. So this &quot;walking dead&quot; concept is well-defined and it's also fun.</p>
  <p><strong>Avoiding circular definitions</strong></p>
  <p>Sometimes, people overload the term &quot;illegal move&quot; to mean &quot;zombie move&quot;, as in Francois Labelle's page linked above. A lot of the time such usage doesn't matter, but it can be confusing. Since DP is <em>defined</em> based on the FIDE Laws concept of legality, any redefinition of legality would be circular. So I prefer the perhaps more pedantic terms introduced above. Note: this is just terminology, it doesn't affect the underlying logic.</p>
  <p><strong>The three challenges</strong></p>
  <p>OP proposed an excellent challenge for each of three increasingly restrictive categories of DP, rephrased as:</p>
  <ol>
  <li>any DP,</li>
  <li>DP, and some sequence of zombie moves can avoid stalemate indefinitely,</li>
  <li>DP, and no sequence of zombie moves can reach stalemate.</li>
  </ol>
  <p>A difficulty is that solutions for 3. can have so many units that perhaps nothing new that can be added by loosening the game-end criteria in 2. To avoid overshadowing in this way, I suggest that we modify the categories, to make them mutually exclusive:</p>
  <ol>
  <li>DP, and all sequences of zombie moves end in stalemate.</li>
  <li>DP, and some, but not all, sequences of zombie moves end in stalemate.</li>
  <li>DP, and no sequence of zombie moves ends in stalemate.</li>
  </ol>
  <p>(For these purposes, we can ignore Draw by Threefold/Fivefold Repetition &amp; 50/75 move rules. A subject for another day, maybe...)</p>
  <p><strong>Types A, B, C &amp; D</strong></p>
  <p>To construct a position with certain properties, it's often easier if one player is already in check, or if we're given who has the move. So retroanalysis enthusiasts often sub-divide Task Records into various types:</p>
  <ul>
  <li><strong>Type B</strong> = no check, but we are told who has the move (e.g. White here). (In theory, retro-logic might tell us who is on the move without being told: this is so-called Type A, but this doesn't seem applicable for this question. We would treat it as a special case of Type B.)</li>
  <li><strong>Type C</strong> = one player is in check.</li>
  <li><strong>Type D</strong> = either player might be legitimately be on the move. We require that both sides satisfy the category requirements (1., 2. or 3.)</li>
  </ul>
  <p>Therefore we treat each of these Types separately here. Note that if R(n,X) is the maximum number of pieces for Category n with Type X, then R(n,B) &gt;= R(n,D).</p>
  <p><strong>Summary of Results</strong></p>
  <p>What records have been achieved so far?</p>
  <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th style="text-align: center;">Record</th>
  <th style="text-align: center;">Modified Challenge 1</th>
  <th style="text-align: center;">Modified Challenge 2</th>
  <th style="text-align: center;">Modified Challenge 3</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td style="text-align: center;">R(n,B)</td>
  <td style="text-align: center;">32 ID01</td>
  <td style="text-align: center;">(26)</td>
  <td style="text-align: center;">(29)</td>
  </tr>
  <tr>
  <td style="text-align: center;">R(n,C)</td>
  <td style="text-align: center;">32 ID02</td>
  <td style="text-align: center;">29 ID04</td>
  <td style="text-align: center;">30 ID06,ID07</td>
  </tr>
  <tr>
  <td style="text-align: center;">R(n,D)</td>
  <td style="text-align: center;">32 ID03</td>
  <td style="text-align: center;">26 ID05</td>
  <td style="text-align: center;">29 ID08</td>
  </tr>
  </tbody>
  </table>
  </div>
  <p>In this table, ID numbers reference the problems below. Any number in brackets is implied by R(n,B) &gt;= R(n,D).</p>
  <p>Are these records the best possible? R(1,B) = R(1,C) = R(1,D) = 32 are definitely unbeatable, but all the other records may well be improvable.</p>
  <p><strong>At last: some chess!</strong></p>
  <p>Here are all the constructions that drive this table:</p>
  <pre><code>[title &quot;ID01 R(1,B)=32, White to move, A.Buchanan&quot;]  
  [fen &quot;bqn1KN2/rrk1pB2/nb1pPp1p/p1pP1PpP/PpP3P1/1P2N1R1/4Q3/1R4B1 w - - 0 1&quot;]
  </code></pre>
  <p>Note, with White to move there is no e.p. possible since Black's last move could not have been g7-g5. Bf8 would have been captured at home, but we know it's still on the board.</p>
  <p>This position would not work as Type D because with BTM it's stalemate/living (depending on e.p.) with BTM. It wouldn't work as Type A because BTM is reachable.</p>
  <p>See also <a href="https://pdb.dieschwalbe.de/search.jsp?expression=PROBID%20IN%20%27P1182050%3B%20P1398255%27" rel="nofollow noreferrer">two other capture-free positions</a> that work as R(1,B).</p>
  <pre><code>[title &quot;ID02 (R1,C)=32, A.Buchanan&quot;]  
  [fen &quot;bqn1KN2/rr2pB2/nbkpPp1p/p1pP1PpP/PpP3P1/1P2N1R1/4Q3/1R4B1 w - - 0 1&quot;]
  </code></pre>
  <p>This is just a minor variation, retracting 1 single move from ID01. The same can be done in both of the other two R(1,B) positions linked to.</p>
  <pre><code>[title &quot;ID03 R(1,D)=32, A.Buchanan &amp; J.Coakley&quot;]
  [fen &quot;qrkn3n/rb1p1p1p/p1pPpPpP/PpP1P1P1/1P6/KRB5/BRN2N2/bQ6 w - - 0 1&quot;]
  </code></pre>
  <p>BTM: 1. ... Bxb2+ 2. KQRBxb2=. WTM can't relieve the looming stalemate. 20+1=21 legal but unplayable moves.</p>
  <pre><code>[title &quot;ID04 R(2,C)=29, J.Coakley, The Puzzling Side of Chess 127, 2016&quot;]
  [fen &quot;rnb1K1Qk/rb1pN1p1/p1pP2P1/P1P5/5p1p/4pP1P/q3P1BR/5BNR w - - 0 1&quot;]
  </code></pre>
  <p>Mandatory 3 captures yields position in which stalemate is optional.</p>
  <pre><code>[title &quot;ID05 R(2,D)=26, J.Coakley, The Puzzling Side of Chess 127, 2016, version&quot;]
  [fen &quot;rnb1K1k1/rb1p2p1/p1pP2P1/P1P5/5p1p/4pP1P/4P1BR/5BNR w - - 0 1&quot;]
  </code></pre>
  <p>This is the position 3 mandatory single moves after ID04. It can be reached with either side on the move.</p>
  <pre><code>[title &quot;ID06 R(3,C)=30, example 1, A.Buchanan&quot;]  
  [fen &quot;qrn1KRRB/brk1pPN1/1p1pPp1p/1b1P1P1P/Pp6/1Pp5/2P5/N5bB w - - 0 1&quot;]
  </code></pre>
  <p>One approach...</p>
  <pre><code>[title &quot;ID07 R(3,C)=30, example 2, A.Buchanan&quot;]
  [fen &quot;brn1KRRB/brN1pPN1/1bkpPp1p/p1pP1P1P/q1P5/1P6/1Q6/b4B2 w - - 0 1&quot;]  
  </code></pre>
  <p>...and another, achieving the same record.</p>
  <pre><code>[title &quot;ID08 R(3,D)=29, A.Buchanan&quot;]  
  [fen &quot;qrn1KRRB/brk1pPN1/1p1pPp1p/1P1P1P1P/1p6/1Pp5/2P5/N5bB w - - 0 1&quot;]
  </code></pre>
  <p>One move after ID06, but it can be reached with either player to move.</p>
  <pre><code>[title &quot;ID09 Challenge 1, Type B, 31 units, White to move. Last move?, A.Buchanan&quot;]
  [fen &quot;brnk1N1B/qnb1pBR1/rbKpP3/p1pP2NQ/P1P2p2/1p3P1p/1P5P/5R2 w - - 0 1&quot;]
  </code></pre>
  <p><strong>Bonus! Last move?</strong> Finally, here is a runner-up R(1,B) position in which additionally one can determine the last move. It costs a unit, so is not reflected in the table above, but nevertheless is interesting to illustrate the frequent involvement of en passant in critical DP situations. As with ID01, this can neither be Type A nor Type D.</p>
  <p>Black's last move must have been b4-b3. If the prior position was dead, the game would have already terminated. So White's move before that was a2-a4 or c2-c4, and Black chose not to make the en passant capture, which would have kept the game alive. No en passant convention is required here: a double pawn move by White is the only way the game could have reached the current position without dying already.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-10-09T20:13:06.527Z
Answers.Text: The difference between #2 and #3 is that a game of #3 could not end except by draw-by-repetition, draw-by-N-moves, or other such rule that is not based purely upon the position of pieces on the board, side on move, etc..  By contrast, #2 would allow for the possibility that players could end the game with a stalemated position.
Answers.UserDisplayName: supercat
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-10-09T20:27:41.080Z
Answers.Text: Looking at the diagram, I can see five potential last moves for Black (b3, d6, f4, h3).  I don't see any particular reason Black couldn't have had a pawn on b4, d7, f5, or h4 prior to the last move.  If the f8 knight were on g6 and the f7 bishop on g8, Black could temporize indefinitely with Ke8/Kd8 and White with Ra1/Rf1 with pawns in any of the aforementioned positions.
Answers.UserDisplayName: supercat
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-10-09T22:57:49.283Z
Answers.Text: Thanks supercat for clarification on 1,2,3 I will edit the post - I knew I was missing something. There are apparently three possibilities for last move (b3,f4,h3). (d6 had impossible prior check on wK). But the fact that we are in dead position.has retro implications. The answer is a bit sneaky.
Answers.UserDisplayName: Laska
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-10-10T05:58:52.160Z
Answers.Text: I hadn't been asking for that retrograde wrinkle, but I must say it's quite cute if one adds the wrinkle that the position must have been rendered dead by the last move.  I don't think the laws of chess require that play stop as soon as a dead position is reached, or would require that an arbiter recognize whether a position is dead except in cases where the game is over for other reasons (e.g. because a player's flag has fallen) and the question is whether to score a full or half point.  Still, definite +1 for the retro puzzle and the 32-piece version.
Answers.UserDisplayName: supercat
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-10-10T06:37:02.247Z
Answers.Text: Thanks very much! Actually the laws of chess do say that a dead position game ends immediately. It's as sudden as checkmate or stalemate. Francois Labelle on his website wismuth.com has a list of games where players carried on going for a couple of turns before they realized! (Nit: he incorrectly terms such impossible moves "illegal".) But for formal chess problems, a recent 2015 convention says dead position, like 50 moves, only applies by default to retros (to protect e.g. self-stalemates). Most dead position problems are retro, so it's no issue. In others, as here, the condition is implied.
Answers.UserDisplayName: Laska
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-10-10T14:35:35.533Z
Answers.Text: If a position is dead, then *by definition* pretty much nothing the players could do would affect the outcome *whether or not the game was recognized as "dead"*.  The only situation I can think of where there could be an issue would be if someone resigned a dead position and later realize it was dead, and could plausibly claim the resignation was not deliberate bad sportsmanship (since bad sportsmanship might justify a forfeit even if the game would otherwise have been drawn).  Otherwise, I would think that the official scores for games would include all the moves that were played.
Answers.UserDisplayName: supercat
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-10-11T03:12:18.360Z
Answers.Text: I agree. It replaced and generalized the old "draw by insufficient material" FIDE rule. I don't know why they felt this was necessary, but it was a gift to retro composers. It does make sense that no claim is needed. 50 moves & 3 rep are complicated and require arbiter verification. But deadness is usually simple to see. I have also heard that "no claim" simplifies the online world, where a game just ends immediately when e.g. KNvK is reached.
Answers.UserDisplayName: Laska
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-10-11T09:31:04.080Z
Answers.Text: +1 for th beautiful 28-men dead draw. That will even be 29 if you force the move for black and add a wQb2...
Answers.UserDisplayName: Evargalo
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-10-11T23:37:50.063Z
Answers.Text: I wanted to see if I could get at least 2 more units by moving to Type C. I have just found such a position with 30 units, where 3 forced captures take place at the beginning. For the first time, I am not confident that this can be improved.
Answers.UserDisplayName: Laska
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-02-18T13:18:03.440Z
Answers.Text: Realized oh so much later that I could find a place for wN in the 3rd position. Missing pieces count is exactly what's needed to explain the pawn captures: very lucky
Answers.UserDisplayName: Laska
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-12-14T17:44:44.620Z
Answers.Text: @Laska: See my response to your comment to the question; unless I'm missing something, a tweak to the position for R(3,B) would satisfy R(3,A) on the presumption that if only one side has a legal move, that side must be the one on move.
Answers.UserDisplayName: supercat
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-12-14T17:51:23.887Z
Answers.Text: @Laska: Upon further consideration, more tweaking would be required, but I think it's still doable.  Move the bishop and knight that are on dark squares to h8 and g7, respectively, and change black's penultimate move to some other arbitrary pawn move.
Answers.UserDisplayName: supercat
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-12-14T18:09:33.507Z
Answers.Text: @Supercat. Please propose specific FENs, and I will look at them. "Tweaks" are hard to interpret when there's so many diagrams. And it's time for bed here :)
Answers.UserDisplayName: Laska
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-12-14T18:19:30.850Z
Answers.Text: @Laska: Try "bqn1KN1B/rrk1pBN1/nb1pPp1p/p1pP1PpP/PpP3P1/1P6/R1R3Q1/8 w - - 0 1" unless I'm missing something.  I think that position would be reachable with either white on move, or as a stalemated position following a white move, but I don't think it can be a live position in any case.
Answers.UserDisplayName: supercat
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-12-15T01:50:44.190Z
Answers.Text: @supercat Thanks for this. (1) If WTM, it's living by 1.Ra3/Rc3: the last move was any of 5 Black pawn moves. (2) If BTM then as you say it's stalemate. Whatever White did could have been the living Ra3/Rc3 instead, so no problem reaching this position. But in neither case is the position dead.
Answers.UserDisplayName: Laska
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-12-15T05:25:16.383Z
Answers.Text: @Laska: Oops.  So I was missing something.  Would the following be a valid 30-unit solution (White's g pawn captures black's f and g pawns and promotes to bishop)? `bqn1KN2/rrk1pP2/nb1pP2p/p1pP3P/PpP5/1P6/B1B2N1R/5RBQ w - - 0 1`?
Answers.UserDisplayName: supercat
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-12-15T06:07:58.033Z
Answers.Text: @supercat. Yes the chess works: nice idea. So this is WTM dead / BTM stalemate and in both cases the position is reachable. The issue is the interaction between the definition of Type A & the definition of Challenge 1. To resolve it, either BTM must be dead not stalemate (difficult, I think), or (better) you find some way of making BTM a zombie position.
Answers.UserDisplayName: Laska
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-12-15T06:20:14.490Z
Answers.Text: @Laska: My definition for #1 was "the side on move has at least one legal move, but no sequence of moves will produce checkmate", and your definition for "A" was "Neither side in check; no additional information provided".  It is possible to infer from my last diagram, without supplemental information, that it is not possible for Black to be on move.  If White had moved last,  the game would have ended and *nobody* would be on move.  Thus, for anyone to be on move, White would have to have moved last.  If the solution is valid, I would think it should be included in the answer as the best...
Answers.UserDisplayName: supercat
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-12-15T06:21:33.127Z
Answers.Text: ...solution you know of to R(1,A) since it has 30 pieces rather than 29.
Answers.UserDisplayName: supercat
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-12-15T06:36:21.267Z
Answers.Text: @Laska: As a point of clarification, the reason your 32-piece diagrams would not be be solutions for R(1,A) with black to move is not that black would have no legal moves, but rather the position would be live after Black made the only legal move (capturing either a4 or c4 en passant).
Answers.UserDisplayName: supercat
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-12-15T06:36:29.737Z
Answers.Text: @supercat Two points (1) If BTM, White might have just moved e.g. Nh3-f2. But there was an alternative Bg1xc5. So the position is stalemate but reachable. (2) When a game ends, there is always still someone on move. FIDE Art 1.3 "A player is said to ‘have the move’ when his/her opponent’s move has been ‘made’."
Answers.UserDisplayName: Laska
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-12-15T06:37:10.937Z
Answers.Text: Let us [continue this discussion in chat](https://chat.stackexchange.com/rooms/150335/discussion-between-laska-and-supercat).
Answers.UserDisplayName: Laska
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2017-10-09T16:39:41.140Z
Answers.LastActivityDate: 2023-12-31T06:18:00.607Z
Answers.LastEditDate: 2023-12-31T06:18:00.607Z
Answers.UserDisplayName: Laska
Body: <p>It is possible in a chess game to have a dead position in which both players have all eight pawns, one bishop, and a king--20 pieces total.  If the two players' pawns are interlocked in "zig-zag" fashion and each player's bishop is the same color as his pawns, each player's army will be forever stuck behind his own wall of pawns, with no way to ever reach anything on the other side.</p>
  
  <pre><code>[FEN "4kb2/8/1p1p5/pPpPp1p1/P1P1PpPp/5P1P/8/4KB2 w - - 0 1"]
  </code></pre>
  
  <p>What is the largest number of pieces that can be on the board in a legally-reachable position such that either:</p>
  
  <ol>
  <li><p>The side on move has at least one legal move, but no sequence of legal moves would produce checkmate.</p></li>
  <li><p>It would be possible to play an arbitrary number of legal moves, but no sequence of legal moves would produce checkmate.</p></li>
  <li><p>No legal sequence of legal moves would produce checkmate or stalemate.</p></li>
  </ol>
  
  <p>I would guess that the first of those might be possible with as many as 28 pieces on the board, but most escape-proof positions rely upon immobilized kings to block opposing pawns, making it hard to allow anything other than pawns to move safely.  What are the actual limits?</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-09-25T01:20:31.730Z
Comments.Text: What exactly are you looking for? Are positions where the pieces are arranged such that each side can only move one piece back and forth good enough? Or do the pieces need more "freedom"? If so, how much more freedom? (Such almost-stalemates are pretty easy to construct, although maybe there would not be proof games if both sides have 16 pieces.)
Comments.UserDisplayName: TMM
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-09-25T01:38:14.103Z
Comments.Text: @TMM: Positions where pieces are limited to moving back and forth would be fine, if they are reachable via sequence of legal moves.
Comments.UserDisplayName: supercat
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-10-14T13:29:41.877Z
Comments.Text: You are asking three different questions, you have to delete it and post three separate questions. The questions are all so totally unrelated to each other that they must be posted on different sites in different languages at different times. The whole 1, 2, 3 thing makes me so very confused that we have to chat about it here for a long while now. I know that you know that feeling!
Comments.UserDisplayName: LocalFluff
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-10-14T15:16:37.607Z
Comments.Text: @LocalFluff: Before asking the question, I didn't know whether the answers to #1 and #3 would be different.  While it seems unlikely that #3 would be possible with all 32 pieces on the board, I still don't know if the best position for #2 would guarantee that no stalemate would ever be possible.  If it wouldn't, then any answer for #3 would also hold for #2, making #2 redundant.
Comments.UserDisplayName: supercat
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2023-12-14T04:33:39.023Z
Comments.Text: @supercat With all due respect, can you unaccept the accepted answer by Evergalo please. All the best answers to 1, 2 & 3 are in now in my own answer, which still has a smaller number of upvotes than Evergalo & Herb. I would appreciate if you can accept my own answer or suggest what needs to be done
Comments.UserDisplayName: Laska
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2023-12-14T16:08:48.200Z
Comments.Text: @Laska: Sounds good to me.
Comments.UserDisplayName: supercat
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2023-12-14T17:38:57.897Z
Comments.Text: @Laska: It took me a moment to understand what the parentheses meant in the table.  Instead of saying "implied by inequality" say "Implied by challenge 3".  Also, am I missing something or would your first diagram satisfy R(3,A) if the white rooks were moved to a2 and c2, and the queen to g2?  The last two moves could have been 1. Ke8 g6 2. Bf8 g5, with Black having been able to move the king back and forth as many times as needed prior to that.  Because white's last move could not have been a double pawn push, the only way the game could be live would be if Black had moved last.
Comments.UserDisplayName: supercat
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2023-12-14T18:07:27.397Z
Comments.Text: @Supercat thanks for this. The inequality reasoning works both horizontally & vertically. So R(n,A) =< R(n,B). There is no such inequality linking R(n,C). I am a bit unclear which diagram you are referring to. My first diagram is bqn1KN2/rrk1pB2/nb1pPp1p/p1pP1PpP/PpP3P1/1P2N1R1/4Q3/1R4B1 (Challenge 1, Type B, 32 units, White to move) but after moving White rooks & queen, it's still impossible for a king to come from or to e8. Please clarify the diagram that you are looking at. With Ra2  and WTM, the e.p. by bPb5 doesn't matter any more because 1. Ra2-a3 b4xRa3 etc i.e. the position is living
Comments.UserDisplayName: Laska
Tags: <theory><problems><draw><records><dead-position>
Title: Maximum number of pieces on board in dead position
ThreadText: # Maximum number of pieces on board in dead position
  
  (Asked by: username_0 on 2017-09-24)
  
  It is possible in a chess game to have a dead position in which both players have all eight pawns, one bishop, and a king--20 pieces total. If the two players' pawns are interlocked in "zig-zag" fashion and each player's bishop is the same color as his pawns, each player's army will be forever stuck behind his own wall of pawns, with no way to ever reach anything on the other side.
  
  ```
  [FEN "4kb2/8/1p1p5/pPpPp1p1/P1P1PpPp/5P1P/8/4KB2 w - - 0 1"]
  
  ```
  
  What is the largest number of pieces that can be on the board in a legally-reachable position such that either:
  
  1. The side on move has at least one legal move, but no sequence of legal moves would produce checkmate.
  2. It would be possible to play an arbitrary number of legal moves, but no sequence of legal moves would produce checkmate.
  3. No legal sequence of legal moves would produce checkmate or stalemate.
  
  I would guess that the first of those might be possible with as many as 28 pieces on the board, but most escape-proof positions rely upon immobilized kings to block opposing pawns, making it hard to allow anything other than pawns to move safely. What are the actual limits?
  
  **Tags:** theory, problems, draw, records, dead-position
  
  > **Comments:**
  > **username_1**: What exactly are you looking for? Are positions where the pieces are arranged such that each side can only move one piece back and forth good enough? Or do the pieces need more "freedom"? If so, how much more freedom? (Such almost-stalemates are pretty easy to construct, although maybe there would not be proof games if both sides have 16 pieces.)  
  > **username_0**: @username_1: Positions where pieces are limited to moving back and forth would be fine, if they are reachable via sequence of legal moves.  
  > **username_2**: You are asking three different questions, you have to delete it and post three separate questions. The questions are all so totally unrelated to each other that they must be posted on different sites in different languages at different times. The whole 1, 2, 3 thing makes me so very confused that we have to chat about it here for a long while now. I know that you know that feeling!  
  > **username_0**: @username_2: Before asking the question, I didn't know whether the answers to #1 and #3 would be different.  While it seems unlikely that #3 would be possible with all 32 pieces on the board, I still don't know if the best position for #2 would guarantee that no stalemate would ever be possible.  If it wouldn't, then any answer for #3 would also hold for #2, making #2 redundant.  
  > **username_3**: @username_0 With all due respect, can you unaccept the accepted answer by Evergalo please. All the best answers to 1, 2 & 3 are in now in my own answer, which still has a smaller number of upvotes than Evergalo & username_4. I would appreciate if you can accept my own answer or suggest what needs to be done  
  > **username_0**: @username_3: Sounds good to me.  
  > **username_0**: @username_3: It took me a moment to understand what the parentheses meant in the table.  Instead of saying "implied by inequality" say "Implied by challenge 3".  Also, am I missing something or would your first diagram satisfy R(3,A) if the white rooks were moved to a2 and c2, and the queen to g2?  The last two moves could have been 1. Ke8 g6 2. Bf8 g5, with Black having been able to move the king back and forth as many times as needed prior to that.  Because white's last move could not have been a double pawn push, the only way the game could be live would be if Black had moved last.  
  > **username_3**: @username_0 thanks for this. The inequality reasoning works both horizontally & vertically. So R(n,A) =< R(n,B). There is no such inequality linking R(n,C). I am a bit unclear which diagram you are referring to. My first diagram is bqn1KN2/rrk1pB2/nb1pPp1p/p1pP1PpP/PpP3P1/1P2N1R1/4Q3/1R4B1 (Challenge 1, Type B, 32 units, White to move) but after moving White rooks & queen, it's still impossible for a king to come from or to e8. Please clarify the diagram that you are looking at. With Ra2  and WTM, the e.p. by bPb5 doesn't matter any more because 1. Ra2-a3 b4xRa3 etc i.e. the position is living  
  
  ---
  
  ## 3 answers
  
  ### Answer by username_3 on 2017-10-09. Score: 15 | Accepted answer
  
  **EDIT** 30-Dec-2023: added the R(1,D) position with 32 units. So Challenge 1 is now completely resolved.
  
  Apologies that the first few lines are a bit theoretical. I reach the actual chess as soon as I can! :)
  
  **Living & dying moves**
  
  In a position, if there are no legal moves, then the game ends immediately: in **checkmate** (if check) or **stalemate** (if no check). Otherwise, there is at least one legal move. Then we can describe each legal move as either **living** (if there's a checkmate still possible after playing it) or **dying** (if there is no checkmate anywhere ahead in its game tree). Quality of play is not a consideration: all sequences of legal moves are valid.
  
  **Living & dead positions**
  
  Under FIDE Laws, the game ends immediately in **Dead Position (DP)** if there's at least one legal move, and *all* of them are dying. A position with a living move we call **living**.
  
  So there are four kinds of position: checkmate, stalemate, dead & living. These are exhaustive & mutually exclusive. In particular, stalemate & dead position are disjoint. (This last point wasn't obvious to me at first, but clearly it's the intention of the FIDE Laws.)
  
  | Summary |
  | --- |
  | A living move gives a living position or checkmate. |
  | A dying move gives a dead position or stalemate. |
  
  **Zombies**
  
  From a DP, the moves aren't actually played (except over-the-board by accident or from ignorance sometimes: see <http://wismuth.com/chess/illegal-moves.html>). Such legal but unplayable moves are called **zombie moves**. Similarly, a legal but unreachable position is called a **zombie position**.
  
  *Formally the game terminates as soon as DP is reached.* There is no arbiter involvement needed. I have spoken with the Head International Arbiter at the time (Stewart Reuben) and the Rules Committee member who invented the DP rule (Igor Vereshchagin), who confirmed. When they designed the rule as a replacement for draw by insufficient material, they were aware of the potential for entertainingly complex positions, but reckoned (correctly I think) that almost all practical situations encountered would be very simple. The rule seems to have bedded in well in the last 25 years.
  
  Zombie moves are hypothetical, because in all such positions the game has already finished. But in fact you *need* hypothetical moves, in order to explore the game tree and determine if a position is living or dead in the first place. So this "walking dead" concept is well-defined and it's also fun.
  
  **Avoiding circular definitions**
  
  Sometimes, people overload the term "illegal move" to mean "zombie move", as in Francois Labelle's page linked above. A lot of the time such usage doesn't matter, but it can be confusing. Since DP is *defined* based on the FIDE Laws concept of legality, any redefinition of legality would be circular. So I prefer the perhaps more pedantic terms introduced above. Note: this is just terminology, it doesn't affect the underlying logic.
  
  **The three challenges**
  
  OP proposed an excellent challenge for each of three increasingly restrictive categories of DP, rephrased as:
  
  1. any DP,
  2. DP, and some sequence of zombie moves can avoid stalemate indefinitely,
  3. DP, and no sequence of zombie moves can reach stalemate.
  
  A difficulty is that solutions for 3. can have so many units that perhaps nothing new that can be added by loosening the game-end criteria in 2. To avoid overshadowing in this way, I suggest that we modify the categories, to make them mutually exclusive:
  
  1. DP, and all sequences of zombie moves end in stalemate.
  2. DP, and some, but not all, sequences of zombie moves end in stalemate.
  3. DP, and no sequence of zombie moves ends in stalemate.
  
  (For these purposes, we can ignore Draw by Threefold/Fivefold Repetition & 50/75 move rules. A subject for another day, maybe...)
  
  **Types A, B, C & D**
  
  To construct a position with certain properties, it's often easier if one player is already in check, or if we're given who has the move. So retroanalysis enthusiasts often sub-divide Task Records into various types:
  
  * **Type B** = no check, but we are told who has the move (e.g. White here). (In theory, retro-logic might tell us who is on the move without being told: this is so-called Type A, but this doesn't seem applicable for this question. We would treat it as a special case of Type B.)
  * **Type C** = one player is in check.
  * **Type D** = either player might be legitimately be on the move. We require that both sides satisfy the category requirements (1., 2. or 3.)
  
  Therefore we treat each of these Types separately here. Note that if R(n,X) is the maximum number of pieces for Category n with Type X, then R(n,B) >= R(n,D).
  
  **Summary of Results**
  
  What records have been achieved so far?
  
  | Record | Modified Challenge 1 | Modified Challenge 2 | Modified Challenge 3 |
  | --- | --- | --- | --- |
  | R(n,B) | 32 ID01 | (26) | (29) |
  | R(n,C) | 32 ID02 | 29 ID04 | 30 ID06,ID07 |
  | R(n,D) | 32 ID03 | 26 ID05 | 29 ID08 |
  
  In this table, ID numbers reference the problems below. Any number in brackets is implied by R(n,B) >= R(n,D).
  
  Are these records the best possible? R(1,B) = R(1,C) = R(1,D) = 32 are definitely unbeatable, but all the other records may well be improvable.
  
  **At last: some chess!**
  
  Here are all the constructions that drive this table:
  
  ```
  [title "ID01 R(1,B)=32, White to move, A.Buchanan"]  
  [fen "bqn1KN2/rrk1pB2/nb1pPp1p/p1pP1PpP/PpP3P1/1P2N1R1/4Q3/1R4B1 w - - 0 1"]
  
  ```
  
  Note, with White to move there is no e.p. possible since Black's last move could not have been g7-g5. Bf8 would have been captured at home, but we know it's still on the board.
  
  This position would not work as Type D because with BTM it's stalemate/living (depending on e.p.) with BTM. It wouldn't work as Type A because BTM is reachable.
  
  See also [two other capture-free positions](https://pdb.dieschwalbe.de/search.jsp?expression=PROBID%20IN%20%27P1182050%3B%20P1398255%27) that work as R(1,B).
  
  ```
  [title "ID02 (R1,C)=32, A.Buchanan"]  
  [fen "bqn1KN2/rr2pB2/nbkpPp1p/p1pP1PpP/PpP3P1/1P2N1R1/4Q3/1R4B1 w - - 0 1"]
  
  ```
  
  This is just a minor variation, retracting 1 single move from ID01. The same can be done in both of the other two R(1,B) positions linked to.
  
  ```
  [title "ID03 R(1,D)=32, A.Buchanan & J.Coakley"]
  [fen "qrkn3n/rb1p1p1p/p1pPpPpP/PpP1P1P1/1P6/KRB5/BRN2N2/bQ6 w - - 0 1"]
  
  ```
  
  BTM: 1. ... Bxb2+ 2. KQRBxb2=. WTM can't relieve the looming stalemate. 20+1=21 legal but unplayable moves.
  
  ```
  [title "ID04 R(2,C)=29, J.Coakley, The Puzzling Side of Chess 127, 2016"]
  [fen "rnb1K1Qk/rb1pN1p1/p1pP2P1/P1P5/5p1p/4pP1P/q3P1BR/5BNR w - - 0 1"]
  
  ```
  
  Mandatory 3 captures yields position in which stalemate is optional.
  
  ```
  [title "ID05 R(2,D)=26, J.Coakley, The Puzzling Side of Chess 127, 2016, version"]
  [fen "rnb1K1k1/rb1p2p1/p1pP2P1/P1P5/5p1p/4pP1P/4P1BR/5BNR w - - 0 1"]
  
  ```
  
  This is the position 3 mandatory single moves after ID04. It can be reached with either side on the move.
  
  ```
  [title "ID06 R(3,C)=30, example 1, A.Buchanan"]  
  [fen "qrn1KRRB/brk1pPN1/1p1pPp1p/1b1P1P1P/Pp6/1Pp5/2P5/N5bB w - - 0 1"]
  
  ```
  
  One approach...
  
  ```
  [title "ID07 R(3,C)=30, example 2, A.Buchanan"]
  [fen "brn1KRRB/brN1pPN1/1bkpPp1p/p1pP1P1P/q1P5/1P6/1Q6/b4B2 w - - 0 1"]  
  
  ```
  
  ...and another, achieving the same record.
  
  ```
  [title "ID08 R(3,D)=29, A.Buchanan"]  
  [fen "qrn1KRRB/brk1pPN1/1p1pPp1p/1P1P1P1P/1p6/1Pp5/2P5/N5bB w - - 0 1"]
  
  ```
  
  One move after ID06, but it can be reached with either player to move.
  
  ```
  [title "ID09 Challenge 1, Type B, 31 units, White to move. Last move?, A.Buchanan"]
  [fen "brnk1N1B/qnb1pBR1/rbKpP3/p1pP2NQ/P1P2p2/1p3P1p/1P5P/5R2 w - - 0 1"]
  
  ```
  
  **Bonus! Last move?** Finally, here is a runner-up R(1,B) position in which additionally one can determine the last move. It costs a unit, so is not reflected in the table above, but nevertheless is interesting to illustrate the frequent involvement of en passant in critical DP situations. As with ID01, this can neither be Type A nor Type D.
  
  Black's last move must have been b4-b3. If the prior position was dead, the game would have already terminated. So White's move before that was a2-a4 or c2-c4, and Black chose not to make the en passant capture, which would have kept the game alive. No en passant convention is required here: a double pawn move by White is the only way the game could have reached the current position without dying already.
  
  > **Comments:**
  > **username_0**: The difference between #2 and #3 is that a game of #3 could not end except by draw-by-repetition, draw-by-N-moves, or other such rule that is not based purely upon the position of pieces on the board, side on move, etc..  By contrast, #2 would allow for the possibility that players could end the game with a stalemated position.  
  > **username_0**: Looking at the diagram, I can see five potential last moves for Black (b3, d6, f4, h3).  I don't see any particular reason Black couldn't have had a pawn on b4, d7, f5, or h4 prior to the last move.  If the f8 knight were on g6 and the f7 bishop on g8, Black could temporize indefinitely with Ke8/Kd8 and White with Ra1/Rf1 with pawns in any of the aforementioned positions.  
  > **username_3**: Thanks username_0 for clarification on 1,2,3 I will edit the post - I knew I was missing something. There are apparently three possibilities for last move (b3,f4,h3). (d6 had impossible prior check on wK). But the fact that we are in dead position.has retro implications. The answer is a bit sneaky.  
  > **username_0**: I hadn't been asking for that retrograde wrinkle, but I must say it's quite cute if one adds the wrinkle that the position must have been rendered dead by the last move.  I don't think the laws of chess require that play stop as soon as a dead position is reached, or would require that an arbiter recognize whether a position is dead except in cases where the game is over for other reasons (e.g. because a player's flag has fallen) and the question is whether to score a full or half point.  Still, definite +1 for the retro puzzle and the 32-piece version.  
  > **username_3**: Thanks very much! Actually the laws of chess do say that a dead position game ends immediately. It's as sudden as checkmate or stalemate. Francois Labelle on his website wismuth.com has a list of games where players carried on going for a couple of turns before they realized! (Nit: he incorrectly terms such impossible moves "illegal".) But for formal chess problems, a recent 2015 convention says dead position, like 50 moves, only applies by default to retros (to protect e.g. self-stalemates). Most dead position problems are retro, so it's no issue. In others, as here, the condition is implied.  
  > **username_0**: If a position is dead, then *by definition* pretty much nothing the players could do would affect the outcome *whether or not the game was recognized as "dead"*.  The only situation I can think of where there could be an issue would be if someone resigned a dead position and later realize it was dead, and could plausibly claim the resignation was not deliberate bad sportsmanship (since bad sportsmanship might justify a forfeit even if the game would otherwise have been drawn).  Otherwise, I would think that the official scores for games would include all the moves that were played.  
  > **username_3**: I agree. It replaced and generalized the old "draw by insufficient material" FIDE rule. I don't know why they felt this was necessary, but it was a gift to retro composers. It does make sense that no claim is needed. 50 moves & 3 rep are complicated and require arbiter verification. But deadness is usually simple to see. I have also heard that "no claim" simplifies the online world, where a game just ends immediately when e.g. KNvK is reached.  
  > **username_7**: +1 for th beautiful 28-men dead draw. That will even be 29 if you force the move for black and add a wQb2...  
  > **username_3**: I wanted to see if I could get at least 2 more units by moving to Type C. I have just found such a position with 30 units, where 3 forced captures take place at the beginning. For the first time, I am not confident that this can be improved.  
  > **username_3**: Realized oh so much later that I could find a place for wN in the 3rd position. Missing pieces count is exactly what's needed to explain the pawn captures: very lucky  
  > **username_0**: @username_3: See my response to your comment to the question; unless I'm missing something, a tweak to the position for R(3,B) would satisfy R(3,A) on the presumption that if only one side has a legal move, that side must be the one on move.  
  > **username_0**: @username_3: Upon further consideration, more tweaking would be required, but I think it's still doable.  Move the bishop and knight that are on dark squares to h8 and g7, respectively, and change black's penultimate move to some other arbitrary pawn move.  
  > **username_3**: @username_0. Please propose specific FENs, and I will look at them. "Tweaks" are hard to interpret when there's so many diagrams. And it's time for bed here :)  
  > **username_0**: @username_3: Try "bqn1KN1B/rrk1pBN1/nb1pPp1p/p1pP1PpP/PpP3P1/1P6/R1R3Q1/8 w - - 0 1" unless I'm missing something.  I think that position would be reachable with either white on move, or as a stalemated position following a white move, but I don't think it can be a live position in any case.  
  > **username_3**: @username_0 Thanks for this. (1) If WTM, it's living by 1.Ra3/Rc3: the last move was any of 5 Black pawn moves. (2) If BTM then as you say it's stalemate. Whatever White did could have been the living Ra3/Rc3 instead, so no problem reaching this position. But in neither case is the position dead.  
  > **username_0**: @username_3: Oops.  So I was missing something.  Would the following be a valid 30-unit solution (White's g pawn captures black's f and g pawns and promotes to bishop)? `bqn1KN2/rrk1pP2/nb1pP2p/p1pP3P/PpP5/1P6/B1B2N1R/5RBQ w - - 0 1`?  
  > **username_3**: @username_0. Yes the chess works: nice idea. So this is WTM dead / BTM stalemate and in both cases the position is reachable. The issue is the interaction between the definition of Type A & the definition of Challenge 1. To resolve it, either BTM must be dead not stalemate (difficult, I think), or (better) you find some way of making BTM a zombie position.  
  > **username_0**: @username_3: My definition for #1 was "the side on move has at least one legal move, but no sequence of moves will produce checkmate", and your definition for "A" was "Neither side in check; no additional information provided".  It is possible to infer from my last diagram, without supplemental information, that it is not possible for Black to be on move.  If White had moved last,  the game would have ended and *nobody* would be on move.  Thus, for anyone to be on move, White would have to have moved last.  If the solution is valid, I would think it should be included in the answer as the best...  
  > **username_0**: ...solution you know of to R(1,A) since it has 30 pieces rather than 29.  
  > **username_0**: @username_3: As a point of clarification, the reason your 32-piece diagrams would not be be solutions for R(1,A) with black to move is not that black would have no legal moves, but rather the position would be live after Black made the only legal move (capturing either a4 or c4 en passant).  
  > **username_3**: @username_0 Two points (1) If BTM, White might have just moved e.g. Nh3-f2. But there was an alternative Bg1xc5. So the position is stalemate but reachable. (2) When a game ends, there is always still someone on move. FIDE Art 1.3 "A player is said to ‘have the move’ when his/her opponent’s move has been ‘made’."  
  > **username_3**: Let us [continue this discussion in chat](https://chat.stackexchange.com/rooms/150335/discussion-between-username_3-and-username_0).  
  
  ---
  
  ### Answer by username_4 on 2017-09-25. Score: 12
  
  I've come up with 23, in the following position, with promotions:
  
  ```
  [Event "?"]
  [Site "?"]
  [Date "????.??.??"]
  [Round "?"]
  [White "?"]
  [Black "?"]
  [Result "*"]
  [FEN "nb2k3/2p5/1pP5/1Pp5/2P1p1p1/3pPpPp/3P1P1B/4KNBN w - - 0 1"]
  
  ```
  
  \*
  
  > **Comments:**
  > **username_5**: Good work. I have experimented a bit and I think you can add Qg1, Rg2 and Rh3 for White (last sequence of legal moves, *backwards*: e3, Nf1, Qg1, Rg2, Rg1, Bh2, Rh3, Rh2, Bg1, Rg2, Rg1).  
  > **username_6**: @username_5 with Rg2 it's not a dead position as black has fxg2.  
  > **username_5**: @username_6 Oh darn. I focused too much on White's move options, not Black's. Forget about it, then.  
  > **username_6**: This is not a dead position, white can play Bg1, Nh2, Nxg4.  
  > **username_4**: Fixed the cook, with a promotion.  
  
  ---
  
  ### Answer by username_7 on 2017-09-25. Score: 11
  
  Funny task. I think I'm still pretty far from the maximum, but here is a suggestion with
  
  **23 men**:
  
  ```
  [Event "?"]
  [title "Challenge 3, 23 units"]
  [FEN "NRN1k1bn/QRKpPp2/PPpP1Pp1/2P3Pp/7P/8/7B/8 w - - 0 1"]
  
  ```
  
  **With black to move, an almost-dishonest trick to reach 25**:
  
  ```
  [title "Challenge 3, BTM, 25 units"]
  [FEN "BRN1Nkbn/QRKpPp2/PPpP1Pp1/2P3Pp/7P/8/1r6/B7 b - - 0 1"]
  
  ```
  
  **27 with promoted units**:
  
  ```
  [title "Challenge 3, Check, 27 unit, including promoted"]
  [FEN "QNBk1bnr/RBpPpKbr/PpP1Pp1p/1P3P1q/6P1/8/1R6/b7 w - - 0 1"]
  
  ```
  
  *explanation*:
  This is a dead draw because after the forced moves 1.gxh5 Bxb2, White could only play his king back and forth on f7 and g6 while Black's bishop explores the bottom half of the board.
  wRb2 could be replaced by a wB or a wN (or a wQ with obvious adjustment of the nature of the upper-left-corner stranded pieces), or even by a fourth bB while preserving legality. This is so many "degrees of freedom" that I strongly feel that 27 is not the maximum, and someone will soon come up with (at least) 28...
  
  *edit*: indeed, username_3 just scored a pretty 28 (or even 30 with "the trick").
  
  > **Comments:**
  > **username_8**: Your '24' needs promoted units too (Black has two black-square bishops)  
  > **username_7**: Oh, you're right of course.  
  > **username_6**: I like the trick for this 24!  
  > **username_6**: Wow, it seems the 26 is even legal, black a-pawn captures twice to promote on a1 or c1, black d-pawn captures once, accounts for all white's missing pieces. The g-pawn may have promoted on g1 and got there because white's g-pawn captured twice on its way to g8, which happens to be white. Nice :-)  
  > **username_0**: The trick for 24 is fine.  
  > **username_0**: What's happened to the 26 position?  It seems to have become a non-solution since White is checkmated.  
  > **username_9**: I think some of these violate the terms of the question: "It would be possible to play an arbitrary number of legal moves" and "No legal sequence of legal moves would produce checkmate or stalemate".  
  > **username_0**: @DM: There are three questions in one, which might or might not all have the same best answer.  A situation where the player on move would have no legal move that didn't force stalemate would be a valid answer for the first.  A situation where two players repeat the same sequence of four positions endlessly would qualify for any of them, since in the absence of a rule about draws by repetition, that sequence could be played arbitrarily many times, and in the presence of such a rule even the starting position would eventually lead to a draw by repetition if the game didn't by other means first.  
  > **username_0**: @OlivierPucher: It might be helpful to add annotations showing how things would play out until the repeat.  I got tripped up because your previous position had black to play, so I was looking for Black to do likewise on the last one.  
  > **username_9**: @username_0 I missed that it says "either".  OK.  
  
  ---
  
  