3

I'm trying to model the number of possible chess games after n plies.(perft results A048987): 1, 20, 400, 8902, 197281, 4865609, 119060324, 3195901860, 84998978956, 2439530234167, 69352859712417, 2097651003696806, 62854969236701747, 1981066775000396239, 61885021521585529237, 2015099950053364471960.

I expect this sequence to tend towards an upper asymptote. It starts off with an almost factorial growth which can be seen by the consecutive ratios, which (rounded off to 2 decimal places) are: 20, 20, 22.25, 22.16, 24.66, 24.47, 26.84, 26.6, 28.7, 28.43, 30.25, 29.96, 31.52, 31.24, 32.56. This is approximately $$x+20+\frac{\cos(\pi x)-1}{2}$$ and thus $$\prod_{x=0}^{n}(x+20+\frac{\cos(\pi x)-1}{2})$$ provides a good approximation for the first few terms of the sequence, although it does not tend towards an upper asymptote, and it already starts to deviate from the actual value in the last 3 terms. I'm looking to fit this data to a function, like the generalised logistic function, but one that starts off with an almost factorial growth, rather than an exponential one. What's the right model to use here?

  • 1
    How exactly is this sequence defined ? – Peter Jul 15 '21 at 11:03
  • 1
    A sufficiently precise definition would be: a(n) is the number of possible chess games after n plies. @Peter – Michael Smith Jul 15 '21 at 11:07
  • 1
    I already assumed this considering the first three entries. This is the kind of context you should add in the question. Maybe someone can , based on this description , already give a good estimate. – Peter Jul 15 '21 at 11:11
  • 1
    It is estimated that a legal position allows in average roughly $40$ different moves, so $40^n$ might be a good asymptotic formula. But consider that in practice the number of possible chess games is finite because of the fifty-move rule (and also because of the rule the a repitition of the same position (with the same player to move) three times , including the first occurence, is a draw). – Peter Jul 15 '21 at 11:53
  • 1
    To estimate the difficulty to solve chess, another number is far more important : The number of legal chess positions. This number is estimated to be roughly $10^{43}$ – Peter Jul 15 '21 at 11:54
  • @Peter $40^n$ doesn't really fit the data, even asymptotically. Maybe the upper asymptote is about $10^{43}$, i'll keep that in mind. – Michael Smith Jul 15 '21 at 11:58
  • 1
  • 2
    I think it is naive to look at the exact enumeration of the first 15 plies and try to extrapolate. One should consider the dynamics of a "random" chess game, and note that after enough steps, there are two competing processes: 1) the board becomes more "open", allowing more pieces to move, and 2) there are less pieces left on the board, so that there are less possible options. I think that a "reaction diffusion" model might be the right way to think about the problem. – user619894 Jul 15 '21 at 12:23
  • @user61984 Interesting idea. An approximation of the expected number of pieces left on the board after n plies should be useful. It could also allow the use of tablebase data. – Michael Smith Jul 15 '21 at 12:42
  • 1
    googling "reaction diffusion" + "chess" gave me this: https://arxiv.org/pdf/1103.3681.pdf – user619894 Jul 15 '21 at 12:49
  • 1
    The sequence is tabulated, with references to the literature, at https://oeis.org/A048987 – Gerry Myerson Jul 16 '21 at 06:57
  • 1
    Have you had a look at that link? Was it helpful? – Gerry Myerson Jul 17 '21 at 13:13
  • @GerryMyerson I have had a look at it, it was also the first comment by another user which he deleted. The oeis entry isn't updated, one more term has been confirmed. I didn't find much use in the links referenced on the page. – Michael Smith Jul 17 '21 at 17:16
  • 1
    "one more term has been confirmed" Was this published somewhere? Do you have a link? Also, depending on which rules you use for chess, there is an upper bound $N$ on the length of a game. Hence, the number of games after $n$ plies is zero, once $n>N$. So the sequence you are after eventually stops growing, starts decreasing, and crashes to zero, doesn't it? – Gerry Myerson Jul 18 '21 at 01:58
  • 1
    Searching for "perft results" on google, you're pointed to this chess programming wiki page https://www.chessprogramming.org/Perft_Results in which the 15th term of the sequence is stated as well as a referenced link, which is a years old post on a chess programming forum http://www.talkchess.com/forum3/viewtopic.php?t=64983. Do you mean the 50 move rule? Article 9.3 on FIDE's laws of chess. This sequence counts the number of unique positions reachable within n plies. It should tend towards an upper asymptote. The number of possible moves after n plies should tend to some small number ig. – Michael Smith Jul 19 '21 at 08:38
  • 1
    I don't know what "perft" means. Are you counting the number of positions reachable in exactly $n$ plies, or in $n$ or fewer plies? The number of possible moves after $n$ plies should be zero once $n$ is bigger than the maximum number of plies a game can go – once the game is over, no more moves are possible. https://wismuth.com/chess/longest-game.html https://chess.stackexchange.com/questions/4113/longest-chess-game-possible-maximum-moves Also, do you count two positions as different if, say, White still has the right to castle in one of them, but not in the other? – Gerry Myerson Jul 19 '21 at 13:42
  • In n or fewer plies, the sequence is cumulative. I do not think that the right to castle is enough to differentiate between two positions in this sequence., although I might be mistaken. @GerryMyerson – Michael Smith Jul 19 '21 at 14:06

0 Answers0