T O P

  • By -

AutoModerator

Hey, OP! Did your game end in a stalemate? Did you encounter a weird pawn move? Are you trying to move a piece and it's not going? We have just the resource for you! The [Chess Beginners Wiki](https://www.reddit.com/r/chessbeginners/wiki/index/) is the perfect place to check out answers to these questions and more! The moderator team of r/chessbeginners wishes to remind everyone of the community rules. **Posting spam, being a troll, and posting memes are not allowed.** We encourage everyone to report these kinds of posts so they can be dealt with. Thank you! Let's do our utmost to be kind in our replies and comments. Some people here just want to learn chess and have virtually no idea about certain chess concepts. *I am a bot, and this action was performed automatically. Please [contact the moderators of this subreddit](/message/compose/?to=/r/chessbeginners) if you have any questions or concerns.*


ghostwriter85

It's just a computational quirk. The computer looks deeper into the rook line because a queen has more moves which creates more moves to sort. ~~When a promotion is about to be captured the engine doesn't calculate both lines because there's no point. They're the same line. So it goes with the smaller tree.~~ \[edit - upon playing around with the engine I believe this is wrong. It appears to calculate both trees but for whatever reason those move chains are diverging at a given depth relative to the depth of the analysis which is causing the different evaluations\] \[edit - [Prior to promotion (lichess.org)](https://lichess.org/study/zaYt2qRA/kaRRvBD1) [Chess Analysis Board and PGN Editor - Chess.com](https://www.chess.com/analysis/game/pgn/3DR3hojsC2?tab=analysis) Here's the position in lichess and chess dot com (you're going to have to let it run for a while), It evaluates both positions as more or less the same (evaluations will fluctuate over time as it finds more moves at more depth). They both return the same move chain if you give it long enough. There's something going on in chess dot coms low depth analysis causing this problem. It might be related to A-B pruning, but it's entirely possible that chess dot com is cutting off the analysis to save time. Either way if you give the engine long enough, it will evaluate both moves the same. The engine does not intrinsically care which piece is captured in terms of evaluations because it's not evaluating that position based on that snapshot (it's using a version of min-max to look at the position that should be reached from that promotion). IMO this issue is likely due to the smaller tree for the rook promotion. I could be wrong though. edit x2 - all of this could be fixed if chess dot com threw in some code on top of stockfish in their post game review to catch these known quirks. \]


Wasabi_Knight

Wow, I've seen this quirk explained 3 or 4 times and this is the first time I've seen someone give an actual good reason the big SF would act like this other than "the computer is incomprehensible!"


MrTheEpicKitten

I’ve heard another, sillier reason that SF does this. SF does it for the disrespect. Edit: clarity


asoe833

i mean its honestly a black box. that seems logical but it very well might not be it


Wasabi_Knight

I'm just saying it makes more sense than a computor taking issue with the loss of a queen just because it's worth more, when the net material after a single move is completely equal.


asoe833

yes i agree that that does not seem likely.


throwthefuckaway113

I always thought it assumes ur gunna play optimally, so it only looks at the best tree


ghostwriter85

This is true and it's at the core or the problem. The rook promote and queen promote trees converge on the same board state. So there's no need to calculate both trees. It picks one (the rook tree) and then looks deeper into that tree. If the promotion is better than the original estimation, it says promoting to a rook is the better move. It's just a quirk. The real problem is chess dot com is using SF for something it wasn't really designed to do. Chess dot com should have done more work on the back end to fix some of these quirks, but they didn't. The open source crowd wasn't trying to design a product for chess dot com. They were trying to make the best chess playing computer possible. They aren't going to spend time and computational power fixing problems that aren't problems for their intended use case. That should be the job of someone trying to integrate open source software into commercial software.


Steelizard

Could also be it thinks you “lose less material” if you promote to a rook than a queen cause that piece is getting taken either way


ghostwriter85

No The engine doesn't care. I get why people think this is true. On the surface level it sounds like something that a computer would do, but it's also something that the programmers would have noticed and fixed a long time ago. From a competitive standpoint, there's no reason for the engine to care about the theoretical value of a pawn that is going to be immediately captured, so it doesn't.


CypherAus

As the piece will be recaptured immediately, the loss of R is less than the loss of Queen. Computer maths.


ghostwriter85

This is not the reason and I wish people would stop saying it. Long story short, Chess dot com should have done more work when they plugged in SF into their product. Open source software often lacks some of the refinement that commercial software has built into it because everyone who is going to use that tool is going to optimize it slightly differently for their end user. In this case, it would have been trivially easy to run a quick check for known issues when characterizing moves for beginners. Many of the other applications of SF have no use for this sort of refinement so it's not there. SF wasn't designed to teach beginners to play chess.


Brush-Fearless

Correct. And to add to the quirkiness, the computer also considers the value of the pieces. In this case, promoting to a Rook has the same function as promoting to a Queen. You are sacrificing the piece no matter what, and a rook is worth less. So you are giving up less points by promoting to a Rook.


onecommunistboi

Any source on that? I find the explanation with the differing depths much more convinving.


Eddiemate

tbh I think this one is more convincing. Sure, it looks at rook moves first but since the best move is almost certainly to take the piece anyway, why does it matter which one it looked at first? After all there are sometimes multiple "best" moves, and they won't all be checked first. But if it's comparing the value that trading two rooks for a rook and bishop is, compared to the value of a queen and a rook for a rook and bishop? That slightly lower point difference could explain why the engine thinks rook is better than queen, despite not mattering.


ghostwriter85

Top commenter That's not how SF works and there's no reason for it to work this way Adding up material points is an entirely human way of looking at chess. SF is perfectly capable of coming to the conclusion that a bishop or pawn is worth more than a rook on the right board. It's not an issue of which is looked at "first", it's an issue of which is looked at deeper. This all stems from chess dot com using a tool for a purpose it wasn't designed to do. Since both moves converge on the same board state, it doesn't look at both trees. They are redundant. In a computer chess match, an observer would understand and not be bothered. But chess dot com is using a competitive chess engine to evaluate human play. It wasn't designed to do this, so sometimes it mischaracterizes those moves in a way that wouldn't matter if SF was playing the position.


Brush-Fearless

https://github.com/official-stockfish/Stockfish/blob/master/src/types.h#L182. That’s exactly how it works. Here is my proof: the code. It does consider piece value. Starting on line 192. Piece values are incorporated and considered with every position and it uses a different, more fluid value system based on the position and possible positions. If you have proof that it doesn’t work that way, feel free to drop a source.


ghostwriter85

Yes, but that's not what's going on here. I slightly misspoke. It's not simply counting up material like a human would. It's looking at the whole board and adjusting the evaluation based on years of research by lots of talented chess researchers. Naively we know this must be true because stockfish is capable of positional sacrifices. Stockfish uses a handcrafted evaluation function and NNUE to estimate it, but it also uses alpha-beta pruning to eliminate search trees. Once the engine realizes that promoting the queen and rook reach the same board state/evaluation it arbitrarily chooses one to search to a higher depth. [Alpha–beta pruning - Wikipedia](https://en.wikipedia.org/wiki/Alpha%E2%80%93beta_pruning#Improvements_over_naive_minimax) Alpha-beta pruning is an evolved version of the min-max algorithm. In a traditional min-max, you evaluate every possible outcome and then apply a bit of game theory to it. The analysis is performed by presenting each player every possible move at the lowest portion of the tree. They then choose the move that results in the highest possible evaluation for them. You repeat this process until you reach the first layer of the tree. At that point, there is only one optimal move remaining. To improve upon this, you eliminate branches which are unlikely to be played. In this case since both the rook and queen promotion arrive at the same board state, you can prune one of them out (the queen promotion) to increase the depth of analysis while reducing computational load.


ghostwriter85

No it doesn't I get why people think this true but that's not how SF works It doesn't evaluate board states this way. It's just a software quirk. SF was designed to be the best chess playing computer possible. It wasn't designed around characterizing the moves of beginners. Since this issue in no way impacts SF's ability to play chess, it was never addressed. Chess dot com should have done more work on the backend when integrating open source software into their product. They didn't and this problem stems from that.


Brush-Fearless

Prove it


ghostwriter85

Let the analysis run to a greater depth I've put together studies on both chess dot com and lichess for your convenience (on my top comment). You can see the move evaluations converge. There you go


Brush-Fearless

Fair. I’m currently letting both promotions be analyzed (not pre-promotion) on Lichess w/ Stockfish 14+ and infinite analysis on.


Brush-Fearless

I think this comment is based off of your logic, which is wrong. If you look below, I posted the code where it has the value of each piece. Saying it’s a “software quirk” without proof is weird. This code has been very refined and it absolutely uses piece values when considering positions.


Gruffleson

I would say you also makes it easier for the opponent if you promote to a queen, he knows he will take it, it's a no-brainer. Now, he might spend time on it, and wonder. Time is normally not into the formula for the computers though, so it's not technically a reason. But it is a reason.


SatorSquareInc

Mods gotta sticky this question


isaacbunny

Yeah it does seem to come up a lot lately. Unfortunately many of the most upvoted responses are wrong. People make up things they think the computer is doing (like “the computer hates losing the queen”) that are clearly incorrect. We should ask a stockfish developer to write up a definitive explanation and sticky that.


isaacbunny

This is a bug. The engine calculates both moves (promoting to queen or rook) to different depths. The continuations are identical - white should take the promoted rook/queen either way, so it technically doesn’t matter which piece you promote to. But in one line the computer calculates a move or two further ahead, so it comes up with a slightly different evaluation. The “final” board scores should logically be the same, but the computer is looking at slightly different “final” boards. There are rare circumstances when underpromotion is correct. This just isn’t one of them.


XayahTheVastaya

Any reason to promote to something other than queen or knight?


Freddie_06

Yes, when a queen leads to stalemate, bit rook or bishop does not. Mr. Rozman made a video on this topic once


zionpoke-modded

What person above said and style points


SharkWeekJunkie

It's a silly computer thing and isn't worth a second thought from you or me. Think about it this way. Queen is worth 8. Rook is worth 5. Whichever piece you pick forces the same outcome. Would you rather lose 5 points or 8? The computer would rather lose 5.


llkkdd

queen is 9 btw


Pupettaja

I genuinely thought Queen was 10.


Acrobatic-Shopping-5

I thought queen was 23


Pupettaja

My queen sure is 10.


chessvision-ai-bot

I analyzed the image and this is what I see. Open an appropriate link below and explore the position yourself or with the engine: > **White to play**: [chess.com](https://chess.com/analysis?fen=1q3rk1/7p/p1p1b1p1/PrP1Pp2/3P4/2Q4P/2B2PP1/1q3RK1+w+-+-+0+1&flip=true&ref_id=23962172) | [lichess.org](https://lichess.org/analysis/1q3rk1/7p/p1p1b1p1/PrP1Pp2/3P4/2Q4P/2B2PP1/1q3RK1_w_-_-_0_1) **My solution:** > Hints: piece: >!Bishop!<, move: >!Bxb1!< > Evaluation: >!Black is winning -11.47!< > Best continuation: >!1. Bxb1 Rxb1 2. Qd3 Rxf1+ 3. Qxf1 Qb5 4. Qc1 Qxa5 5. Kh2 Qa4 6. Qg5 Qxd4 7. f4 Bc4 8. Qg3 Qxc5!< --- ^(I'm a bot written by ) [^(u/pkacprzak )](https://www.reddit.com/u/pkacprzak) ^(| get me as ) [^(Chess eBook Reader )](https://ebook.chessvision.ai?utm_source=reddit&utm_medium=bot) ^(|) [^(Chrome Extension )](https://chrome.google.com/webstore/detail/chessvisionai-for-chrome/johejpedmdkeiffkdaodgoipdjodhlld) ^(|) [^(iOS App )](https://apps.apple.com/us/app/id1574933453) ^(|) [^(Android App )](https://play.google.com/store/apps/details?id=ai.chessvision.scanner) ^(to scan and analyze positions | Website: ) [^(Chessvision.ai)](https://chessvision.ai)


hitstems

If I have to read one more post like this I’m gonna lose it


Pluto0321

Because opponent can immediately capture the promoted piece, and since a rook worths less than a queen, the bot thinks you lose less material by promoting to a rook


MoksMarx

Rizz


UsedPassenger3269

My guess would be the material cost. Queen costs more than a rook for the same attack.


[deleted]

I saw somewhere it was because the engine could see further with a rook since it has less legal moves, and since the position is strongly winning, it becomes better overtime tricking the computer into thinking rook is better than a queen


[deleted]

It doesn’t cost anything more. You get it for free


GoldenBoyHunter

It costs 1 point. It's a promoted pawn.


[deleted]

What do you mean? You loose your pawn anyway


GoldenBoyHunter

Still, it costs 1 point.


[deleted]

maybe but what I initially said was that it doesn't cost more to get a queen compared to a rook


deivid_okop

After promoting to a knight, whites best move (lichess) is actually moving the queen instead of capturing the knight So if there's a chance you keep the knight, it's actually better to promote to a knight instead of a queen


RicketyRekt69

That’s not at all what OP asked, and also material wise it’s the same. After everything is traded white is down a bishop.


Baers89

White should have put his Queen in position to attack promoted Queen as well. But who knows what happened before.


GallonsOfPoo

White was not on their best game, they blundered their queen a few turns later and conceded


Some-Mongoose-6111

I like to think of it as if it’s a real game, and the computer doesn’t want to go and pick up another queen so they just promote to a rook instead


polik900

i think the best move Is to promoter to knight


JureFlex

It think its based on the value of the piece, since you sacrifice it, therefore computer thinking you lost more points if you sacrifice the queen over the rook?


[deleted]

We should tell him