Decryption Might Work For Chess

Discussion of anything and everything relating to chess playing software and machines.

Moderator: Ras

User avatar
towforce
Posts: 12491
Joined: Thu Mar 09, 2006 12:57 am
Location: Birmingham UK
Full name: Graham Laight

Re: Decryption Might Work For Chess

Post by towforce »

jtwright wrote: Wed Aug 31, 2022 3:43 am
Obviously I cannot yet prove it, but I've taken a good high-level look at chess, and to me it looks very likely that chess has relatively simple underlying patterns which will enable quick and "reasonably accurate" evaluation (I'm not yet willing to say "completely accurate", but I'm VERY far from convinced that this would be impossible).
Even in the existing tablebases there are some mate sequences that are just incomprehensible to human and (non-TB) engine alike...

If I'm correct (and I sincerely believes that the evidence supports me in saying that relatively simple and "really good" algorithms for chess are likely to exist), then such positions could be like gold dust in terms of helping to find them.

We know that:

1. On switching from hand coded evaluations (HCEs) to nets, programs get a jump in elo despite the loss of depth due to nets being slower than HCEs

2. Therefore there's more to chess than HCE programmers know. They've clearly missed something! :)

3. GMs cannot explain everything they know (therefore probably aren't consciously aware of everything they know)

A simple but "really good" chess algorithm would certainly fall into the category of "things we don't know": tablebase sequences we cannot understand would also fall into that category, so they would be especially useful in finding unknown, but very useful, underlying chess patterns.
Human chess is partly about tactics and strategy, but mostly about memory
DrCliche
Posts: 65
Joined: Sun Aug 19, 2018 10:57 pm
Full name: Nickolas Reynolds

Re: Decryption Might Work For Chess

Post by DrCliche »

Chess can't be solved in the way that you're hoping. Rubik-type twisty puzzles aren't comparable for a number of reasons:
  • The state space of Chess is at least ~30 orders of magnitude larger than that of a typical twisty puzzle.
  • Twisty puzzles have strict symmetries, and thus submit to group theory.
Efficient and/or perfect algorithms for twisty puzzles work by exploiting their group structure. Chess game trees (indeed, most game trees) have no such structure, not even approximately. The evaluation of a chess position need not have any structured relationship with that of nearby or otherwise related chess positions, and often (usually?) it explicitly doesn't.

The fact that you can record sequences of chess moves and sequences of puzzles moves in the same type of general object (a directed graph) is really neither here nor there. It doesn't give you any sort of foothold in applying one domain's insights into another. It's the internal structure (i.e. symmetries and patterns of nodes and links) that matters, not the mere fact that something can be represented by a directed graph.
User avatar
towforce
Posts: 12491
Joined: Thu Mar 09, 2006 12:57 am
Location: Birmingham UK
Full name: Graham Laight

Re: Decryption Might Work For Chess

Post by towforce »

DrCliche wrote: Thu Sep 01, 2022 1:49 am Chess can't be solved in the way that you're hoping. Rubik-type twisty puzzles aren't comparable for a number of reasons:
  • The state space of Chess is at least ~30 orders of magnitude larger than that of a typical twisty puzzle.
  • Twisty puzzles have strict symmetries, and thus submit to group theory.
Efficient and/or perfect algorithms for twisty puzzles work by exploiting their group structure. Chess game trees (indeed, most game trees) have no such structure, not even approximately. The evaluation of a chess position need not have any structured relationship with that of nearby or otherwise related chess positions, and often (usually?) it explicitly doesn't.

The fact that you can record sequences of chess moves and sequences of puzzles moves in the same type of general object (a directed graph) is really neither here nor there. It doesn't give you any sort of foothold in applying one domain's insights into another. It's the internal structure (i.e. symmetries and patterns of nodes and links) that matters, not the mere fact that something can be represented by a directed graph.

I was directly quoting the Wiki article about "God's Algorithm". To be fair, though, the 3 puzzles in my quoted text (Rubik's cube, Towers Of Hannoi, 15 Puzzle) all have two characteristics that chess doesn't:

1. the number of pieces remains the same

2. they don't have opponents making moves between one's own moves

However, IMO you've missed the main point I was making: just over 40 years ago, the Rubik's Cube was the #1 toy in the world. Books about how to solve it were flying off the shelves. My cousin taught me how to solve it using move sequences that swapped edges or corners. I have no recollection whatsoever of anyone at that time saying that in the not-too-distant-future, cheap computers would be able to solve it from any position in 20 face turns or less.

Nobody knew that it could be solved in 20 moves or fewer. Even if they did, the search tree size would be 18^20 = 1.3e25, which was (still is) too big. Strongly solving it seemed to be out of reach.

Now, if you want an optimal solution from a given position, you download an app on a cheap phone, and you'll be given it.

To me, your perspective looks similar to that of the Rubik's Cube solver from 40 years ago. To me, it seems obvious that quick and "very good" chess algorithms exist - it's just a question of how good they can be and how to find them. I of course accept the possibility that I might be wrong.
Human chess is partly about tactics and strategy, but mostly about memory
User avatar
towforce
Posts: 12491
Joined: Thu Mar 09, 2006 12:57 am
Location: Birmingham UK
Full name: Graham Laight

Re: Decryption Might Work For Chess

Post by towforce »

towforce wrote: Mon Aug 29, 2022 6:37 pmFrom the second article (link to exact section):
Wikipedia wrote:Well-known puzzles fitting this description are mechanical puzzles like Rubik's Cube, Towers of Hanoi, and the 15 puzzle. The one-person game of peg solitaire is also covered, as well as many logic puzzles, such as the missionaries and cannibals problem. These have in common that they can be modeled mathematically as a directed graph, in which the configurations are the vertices, and the moves the arcs.

Well chess certainly meets that criteria! 8-)
If chess is a win, this would be very far from a God algorithm per your link - but it would be a good step in the right direction!

The three puzzles mentioned have no opponents making moves, which is different from chess - so although chess meets the criteria of "they can be modeled mathematically as a directed graph, in which the configurations are the vertices, and the moves the arcs" it can't be treated the same way as those 3 puzzles. They probably intended to mean "a directed graph on which all the moves are under the user's control".
Human chess is partly about tactics and strategy, but mostly about memory
DrCliche
Posts: 65
Joined: Sun Aug 19, 2018 10:57 pm
Full name: Nickolas Reynolds

Re: Decryption Might Work For Chess

Post by DrCliche »

Your historical understanding is quite incorrect. A general method for finding solutions to any and all sorts of permutation puzzles was already known long before Erno Rubik ever conceived of his cube. Indeed, anyone with a basic grasp of commutators can derive a complete solution for any such puzzle with just a little bit of trial and error.

After the Rubik's Cube was released internationally in 1980 — and became an overnight sensation in much of the world — interested mathematicians almost immediately began to apply more powerful (and well known) group theoretic tools to it specifically, at least partially motivated by the desire to find more efficient solutions. The first algorithm based on those efforts had already been published by the end of 1980, and was written about in magazines in 1981.

In practice, efficient group theoretic algorithms rely heavily on large computer generated tables enumerating transitions between different families of positions. Finding a solution involves classifying a given position, looking up how to move from it to a more restricted family of positions, and then to a still more restricted family of positions, etc., until the cube is ultimately solved.

If you'd asked any of those interested mathematicians and computer scientists at the time if they thought increases in computing power would allow them to improve their algorithms, they would have said, "Obviously!" If you'd asked any of them if they thought Moore's Law would one day make God's Algorithm a reality, they would have said, "Almost certainly!"

Interestingly, practical implementations of God's Algorithm don't actually use group theory. While they similarly subdivide the Rubik's Cube's configuration space, it's generally not done in a group theoretic way. Depending on which method of subdivision is chosen, tens to thousands of megabytes of tables are calculated, in order to create an "admissible" heuristic for the distance from the target position. (If you later want to target a different position, i.e. other than the traditionally solved cube, you have to recalculate these tables!) IDA* can then be used to find and prove optimal solutions. IDA* itself was first described by Richard Korf in 1985, though it wasn't (publicly) applied to the Rubik's Cube until the late 90's, again by Richard Korf. If I had to guess, the decade-plus gap was simply due to lack of computing power.

I have absolutely no doubt that if you'd asked Richard Korf in 1985 whether IDA* could be applied to the Rubik's Cube, and whether Moore's Law would allow it to be a practical God's Algorithm within his lifetime, he would have said, "Absolutely!"

Incidentally, you're also mistaken about the ease of computing an optimal solution. Even on modern desktops, some positions require hours to weeks of computation (depending on the size of the pre-generated tables available), though a random position typically requires seconds to minutes. "Instant" solvers all use group theoretic methods, aren't provably optimal, and almost never find optimal solutions in practice. (Good instant solvers still often find solutions of 20 or fewer moves, however. 20 is the diameter of the Rubik's Cube's Cayley graph, so that's pretty impressive!)

Anyway, I mean you no disrespect, but, your "sincere belief" and "good high-level look" at chess notwithstanding, you seem to be misinformed as to many basic facts, and to have a number of fundamental misapprehensions that contradict decades of firmly established research and the broad consensus of essentially all subject matter experts. You don't have a reasonable basis for any sort of intuition. In this instance you should do more than merely accept the possibility that you might be wrong. You are wrong, categorically.

The key facts about chess are:
  • Its state space is vast enough that Moore's Law will be halted by physics long before brute force becomes viable.
  • Its game tree lacks sufficient structure to be meaningfully simplified.
  • Which means it can't have an admissible heuristic evaluation function with significantly less entropy than the game tree itself.
  • There's an unimaginably vast, practical, and conceptual gulf between finding the shortest path between two given nodes (i.e. solving a Rubik's Cube), and proving that all possible opponent responses lie on paths that can be forced to a particular terminal evaluation (what you need to do to solve Chess.)
With respect to that last bullet, consider the difference between the following two tasks:
  • Find the provably shortest sequence of roads leading from your current location to Rome. This is a relatively simple task. It has an obvious admissible heuristic and readily submits to dynamic programming.
  • Prove that all roads lead to Rome. This is obviously intractable. There obviously can't be a low-entropy admissible heuristic, as there's absolutely nothing preventing any given road from terminating before it connects with a Romeward network. You just have to examine each and every road.
User avatar
towforce
Posts: 12491
Joined: Thu Mar 09, 2006 12:57 am
Location: Birmingham UK
Full name: Graham Laight

Re: Decryption Might Work For Chess

Post by towforce »

DrCliche wrote: Thu Sep 01, 2022 4:27 pm Your historical understanding is quite incorrect. A general method for finding solutions to any and all sorts of permutation puzzles was already known long before Erno Rubik ever conceived of his cube. Indeed, anyone with a basic grasp of commutators can derive a complete solution for any such puzzle with just a little bit of trial and error.

After the Rubik's Cube was released internationally in 1980 — and became an overnight sensation in much of the world — interested mathematicians almost immediately began to apply more powerful (and well known) group theoretic tools to it specifically, at least partially motivated by the desire to find more efficient solutions. The first algorithm based on those efforts had already been published by the end of 1980, and was written about in magazines in 1981.

In practice, efficient group theoretic algorithms rely heavily on large computer generated tables enumerating transitions between different families of positions. Finding a solution involves classifying a given position, looking up how to move from it to a more restricted family of positions, and then to a still more restricted family of positions, etc., until the cube is ultimately solved.

If you'd asked any of those interested mathematicians and computer scientists at the time if they thought increases in computing power would allow them to improve their algorithms, they would have said, "Obviously!" If you'd asked any of them if they thought Moore's Law would one day make God's Algorithm a reality, they would have said, "Almost certainly!"

Interestingly, practical implementations of God's Algorithm don't actually use group theory. While they similarly subdivide the Rubik's Cube's configuration space, it's generally not done in a group theoretic way. Depending on which method of subdivision is chosen, tens to thousands of megabytes of tables are calculated, in order to create an "admissible" heuristic for the distance from the target position. (If you later want to target a different position, i.e. other than the traditionally solved cube, you have to recalculate these tables!) IDA* can then be used to find and prove optimal solutions. IDA* itself was first described by Richard Korf in 1985, though it wasn't (publicly) applied to the Rubik's Cube until the late 90's, again by Richard Korf. If I had to guess, the decade-plus gap was simply due to lack of computing power.

I have absolutely no doubt that if you'd asked Richard Korf in 1985 whether IDA* could be applied to the Rubik's Cube, and whether Moore's Law would allow it to be a practical God's Algorithm within his lifetime, he would have said, "Absolutely!"

Incidentally, you're also mistaken about the ease of computing an optimal solution. Even on modern desktops, some positions require hours to weeks of computation (depending on the size of the pre-generated tables available), though a random position typically requires seconds to minutes. "Instant" solvers all use group theoretic methods, aren't provably optimal, and almost never find optimal solutions in practice. (Good instant solvers still often find solutions of 20 or fewer moves, however. 20 is the diameter of the Rubik's Cube's Cayley graph, so that's pretty impressive!)
Thank you for that very interesting information about solving a Rubik Cube. I'm sure most people interested in computer chess will have enjoyed it as much as I did. Kudos where it is due! 8-)

Anyway, I mean you no disrespect, but, your "sincere belief" and "good high-level look" at chess notwithstanding, you seem to be misinformed as to many basic facts, and to have a number of fundamental misapprehensions that contradict decades of firmly established research and the broad consensus of essentially all subject matter experts. You don't have a reasonable basis for any sort of intuition. In this instance you should do more than merely accept the possibility that you might be wrong. You are wrong, categorically.

The key facts about chess are:
  • Its state space is vast enough that Moore's Law will be halted by physics long before brute force becomes viable.
  • Its game tree lacks sufficient structure to be meaningfully simplified.
  • Which means it can't have an admissible heuristic evaluation function with significantly less entropy than the game tree itself.
  • There's an unimaginably vast, practical, and conceptual gulf between finding the shortest path between two given nodes (i.e. solving a Rubik's Cube), and proving that all possible opponent responses lie on paths that can be forced to a particular terminal evaluation (what you need to do to solve Chess.)
With respect to that last bullet, consider the difference between the following two tasks:
  • Find the provably shortest sequence of roads leading from your current location to Rome. This is a relatively simple task. It has an obvious admissible heuristic and readily submits to dynamic programming.
  • Prove that all roads lead to Rome. This is obviously intractable. There obviously can't be a low-entropy admissible heuristic, as there's absolutely nothing preventing any given road from terminating before it connects with a Romeward network. You just have to examine each and every road.
The solution for the shortest path problem for an unweighted graph is a breadth first search (link). Per the linked wiki article, there are other variations of the shortest path problem (the "shortest distance", as opposed to the "shortest sequence" that you asked for, would be a weighted graph), and other algorithms. My quick intuition is that, in a significant number of cases, the "shortest path to Rome" problem would take more CPU cycles than the "all roads lead to Rome" (= all vertices on the given graph belong to a single connected graph) problem - but I'm not going to dwell on that. Instead, I'm going back to chess! Firstly, a quick look at your points:

* Its state space is vast enough that Moore's Law will be halted by physics long before brute force becomes viable

Agreed.


* Its game tree lacks sufficient structure to be meaningfully simplified

I'm not 100% sure about this - though I agree that it would be a lot more difficult to simplify than Towers Of Hanoi or the 15 puzzle. However, there are cases where simplifying patterns have been found for patterns which were more complex than chess.


* Which means it can't have an admissible heuristic evaluation function with significantly less entropy than the game tree itself

I'm struggling with this one. At the risk of accidentally making a straw man argument, it looks as though you're saying that a complicated game cannot have a simple best strategy.


* There's an unimaginably vast, practical, and conceptual gulf between finding the shortest path between two given nodes (i.e. solving a Rubik's Cube), and proving that all possible opponent responses lie on paths that can be forced to a particular terminal evaluation (what you need to do to solve Chess.)

I agree with the basic point that solving chess is more difficult than solving Rubik's Cube. However, two player games can be solved without building out the whole game tree. Here's what I envisage:

* find/build a relatively simple function that takes most chess positions and evaluates them with "good enough" accuracy

* keep improving it

* work out what this algorithm is doing in human understandable terms

* work out what this is telling us about the game of chess that we have missed

* use this knowledge to work out what the solution to chess is

btw - thank you very much for your thoughtful engagement in this thread. If I am wrong, I'd rather know sooner than later. A well qualified academic claimed in the 1990s that in the stock market, his program could categorise market participants by strategy, and work out how many were using each strategy (I'm not making this up): I believed him for a long time, then I tried to build such a system myself. I was quickly able to prove that it's not possible to do what he was claiming (roughly speaking, there are too many variables for the available information - like trying to solve a simultaneous equation with 6 variables with only 5 equations).
Human chess is partly about tactics and strategy, but mostly about memory