Analysing a chess game at different positions

495 views

How do the engines and the players say if a side is winning or not? What are the key factors they consider while assigning a score to each side?

In: 0

18 Answers

Anonymous 0 Comments

A full answer to this question is pretty complicated. But two simple factors are:

* Material: who has more and stronger pieces on the board? A typical weighting system is pawn = 1, knight/bishop = 3, usually with the bishop weighted slightly more, rook = 5, and queen = 9, though this can vary. If I’ve traded one of my rooks for two of your knights, I am at a slight advantage: I’ve captured 6 points to your 5.

* Tempo: whose pieces are in a position to be more active? For example, a queen or bishop near the center of the board has more freedom of movement than one near the edge. A rook that is out in the open has more freedom than one walled behind pawns.

Anonymous 0 Comments

It depends, some computers can know things like “bishops that have long unobstructed paths in multiple directions and exist on the same coloured square as the king are valuable” and assign value to pieces based on meta analysis of game position based on a certain amount of data it has. They can advance the position several moves forward and use that analysis to focus on certain lines. For example the computer won’t deeply analyse the line of black opening h6/a6 pawn move because it has the data that it’s a bad move. The more powerful this type of computer is the farther along it can develop more lines (this is also why you sometimes see the evaluation bar randomly move as a very strange line that at first based on the rules the computer uses to prioritise lines it analyses is actually really strong).
The number is supposed to be pawns worth of value (1 for a pawn, 3 for a bishop etc). It’s not strictly material as positionally one can be ahead and the weighting that positioning can vary a little bit across analysis programs with the same position depending on the depth they analyse to (a 20 move deep analysis might see greater value in a piece than a 10 move deep)

They get stronger the larger the dataset they have is so that they can know what good positions look like so they prefer those. That’s how most analysis computers will work, as far as the super computers that far outstrip the masters go, they’re literally playing out millions of games to make their positions.

Anonymous 0 Comments

It depends, some computers can know things like “bishops that have long unobstructed paths in multiple directions and exist on the same coloured square as the king are valuable” and assign value to pieces based on meta analysis of game position based on a certain amount of data it has. They can advance the position several moves forward and use that analysis to focus on certain lines. For example the computer won’t deeply analyse the line of black opening h6/a6 pawn move because it has the data that it’s a bad move. The more powerful this type of computer is the farther along it can develop more lines (this is also why you sometimes see the evaluation bar randomly move as a very strange line that at first based on the rules the computer uses to prioritise lines it analyses is actually really strong).
The number is supposed to be pawns worth of value (1 for a pawn, 3 for a bishop etc). It’s not strictly material as positionally one can be ahead and the weighting that positioning can vary a little bit across analysis programs with the same position depending on the depth they analyse to (a 20 move deep analysis might see greater value in a piece than a 10 move deep)

They get stronger the larger the dataset they have is so that they can know what good positions look like so they prefer those. That’s how most analysis computers will work, as far as the super computers that far outstrip the masters go, they’re literally playing out millions of games to make their positions.

Anonymous 0 Comments

The obvious one is piece count. Whomever has the most pieces on the board is winning.

Roughly, pawns are worth 1, bishops and knights are worth 3, rooks 5, queens 9.

Then there’s positioning which is even rougher. Having pawns more forward is better. Having control of the center is better. Having more pieces more protected and threatening more is better. Having the king in a vulnerable position is real bad. If other pieces can put your king in check in 1 move, without instantly dying, that’ll mean trouble for you.

Anonymous 0 Comments

The obvious one is piece count. Whomever has the most pieces on the board is winning.

Roughly, pawns are worth 1, bishops and knights are worth 3, rooks 5, queens 9.

Then there’s positioning which is even rougher. Having pawns more forward is better. Having control of the center is better. Having more pieces more protected and threatening more is better. Having the king in a vulnerable position is real bad. If other pieces can put your king in check in 1 move, without instantly dying, that’ll mean trouble for you.

Anonymous 0 Comments

If you want to see someone actually coding a (very simple) chess engine, I recommend [this Sebastian Lague video](https://www.youtube.com/watch?v=U4ogK0MIzqk).

You can exactly solve chess if you “think ahead”: Let’s say it’s white’s move:

– If white can immediately checkmate black’s king, say “white wins.”
– Check each legal move for white. If for each possible move, black can immediately checkmate white’s king next turn, say “black wins.”
– Check each legal move for white. Then for each move, check each of black’s possible responses. If, for each of black’s responses, white has a counter-response that immediately checkmates black’s king, say “white wins.”

Then you can look for a counter-counter-response to the counter-response, and so on.

In theory, all board positions are completely solvable this way. A good programmer can knock it out in a few weekends. But nobody’s going to want to wait a trillion years for the program to spit out the answer.

In practice, we have a limited amount of computer time and memory available.

So at some point, you have to “guess” who will win by “looking at the board” and doing some kind of “estimate” or “heuristic.” The simplest one (used by humans for a long time) is “material value,” as other posters have noted you assign points, pawn=1, knight/bishop=3, rook=5, queen=9. Add up the points, and you “guess” that whoever has the most points is winning.

Chess engine engineering is basically:

– (a) Find more efficient ways to represent boards / pieces / moves
– (b) Make better decisions about when to “stop thinking ahead” on one line so you can use the time to think further ahead on another line.
– (c) Figure out better heuristics for more accurately evaluating the board
– (d) Spend a lot of time pre-calculating what happens near the beginning and it’s not too overwhelming to “think ahead” through all the possibilities (“opening book” / “opening theory”)
– (e) Spend a lot of time pre-calculating what happens when there are only a few pieces and it’s not too overwhelming to exhaustively check all the possibilities (“endgame database” / “endgame theory”)

“Traditional” engines (e.g. Stockfish) program all this stuff directly.

AI chess engines (AlphaZero, Leela) are the same, but they mostly use AI for (c). [AI needs examples to learn from](https://www.youtube.com/watch?v=R9OHn5ZF4Uo), this is part of the reason why a lot of companies are collecting lots of user data, downloading vast amounts of Reddit posts, or asking humans to solve image recognition puzzles. But interestingly, if you’re making an AI-based chess engine, you actually don’t need a bunch of example games by human chess pros. It turns out that it works if you just have the AI generate its own examples by making it play against itself. It also turns out you don’t need (d) or (e) because the AI ends up learning all that stuff through experience on its own.

Anonymous 0 Comments

If you want to see someone actually coding a (very simple) chess engine, I recommend [this Sebastian Lague video](https://www.youtube.com/watch?v=U4ogK0MIzqk).

You can exactly solve chess if you “think ahead”: Let’s say it’s white’s move:

– If white can immediately checkmate black’s king, say “white wins.”
– Check each legal move for white. If for each possible move, black can immediately checkmate white’s king next turn, say “black wins.”
– Check each legal move for white. Then for each move, check each of black’s possible responses. If, for each of black’s responses, white has a counter-response that immediately checkmates black’s king, say “white wins.”

Then you can look for a counter-counter-response to the counter-response, and so on.

In theory, all board positions are completely solvable this way. A good programmer can knock it out in a few weekends. But nobody’s going to want to wait a trillion years for the program to spit out the answer.

In practice, we have a limited amount of computer time and memory available.

So at some point, you have to “guess” who will win by “looking at the board” and doing some kind of “estimate” or “heuristic.” The simplest one (used by humans for a long time) is “material value,” as other posters have noted you assign points, pawn=1, knight/bishop=3, rook=5, queen=9. Add up the points, and you “guess” that whoever has the most points is winning.

Chess engine engineering is basically:

– (a) Find more efficient ways to represent boards / pieces / moves
– (b) Make better decisions about when to “stop thinking ahead” on one line so you can use the time to think further ahead on another line.
– (c) Figure out better heuristics for more accurately evaluating the board
– (d) Spend a lot of time pre-calculating what happens near the beginning and it’s not too overwhelming to “think ahead” through all the possibilities (“opening book” / “opening theory”)
– (e) Spend a lot of time pre-calculating what happens when there are only a few pieces and it’s not too overwhelming to exhaustively check all the possibilities (“endgame database” / “endgame theory”)

“Traditional” engines (e.g. Stockfish) program all this stuff directly.

AI chess engines (AlphaZero, Leela) are the same, but they mostly use AI for (c). [AI needs examples to learn from](https://www.youtube.com/watch?v=R9OHn5ZF4Uo), this is part of the reason why a lot of companies are collecting lots of user data, downloading vast amounts of Reddit posts, or asking humans to solve image recognition puzzles. But interestingly, if you’re making an AI-based chess engine, you actually don’t need a bunch of example games by human chess pros. It turns out that it works if you just have the AI generate its own examples by making it play against itself. It also turns out you don’t need (d) or (e) because the AI ends up learning all that stuff through experience on its own.

Anonymous 0 Comments

If you want to see someone actually coding a (very simple) chess engine, I recommend [this Sebastian Lague video](https://www.youtube.com/watch?v=U4ogK0MIzqk).

You can exactly solve chess if you “think ahead”: Let’s say it’s white’s move:

– If white can immediately checkmate black’s king, say “white wins.”
– Check each legal move for white. If for each possible move, black can immediately checkmate white’s king next turn, say “black wins.”
– Check each legal move for white. Then for each move, check each of black’s possible responses. If, for each of black’s responses, white has a counter-response that immediately checkmates black’s king, say “white wins.”

Then you can look for a counter-counter-response to the counter-response, and so on.

In theory, all board positions are completely solvable this way. A good programmer can knock it out in a few weekends. But nobody’s going to want to wait a trillion years for the program to spit out the answer.

In practice, we have a limited amount of computer time and memory available.

So at some point, you have to “guess” who will win by “looking at the board” and doing some kind of “estimate” or “heuristic.” The simplest one (used by humans for a long time) is “material value,” as other posters have noted you assign points, pawn=1, knight/bishop=3, rook=5, queen=9. Add up the points, and you “guess” that whoever has the most points is winning.

Chess engine engineering is basically:

– (a) Find more efficient ways to represent boards / pieces / moves
– (b) Make better decisions about when to “stop thinking ahead” on one line so you can use the time to think further ahead on another line.
– (c) Figure out better heuristics for more accurately evaluating the board
– (d) Spend a lot of time pre-calculating what happens near the beginning and it’s not too overwhelming to “think ahead” through all the possibilities (“opening book” / “opening theory”)
– (e) Spend a lot of time pre-calculating what happens when there are only a few pieces and it’s not too overwhelming to exhaustively check all the possibilities (“endgame database” / “endgame theory”)

“Traditional” engines (e.g. Stockfish) program all this stuff directly.

AI chess engines (AlphaZero, Leela) are the same, but they mostly use AI for (c). [AI needs examples to learn from](https://www.youtube.com/watch?v=R9OHn5ZF4Uo), this is part of the reason why a lot of companies are collecting lots of user data, downloading vast amounts of Reddit posts, or asking humans to solve image recognition puzzles. But interestingly, if you’re making an AI-based chess engine, you actually don’t need a bunch of example games by human chess pros. It turns out that it works if you just have the AI generate its own examples by making it play against itself. It also turns out you don’t need (d) or (e) because the AI ends up learning all that stuff through experience on its own.