How many years is a trillion seconds ?
Over 31,000 years.
What is 1 petaflop ? It is one trillion operations per second.
Apparently the world's fastest supercomputers run at under 1000 petaflops.
If there are ten^36th positions to analyze - and the computer can 'solve' each one with a trillion operations - then that's 1000 positions 'solved' per second - you're looking at 10^33rd seconds.
That's 31,000 years multiplied by a billion trillion.
Want to make it 10^24th positions instead?
Then you've got 31,000 years multiplied by a billion.
Want to make it that the computer only needs a billion operations to 'solve' a position ?
Then you've still got 31 Billion Years !! ![]()
![]()
!!!
Chess will never be solved, here's why
My computer was behaving slightly strangely today, and I just realised I had left Leela Zero analysing 1. e4 a5 for six hours.
Anyhow after that time, the winning probability (for 2. d4) got nudged up from 63.8% to 64.2%. ![]()
The proof is
1) Black can draw against 1e4 and 1d4
2) It is always easier to draw against 1a4
3) Therefore black can draw against 1a4
Simples!
The argument is indeed simple, but not in the desired way!
Ah, but that would be a logically correct and valid argument, provided we add the premise that a draw is always possible, in any situation where obtaining a draw is easier than in any other situation where obtaining a draw is known to be always possible; which consolidates the meaning of "easier" in its normally acceptable sense.
It only remains that we prove (2) to be true, by bringing our argument into a fully circular and reiterative meaninglessness and providing a fourth premise, which could be something to the effect that inference is always true when all else fails: and the job's a good 'un.
My computer was behaving slightly strangely today, and I just realised I had left Leela Zero analysing 1. e4 a5 for six hours.
Anyhow after that time, the winning probability (for 2. d4) got nudged up from 63.8% to 64.2%.
Look at Leela in post #20 here https://www.chess.com/forum/view/general/chess-will-never-be-solved-heres-why?page=1
SF8-12 (I don't have SF13) also lost from the same drawing position at first attempt (SF14 took me to the 55 move rule) but none of them get themselves mated on h1 before reaching h3.
How can this be surprising? If Leela plays a million games against itself how many will finish up in a KNNKP ending?
Troitzky said of the White to win positions in the endgame that there were 20 different endgames depending on the position of the pawn. How many games that Leela plays will finish up in a KNNKP endgame with the pawn on a2 or h2?
So what's it going to "learn" about the endgame?
I've spent a completely deranged amount of time looking at this endgame and undoubtedly played thousands of White mates against Nalimov with the pawns in those positions. (Practically all KNNKP mates with rook's pawns finish up that way).
So I don't expect Leela to be a reasonable opponent in that particular endgame anytime soon.
On the other hand I did have a version of Rybka nearly 20 years ago running on slow kit that I couldn't have beaten from any drawn KNNKP position. (It had an "e" for "endgame" on the end of it's version number, meaning that it's evaluations were designed to play endgames well with no tablebase - I got the last version - Rybka can't now manage even a bishop and knight checkmate.)
The fact is that the positional evaluation function is a lot more important than the machine speed. Leela and AZ will presumably be good at that for positions near the start of the game, but always crap at positions with only a few men (usually called endgames, but all positions are endgames to a perfect player - the tag is only relevant to players with a limited look ahead).
#1227
"I did a simple calculation. I assumed a 60 move game with 5 reasonable variations at each ply, That would be 5 raised to the power of 120 permutations but obviously"
++ As pointed out you arrive at a number of positions higher than the number of legal and sensible chess positions, so your number is too high.
a) 60 moves is too much. In most human and engine games they reach a draw by repetition or a table base position before move 40.
b) It is not necessary to include alternatives for black moves as long as the candidate ideal game ends in a draw: that retroactively validates all black moves as good enough to draw.
c) 5 variations per white move are too much: as calculated above 4 suffice i.e. 3 validation passes to prove all moves of a candidate ideal game are optimal to achieve less than 1 error per the total number of relevant chess positions. Maybe 3 alternatives (Carlsen) or 2 alternatives suffice. 4 alternatives i.e. 3 verification passes is at the safe side.
"some moves can transpose to positions that could occur with a different move order"
++ That is correct and another reason why your count is too high. There are many, many transpositions i.e. different games that lead to the same position.
E.g. 1 e4 c5 2 Nf3 = 1 Nf3 c5 2 e4
"I'm not sure how to adjust for that"
++ If you assume that moves are interchangeable, then for p possibilities e.g. p = 4 and m moves e.g. m = 30 instead of
p^m
you would have
p^m / m!
where
m! = m * (m - 1) * ... * 3 * 2 * 1
That however is still not the right approach.
The right approach is to split the problem in two.
1) How long does it take to strongly or weakly solve chess?
2) How to do it?
1A) To strongly solve chess i.e. a 32-men table base: 10^36 positions, that is unfeasible
1B) To weakly solve chess i.e. provide an ideal game with proof the moves are optimal:
sqrt (10^36) * 50 / 500 positions, that is feasible in 5 years
2A) Let Stockfish play against itself at 60 h / move, verify it ends in a table base draw or a repetition of moves, this gives a candidate ideal game
2B) All black moves are good enough to draw, so can be considered optimal and need no takeback.
To prove all white moves are optimal: take back all white moves starting at the last one and replace them by the 2nd choice. This is the 1st verification pass.
Now a 2nd verification pass, now a 3rd verification pass. As calculated above 3 verification passes suffice to make less than 1 error over the number of legal and sensible chess positions.
@tygxc @1227
++ If you assume that moves are interchangeable, then for p possibilities e.g. p = 4 and m moves e.g. m = 30 instead of
p^m
you would have
p^m / m!>>>
Thanks, I can see the sense in something like that but will have to wait until my head's clear to even think of trying to verify it from first principles. I can ask the fabled son; but he seems to be busier than ever, assembling teams of programmers in the USA to work on AI projects. He has less time and the fact that he and his wife told us this week that Emilia is expecting means he'll have more on his mind, too. But when they're visiting here in two weeks may be the best time. He was always interested in chess programming.
I seem to remember from my school days when I was 14 .... something called, I think, Stirling's formula, which gives a close approximation to the added factorial.
#1242
Yes, Stirling's Formula approximates the factorial or more generally the Gamma Function.
m! is the number of permutations of m objects, in this case m moves assumed interchangeable.
For example there are 52! ways to shuffle a deck of 52 cards, that is 8*10^67.
That is way more than there a chess positions...
#1242
Yes, Stirling's Formula approximates the factorial or more generally the Gamma Function.
m! is the number of permutations of m objects, in this case m moves assumed interchangeable.
For example there are 52! ways to shuffle a deck of 52 cards, that is 8*10^67.
That is way more than there a chess positions...
Again - now you're talking !
The world will probably never see all of those shufflings.
Nor even a small percentage of them.
But in the case of cards - there's 52 identities. And 52 positions.
There is no division there to be done.
One of the reasons - the suitings of the cards make repetitions impossible.
With chess - there's only 13 identities although up to 64 positions.
Division can be done for the purpose of compacting the expressions in a more manageable form.
Such as for example - a number to express the number of ways of having 32 squares empty. Which will always be the case in chess.
The factorials will always have an integer value.
And the bottom factorial will always potentially divide into the numerator to produce an integer result. It 'cancels' as it were.
But - no need to do that till its time to present all results in powers of ten. Many of the expressions are constants.
They could be presented algebraically with letter codes.
Factorial division could or would occur in presenting the number of ways for x pawns of one color to be present on 48 squares.
#1242
Yes, Stirling's Formula approximates the factorial or more generally the Gamma Function.
m! is the number of permutations of m objects, in this case m moves assumed interchangeable.
For example there are 52! ways to shuffle a deck of 52 cards, that is 8*10^67.
That is way more than there a chess positions...
"Instrinctively", I think that dividing by the factorial is incorrect. I may well be wrong about that and will try to look into it over the nex month or two, and try to give myself a greater understanding of the numbers involved.
#1245
As I said before dividing by the factorial would only be correct if the moves were interchangeable but they are not always.
Example:
1 e4 e5 2 Nf3 Nc6 3 Bb5 Nf6
This can also be reached with 1 Nf3 Nc6 2 e4 e5 or 1 e4 Nc6 2 Nf3 e5 or 1 e4 e5 2 Nf3 Nf6 3 Bb5 Nc6 or 1 e4 Nf6 2 Nf3 e5 3 Bb5 Nc6 or 1 Nf3 Nf6 2 Nc3 Nc6 3 e4 e5 4 Bb5 Nb8 5 Nb1 Nc6 or 1 e3 e6 2 Nf3 Nc6 3 e4 e5 4 Bb5 Nf6 and much much more ways, however, Bb5 can never happen before e4 or e3.
The right approach is not to think of games, but only of positions.
The game of chess unlike e.g. checkers has much, much more transpositions: different games reaching the same position.
The reason is that it would mean that the first move would have one possibility of transposing to a similar position after two moves for each side for each side. That increases exponentially as the number of moves increases but there are many moves that are irreversible and many other moves that can be made which prevent transpositions by other moves. For instance, pawn and piece moves can't often be interchanged and also, many positions can only be reached by a process which is severely limited in its possible transposition. Dividing by the factorial translates into dividing by the remaining number of moves in the game, each time the power of the "reasonable moves factor" increases by one. Now I come to think about it, ten minutes later, I think that's incorrect and reduces the number of possible, reasonable games by far too much.
However ten minutes' reflection isn't a month or two and I'll continue to try to educate myself on the subject.
From #1245
"As I said before dividing by the factorial would only be correct if the moves were interchangeable but they are not always."
No. Factorial division would occur in the ways of having 32 or more squares empty.
It would also occur in the instance of number of ways to arrange x number of pawns of one color on 48 squares.
Regarding factorials and permutations regarding moves to be made or possible games - there's no improvement there - the number of potential chess games is much bigger than the number of ways 52 cards can be arranged in a deck.
The right approach is not to think of games, but only of positions.
I've seen that before and would want to verify it independently, same as before. I've taken such projects on board before now and they've taken as much as 30 years or more. I usually attempt to verify everything for myself because there are many instances in "theory" where the experts are incorrect. For instance, the Big Bang (that was to annoy Elroch). It's "nearly right" but not correct.
Is there any hope at all of computers 'solving chess' from the openings end of the game ? Would the chances of same be worse than from the endgame end?
Apparently the chances would be even Worse.
But - we don't have to dismiss that.
Consider that even cheap chess software - running on modest desktop/laptop/phone hardware - can and does find mates many moves ahead.
Anytime such a computer can find a forced checkmate for itself whatever number of moves ahead - we can consider that postion and all the possible positions between that and that checkmate - as 'solved'.
(side issue - could computers be programmed to find all positions that are checkmate or stalemate- and secondary to that - all such positions that could arise legally?)
A very famous player named Lasker stated in his 'Manual of Chess' that 'ceteris paribus' the plus of a rook is sufficient to win.
Regarding ceteris paribus - I don't like the term and would prefer to put it as - if the side winning the rook is already at equal or better material and evaluates the rook-up position as having insufficient compensation for the other side (which the computer could evaluate as if it was a starting position - having skipped the positions where it doesn't win the rook) -
then can such a position and the positions leading to the plus of the rook be regarded as 'solved' ?
It seems a reasonable jump.
By extension - all positions leading to a Queen up - or two minor pieces up could also be regarded as 'solved' in similiar circumstances.
and all of the positions 'en route' that are in between.
What about a minor piece up plus a pawn or two up ?
Much harder. As would be three pawns up or whatever.
Maybe there's plays for the other side to knock off the extra pawns.
But would such mate-findings and material winnings positions offer any hope of 'solving' the game?
The point is that computers find such positions a lot.
They even announce 'mate in -'.
What percentage of positions could this take care of?
In the case of supercomputers ... how many moves ahead can they announce 'mate in' ?