cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-2 of 2 results.

A278832 Maximal material difference at the end of the n-th ply of a chess game.

Original entry on oeis.org

0, 0, 3, 3, 10, 10, 15, 15, 24, 24
Offset: 1

Views

Author

M. F. Hasler, Nov 29 2016

Keywords

Comments

This sequence uses values of 1, 3, 3, 5 and 9 for a pawn, knight, bishop, rook and queen. The terms give the maximum possible difference of White's material minus Black's material at the n-th ply, i.e., after n half-moves.
I conjecture that, unless Black is forced to capture a white piece in all of the maximizing positions, every other term will be equal to the preceding one, a(2n) = a(2n-1).
The sequence is bounded from above by the theoretical maximum of 8 + 4*3 + 2* 5 + 9 = 39, the total value of all of one player's material, plus 8*8 = 64 more points in case all pawns of the "winning side" can be promoted to queens.
Several variants of this sequence are possible. For example, every other term could give the best possible value for Black, in signed or in absolute value.
From Michael S. Branicky, Dec 29 2022: (Start)
a(7) = 15 can be achieved with 1. e4 h5 2. Qxh5 e6 3. QxR Qh4 4. QxQ;
a(9) = 24, with 1. d4 e5 2. dxe5 Nf6 3. exf6 Be7 4. fxe7 f6 5. exd8=Q+.
Continuing the latter, ... Kf7 6. QxR f5 7. QxB Na6 8. QxR Nb8 9. QxN we see that a(11) >= 29, a(13) >= 32, a(15) >= 37, and a(17) >= 40. (End)

Examples

			In the first two half-moves no material can be captured. At its second move, i.e., ply 3, White has a few possibilities of capturing a black knight, e.g., 1. d3 Nh6 2. Bxh6; which yields a material difference of +3 for White. With 5 plies available, White should instead aim to capture a black pawn and Black's queen, as in 1. d3 g5 2. Bxg5 e5 3. Bxd8. This would yield an advantage of 1 + 9 = 10 for White.
		

Crossrefs

Cf. A278830, A278831 (maximal / minimal number of possible moves at the n-th ply).

Programs

  • PARI
    /* For illustrative purpose only: yields correct values at least up to n = 6, but too slow for larger n; en-passant, castling and illegal moves (when king in check) are not handled correctly */ {A278832(n,B=concat([B=digits(211107889e8\9*10^32),-B[9..16],-B[1..8],1]),M=concat(vector(64,F,if( B[F]*B[65]>0,Vec(moveGen[abs(B[F])](B,F-1)),[]))))=vecmax(apply(if(n>1,m-> A278832(n-1,makeMove(B,m))-VALUE[VAL_OFFSET+B[m%64+1]], m->-VALUE[B[m%64+1]+VAL_OFFSET]),M))};
       makeMove(B,m)={B[m%64+1]=B[m\64+1];B[m\64+1]=0;B[65]*=-1;B};
       VALUE=[0,-9,-3,-3,-5,-1,0,1,5,3,3,9,0]; VAL_OFFSET=7;
       KING=setunion(ROOK=[-8,-1,1,8], BISHOP=[-9,-7,7,9]);
       moveGen=[pawn(B,F,s8=B[65]<<3,L=List(),F8=F%8,F65=F*65)={F8>0 && B[F+s8]*s8<0 && listput(L,s8-1+F65); F8<7 && B[F+s8+2]*s8<0 && listput(L,s8+1+F65); B[1+F+s8]==0 && listput(L,s8+F65) && F\8==6^(s8<0) && listput(L,s8<<1+F65); L},\
       rook(B,F,d=ROOK,L=List(),T)={ for(i=1,#d,T=F; while(T%8*2!=(d[i]+9)%8*7 && T\8*2!=(d[i]+9)\8*7 && B[1+T+=d[i]]*B[65]<=0,listput(L,T+64*F); B[1+T] && break));L}, knight(B,F)=king(B,F,[-17,-15,-10,-6,6,10,15,17]), bishop(B,F)=rook(B,F,BISHOP), queen(B,F)=rook(B,F,KING), king(B,F,d=KING,L=List(),T)={for(i=1,#d,(T=F+d[i])>=0 && T<64 && (d[i]+2)%8 + F%8 > 1 && (d[i]+2)%8 + F%8<10 && B[1+T]*B[65]<=0 && listput(L,T+64*F));L}]

Extensions

a(3)-a(4) corrected and a(7)-a(10) from François Labelle, Nov 29 2016

A278831 Minimal number of possible moves at the n-th ply of a chess game, excluding positions where no move is possible.

Original entry on oeis.org

20, 20, 19, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1
Offset: 1

Views

Author

M. F. Hasler, Nov 29 2016

Keywords

Comments

Given the 75-moves rule, any chess game, and thus this sequence, is finite.
The definition of this sequence excludes positions with no possible move, such as checkmate and stalemate positions, and other cases which would end the game, e.g., via draw by impossibility of checkmate, 5-fold repetition, or the 75-move rule.
Is there any further term different from 1? The first terms a(4), a(5), ... equal to 1 correspond to a specific configuration which can appear at ply 4 but as well one or a considerable number of moves later, see the Example section for details. After that, it is quite probable that other similar positions can be constructed in which again a(n) = 1. Towards the end of the longest possible game(s), one may expect very little material around, probably only the two kings plus one other material to avoid draw by impossibility of checkmate. It would require a deeper study of this context to prove or disprove that the penultimate position would always allow more than one move for the player(s). In any event, it seems quite out of reach to compute the exact index where this would occur. [Comment revised following comments by François Labelle and Rick L. Shepherd, Nov 30 2016]

Examples

			In the initial position of the chess game, each player has 20 possible moves (16 pawn moves and 4 knight moves), and the first (half-)move made by White does not affect the 20 possibilities Black will have thereafter.
At its second move, i.e., ply 3 of the game, White may have only 19 possible moves, if he started with either a2-a3 or f2-f3 or h2-h3 as first move.
If the first three half-moves are 1. e3, f6; 2. Qh5+, then Black has only one possible move, 2. ... g6, whence a(4) = 1.
Similarly, a(5) = 1 corresponds to the only possible move of White in the symmetric position (apart from one additional half-move made earlier by White).
A position with essentially the same configuration may occur one or more moves later, if the other earlier moves of both players do not change the relevant part of the configuration in a significant way. For example, if the game goes 2. a3 a6, before 3. Qh5+, or: 3. a3 a5, 4. Qh5+, or: 4. Ra2 Ra7, 5. Qh5+ etc. This leads to many subsequent terms a(6,7,8,9,...) = 1.
From a given number of half-moves on, it will also be possible to reach other configurations in which either player has only one possible move for similar reasons, and these configurations can usually also be "delayed" by several moves. This extends further the number of consecutive 1's in this sequence.
		

Crossrefs

Cf. A278830 (maximal number of possible moves at ply n), A278832 (maximal material difference at ply n).
Showing 1-2 of 2 results.