Calculation the playing strength of a move

Discussion of chess software programming and technical issues.

Moderator: Ras

Jon12345
Posts: 80
Joined: Tue May 11, 2010 6:18 pm

Re: Calculation the playing strength of a move

Post by Jon12345 »

@Ferdy, you are on the money of my thinking here. Your approach is exactly what I was thinking. By combining expected results based on elo and the sigmoid, you can establish the statistical strength of the move. You will note that my original post refers to the sigmoid (although I did not know the actual term) and the elo rating calculator. All other arguments are irrelevant, IMHO.

The opponents rating would be the engines rating, since that would be the evaluator of the best move. I might cap it at Magnus's rating though!

You understood what I was trying to achieve, presented it well and it was the approach I was converging on. It is just using a combination of existing formulas. Doing so gives the move strength. My algebra teacher would be proud! :D

Edit: I had not got to developing the actual formula yet, but I note you have presented one which I will look at with interest.
Last edited by Jon12345 on Sun Jul 11, 2021 3:45 pm, edited 3 times in total.
Jon
Jon12345
Posts: 80
Joined: Tue May 11, 2010 6:18 pm

Re: Calculation the playing strength of a move

Post by Jon12345 »

hgm wrote: Sun Jul 11, 2021 10:21 am Perhaps the misunderstanding is about what you mean by 'strength of a move' expressed in Elo. I imagined you meant that the move would be typically played by a player with a certain rating. Like for a given situation, GMs would typically prefer move A, but patzers would prefer another move, because it is without their grasp to see the merits of move A. My point was that this cannot be decided from the evaluation drop.
By strength of move, I am referring to what strength the player is likely to be by playing that move. For example, 2.Qh5 trying to get scholars mate is likely to be played by say a 400 elo player, while a GM might play 2.Nf3 instead. A move played by a GM that loses a queen, but it is very hard to see is likely to be played by a GM, but not a 3,500 rated engine. So the "losing" move would have an elo strength of 3,500.
hgm wrote: Sun Jul 11, 2021 10:21 am A wrong move that eventually leads to forced loss of a Queen in a complex way might initially look good or even best to the engine, until it reaches the search depth that gets the loss within the horizon. Then the score will drop dramatically. So which score are you going to take to determine the Elo of that move?
You take the elo of that move based on the search depth or time you have attributed. We don't say we cannot evaluate a position because we can't calculate all variations to the end of the game. Engines do evaluations, as do humans. The evaluations may be wrong because they are not "perfect", but we still do them and use them. Should we stop showing engine evaluations because they may be inaccurate, due to the horizon and breadth effect? Should engines not use an evaluation function because if they evaluated to 20 ply, it might be proven wrong had they evaluated to 30 ply?

Or look at it this way. If you had an engine look 10 ply ahead, that engine would have a rating of say 2,000. A 20 ply look ahead would have a rating of 3,000. It takes 15 ply to realise the move you played was not the best one. If the evaluation function used 10 ply, you would give the move score to be 2,000. If the evaluation function used was 20 ply, they would rate the move as poor, and so its score would be based on a formula factoring in the 3,000 rating, and how poor the move was.
Jon
User avatar
hgm
Posts: 28396
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Calculation the playing strength of a move

Post by hgm »

Jon12345 wrote: Sun Jul 11, 2021 3:41 pmBy strength of move, I am referring to what strength the player is likely to be by playing that move. For example, 2.Qh5 trying to get scholars mate is likely to be played by say a 400 elo player, while a GM might play 2.Nf3 instead. A move played by a GM that loses a queen, but it is very hard to see is likely to be played by a GM, but not a 3,500 rated engine. So the "losing" move would have an elo strength of 3,500.
But the score drop (as indicated by the 3500-Elo engine) by 2. Qh5 is perhaps only 50 cP, while a complex tactical loss of a Queen would be evaluated (by the same engine) as -900 cP. So on what basis would you want to assign a lower Elo to 2. Qh5 than to the Queen loss?
Jon12345
Posts: 80
Joined: Tue May 11, 2010 6:18 pm

Re: Calculation the playing strength of a move

Post by Jon12345 »

hgm wrote: Sun Jul 11, 2021 7:28 pm But the score drop (as indicated by the 3500-Elo engine) by 2. Qh5 is perhaps only 50 cP, while a complex tactical loss of a Queen would be evaluated (by the same engine) as -900 cP. So on what basis would you want to assign a lower Elo to 2. Qh5 than to the Queen loss?
I wouldn't assign a lower elo to 2.Qh5 if the engine can see the the alternative move that loses the queen and have never stated I would, unless you can point me to the error of my ways?
Jon
User avatar
hgm
Posts: 28396
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Calculation the playing strength of a move

Post by hgm »

So you would assign low Elo to a move that a GM could play, and a much higher Elo to a move that only a Patzer would play, but never a GM?
Jon12345
Posts: 80
Joined: Tue May 11, 2010 6:18 pm

Re: Calculation the playing strength of a move

Post by Jon12345 »

Let me answer by asking you this question...

So you would assign low Elo to a move that Stockfish could play, and a much higher Elo to a move that only a GM would play, but never Stockfish?
Jon
User avatar
hgm
Posts: 28396
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Calculation the playing strength of a move

Post by hgm »

If your goal is to assign the Elo of the player that would typically play the move to that move (as I recall you said it was)... Then yes, a move that typically would be played by a 2400-rated GM should get rated 2400, and a move like 2 Qh5 typically played by a 400-Elo patzer should get rated 400. Irrespective of how Stockfish scores it, or what it thinks would be the best move.
Jon12345
Posts: 80
Joined: Tue May 11, 2010 6:18 pm

Re: Calculation the playing strength of a move

Post by Jon12345 »

If you look at my first post, it states the playing strength of a move. I do not mention typical players.

That aside, if a GM plays a blunder then it is a blunder, regardless if all GM's want to play that move and a patzer doesn't. If a GM thinks a particular sacrifice will work, but it is proven unsound, it was an objectively poor move. It does not matter what the player thinks, or if they are a GM or patzer. A patzer playing a passive 20.a3 vs a GM playing 20.Bxh7+ has played the stronger move if the Bishop sacrifice fails. To say the strength of the move is determined by the strength of the player making that move is conflation.

Perhaps what you are getting at is that sometimes a player may make a speculative move with risks. Such a move may be labelled !?. But if it was unsound, it would be ?! or ??. The fact of the matter is, it is normally the other way around. The GM will usually not be making dubious moves and the patzer will be.

Even if it was designed to predict the rating of a player who would typically make these moves, I think you are looking for rarer instances where the evaluation of the strength of the move played by a player would be inaccurate. i.e. you want perfection. But what about chess engines evaluation? We have already talked about this, where no evaluation is perfect. Calculate another 5 ply and the bar may swing the other way. Saying you cannot rate a move because a GM may on occasion make a losing move is like saying you cannot have an engine evaluation function because 5 more ply may show a different evaluation.
Jon
User avatar
hgm
Posts: 28396
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Calculation the playing strength of a move

Post by hgm »

Well, last time you said this:
Jon12345 wrote: Sun Jul 11, 2021 3:41 pmBy strength of move, I am referring to what strength the player is likely to be by playing that move.
There is no point in discussing this if you change all the time what it is about...
Jon12345 wrote: Mon Jul 12, 2021 4:10 pmThat aside, if a GM plays a blunder then it is a blunder, regardless if all GM's want to play that move and a patzer doesn't. If a GM thinks a particular sacrifice will work, but it is proven unsound, it was an objectively poor move.
Then I don't understand why you even bring this up. The objective value of a move is draw, mate-in-N or mated-in-N. And 2. Qh5 is not a poor move at all; it is objectively the best move available (after 1. e4 e5). It is good enough to achieve a draw, and there are no moves that force a win. So all moves that achieve a draw are objectively best moves, indicative of perfect play.
Jon12345
Posts: 80
Joined: Tue May 11, 2010 6:18 pm

Re: Calculation the playing strength of a move

Post by Jon12345 »

Yes, I said that in reference to the context you brought up, about your "What if a GM players a blunder" scenario. There is overlap between the objective strength of a move, and the strength of the player making that move. You are engaged in black and white thinking, while this operates on a continuum. If you say, I am changing all the time, why did you start talking about the strength of a player making a move when my original post was about the strength of a move? It seems you want to try all angles to discredit an innovation which is merely a question of combining formulas. I don't understand why you are so angry about this.
Then I don't understand why you even bring this up. The objective value of a move is draw, mate-in-N or mated-in-N. And 2. Qh5 is not a poor move at all; it is objectively the best move available (after 1. e4 e5). It is good enough to achieve a draw, and there are no moves that force a win. So all moves that achieve a draw are objectively best moves, indicative of perfect play.
I brought it up because if you want to argue from the point of view that the algo measures what a typical strength player would play, it would still have considerable merit.

But we seem to be going around in circles here. If the objective result is draw, win or loss, why have engines evaluating in centipawns? Why even say, "White is better", or White is 1.2+? I refer you to @Ferdy's answer, who got it first time.

I wish you a good day...
Jon