Will computers ever solve chess?

Sort:
Avatar of game_designer

To answer my own question.

 

You reflect the position about the vertical (files) axis.

 

The easiest way to think about this is that the pieces flip sideways.

 

Every square has a mirror image, d4 with e4, a1 with h1, a8 with h8, etc etc.

 

You then only use half the board for the white king for files A + B + C + D.

 

You have 2 sets of bit boards in the code, normal bit boards and reflected bit boards.

 

If the king is on A1 and it moves to A2 you update the normal bit boards just like with chess.

 

However you also do the reflected bit boards but the white king moves from H1 to H2 on the mirror.

 

Note that the reflected bit boards are only used for graphical display to show the position to the player if the king is on file E, F, G or H.

 

The reflected bit boards are not stored in a database and are not used by the game engine.

 

Note that refection applies to every possible position on the board, not just the starting position.

 

So you no longer have to store in a database or use in code for "as many atoms in the universe".

 

Now you only have "half as many atoms in the universe". wink.png

 

But I got a few more tricks. wink.png

 

The positions below are from Final Wars but it applies to Chess and Fischer Random as well.

 

The first is the actual game, this is what the player sees, note that the white king is on the "reflected" side. Note that this position is not stored in a database or used by the game engine.

 

The second is what is going on behind the scenes, it looks like only the kings and queens have changed positions but in reality every piece and pawn has mirrored (changed places). This is what is stored in the database and used by the game engine.

 

Note that castling short for Chess and Fischer Random would be to the left, but this is behind the scenes, the player would see it as normal. You need a flag in the code to tell it if the position is reflected or not.

 

Final Wars is a bit different, it has symmetrical king transfers due to the random setup.

 

This all might sound like a lot but it is not, all it is is one more set of bit boards in code and a bit of code, in return you eliminate virtually 50% of all the possible chess positions in one go and you reduce the database storage for all those positions as well.

 

How can you possibly solve chess if you do not have the data to solve the problem?

 

Players View

Program View (Database and Engine)

Avatar of SmyslovFan
StupidGM wrote:

The game is being solved through tablebases, and as more pieces are added, it will get easier, esspecially when it begins encroaching on known openings.

For all practical purposes, chess is already solved.  Stockfish 8 has practically solved the game for any human who knows how to "listen" to the engine.  That's a video game skill, btw. 

 

This is wrong on many levels, but to start with, it's wrong that Stockfish has already solved the game. It lost 8 games out of 100 against Komodo in the last World Computer Championship. That ain't solved. It's getting closer to being solved, but it ain't there yet.

Avatar of game_designer

@s23bog

 

Final Wars does have perfect reflection.

 

If you look at the last 4 posts on page 4 of this link you will see that, note that the king transfers are symmetrical so reflection even applies to the opening stages of the game.

 

https://www.chess.com/forum/view/chess960-chess-variants/final-wars-2

 

Fischer random also has perfect reflection in the starting setups but the castling is lop sided so there will not be much of a saving until the late middle game or early end game.

 

Chess same story due to castling, from late middle game the savings will increase significantly.

 

How do you reduce the data even more? It is not practical and probably not even possible to store every calculated position due to the huge numbers involved.

 

How many of those calculated positions will never occur in a practical game or in engine analysis and are in effect just redundant data.

 

The solution is quite simple, you work with a subset of the data not all of the data.

 

Say you start with all strong grandmaster games for all serious classical tournaments played starting from the last century, starting from the year 1901.

 

You load all those games into the database and store the bit boards for all positions to facilitate data analysis of all positions just like the chess engines do.

 

You assume that the grandmasters are seeking optimal play.

 

You assume that the chess engines are seeking optimal play.

 

Optimal play eliminates a huge chunk of the total positions that are possible in chess.

 

You now have a database that is workable and can be used by humans and engines as a point of reference.

 

These engines analyse each grandmaster position and the positions that they create, based on optimal play, are also added to the database.

 

Changes to the engine code can be compared to the database to see the effect of those changes.

 

Humans can analyse all the data in the database to figure out what changes could be made to the engines to improve them.

 

At least you now have a solid basis for analysis, not just engine variations that are only stored in short term memory when the engine is working.

 

Here is a simple example of a position that can occur in theory but will probably not occur in grandmaster practice or in engine analysis and so would never be stored in the database.

Avatar of game_designer

No man, just moves that make no sense or lose.

 

The grandmasters or engines decide what moves are optimal so they are included.

 

Moves or lines that lose or draw when you have a better position, like a move that drops a piece or makes you lose by mate are just discarded because they make no sense in the position.

 

So it's just like when you play a game, most moves you quickly discard or don't even consider.

 

I also said that only strong grandmaster games would be included, no need to store or calculate all the atoms in the universe.

 

Would you play Qh7+ in this position? No because it is not an optimal move.

Avatar of Elroch

On my machine Stockfish virtually instantly sees it as a draw using either 2 or 4 cores, and never wavers from its assessment. How on Earth did you manage to get a different assessment, s23bog?

[To be more precise, the only wavering is when its line is 21 moves head, after 0.03 seconds, when it briefly thinks black is winning, then corrects itself at 1.25 seconds looking 25 moves ahead].

Avatar of SmyslovFan

Yup, let's continue to handicap computers as much as possible, then laugh at them for getting it wrong.

GIGO.

Avatar of SmyslovFan

Don't forget, it wasn't humans who worked out the various tablebases.

Avatar of SmyslovFan

You are drawing conclusions from your own laziness.

 

As I said, GIGO.

Avatar of Billkingplayschess
intermediatedinoz wrote:

life is a circus ring, with some moments more spectacular than others

Bread and circuses

Avatar of Phantomspy
Destroyer_Mark_1420 wrote:
I think yes. Computers have progressed with an average of about 100 points in the last 10 years. They will solve chess chess on day, IF it can be solved. Maybe it can't be solved. But if it can, the computers will one day figure it out. Maybe 30-50 years.

This is just wrong. Chess is possible to solve but i doubt computers will ever solve it because that would mean it would always draw against itselfI

Avatar of game_designer

Have not the grandmasters been trying to solve chess for more than a century?

 

This is why I said that this should be the starting point, these games represent countless hours of study both OTB and at home to find the best (optimal) moves in many different positions.

 

I am aware that the grandmaster title was only created from the middle of the last century, for games from 1901 the best players in the world are considered to be grandmasters even though the title did not officially exist.

 

I did mention before that the online engine is not very good, it is stockfish that has been ported over from C++ code to JavaScript code, In JavaScript there is no integer data type all numbers are only treated as a double (a floating point number with a decimal point).

 

The online engine does not use endgame tablebases and if it does use an opening book then it is probably just very simple and basic (a few main openings inserted as text directly into the code).

 

In the diagram below click the little icon bottom left corner then click the little icon top right corner when it appears to see the online engine on the analysis board.

 

The move Qh7+ is not simply discarded as you said, it still may be considered by the engine when calculating but it is not stored in the database because it is not one of the optimal moves in the position.

 

The position after Qxb7 is stored in the database because that is the best move in the position.

 

Put a Black Queen on h7 in the starting position and it's a completely different story, the engine may decide to play Qxh7+ but that is not the same move as Qh7+ but it does create the same position and so that original position (after Qh7+) would now be stored but it was reached by transposition. (after Qxh7+)

 

Here is my example from the previous page but now showing the engine analysis with Qxb7

Avatar of vickalan
UtrechtRose wrote:
 Maybe it will turn out to be like many martial arts where, at the highest levels, whoever moves first loses.

 

I like that example. Some other combinatorial games like Chopsticks, and some version of Nim are also a win for the second player.

 

There is also the Mexican standoff, where if any one party proceeds or retreats, everyone loses.

 

The martial arts case is a good example for a real sport.happy.png

Avatar of LilyPup

Yes? I am playing me vrs computer, so maybe there will be a computer playing chess.

Avatar of game_designer
UtrechtRose wrote: 

"If a Quantum computer ever "solves" chess it might turn out that a perfectly played game is neither a draw, nor a win for white."

 

So we wait for a real quantum computer to be invented, then we solve chess, sounds like a good idea.

 

I got a better idea, I invent time travel, visit the future, see how they did it, come back and post on the forum to prove what a smart alec I am.

 

Go read about quantum computing on the internet, it is mainly suited for problems that deal with a range of probabilities, chess however is concerned with concrete calculation.

 

To all the "experts" and "geniuses" here is your chance to prove to everybody how smart you think you are, start talking about using something that you do not fully understand (quantum computers) to solve something that you do not fully understand (solving chess).

 

And all the while not one simple practical solution is suggested, just people trying to stroke their own egos. 

Avatar of ProfessorPownall

1. e4 and White is in the throes of defeat.

Avatar of DiogenesDue
game_designer wrote:
UtrechtRose wrote: 

"If a Quantum computer ever "solves" chess it might turn out that a perfectly played game is neither a draw, nor a win for white."

 

So we wait for a real quantum computer to be invented, then we solve chess, sounds like a good idea.

 

I got a better idea, I invent time travel, visit the future, see how they did it, come back and post on the forum to prove what a smart alec I am.

 

Go read about quantum computing on the internet, it is mainly suited for problems that deal with a range of probabilities, chess however is concerned with concrete calculation.

 

To all the "experts" and "geniuses" here is your chance to prove to everybody how smart you think you are, start talking about using something that you do not fully understand (quantum computers) to solve something that you do not fully understand (solving chess).

 

And all the while not one simple practical solution is suggested, just people trying to stroke their own egos. 

 A blacker pot has never never existed wink.png.  Kettles beware.

Avatar of game_designer

Not if you can actually do it man, or at least point the ship in the right direction.

Avatar of GM_chess_player

Yes.

Avatar of JuergenWerner
"Will computers ever solve chess?"


No!
Avatar of SmyslovFan

The chess ignorance on display in this thread is staggering.

 

Any chess player with a bit of experience knows that while there are positions where having the advantage of the first move is not really an advantage, there's no way that the starting position could possibly be zugzwang.

 

As for a searchable database, they already exist.