News for hackers. Stuff that matters.
Re:Positions chess engines don't understand by tialaramex on Monday May 17, 2021 @06:49PM (#27189340)
Underpromotions are one of those "toy problem" things. A human might finish a whole professional career having never once promoted a pawn to anything but a queen, but in theoretical problem positions - like the one you're talking about - they happen "all the time" because it's a fun twist.

So it's understandable for a machine not to even bother modelling these weird cases I think.

Re:Positions chess engines don't understand by lmilcin on Tuesday May 18, 2021 @04:23AM (#27192343)
Statistics of it is irrelevant.

If I know a player is bad at certain types of situations I will be trying to force the player into those positions.

And chess engines are vulnerable because they don't learn and can be repeatedly exploited if you can find a way.

Re:Positions chess engines don't understand by tialaramex on Tuesday May 18, 2021 @09:45PM (#27203632)
In poker this approach can cost you a lot of money. "I will try to force the player into those positions" actually means you're now doing things that aren't optimal for you, based on a possibly false assumption about the world.

I suspect but can't prove that for the positions we're talking about here (opponent's pawn should be promoted, but promoting to a Queen is terrible) in Chess you're putting yourself in a very similar situation, ie. to pull this off you're obliged to deviate so far from good strategy that you invariably lose anyway.

For chess engines playing each other we already know it doesn't matter because the chess engines play far more games than it would take to notice, some of them have exactly this "weakness" and others do not, and of course for chess engines playing humans it's a joke, the humans aren't competitive in that scenario.

Re:Positions chess engines don't understand by perihelions on Monday May 17, 2021 @07:26PM (#27189591)
edit: This comment is wrong and useless; I'm leaving it up to preserve the logic of the replies.

To quantify, here's raw counts from a representative sample of serious games:

    $ rg -Io '=\w' twic*.pgn | sort | uniq -c
    
        365 =B
       1551 =N
     122386 =Q
       1393 =R
I see knight (N) under-promotions pretty regularly on chess streams. The common pattern is there isn't a free tempo to promote the pawn, unless promoting the pawn creates an immediate threat that holds the attacker's initiative; and a knight at that particular moment creates that opportunity.
Re:Positions chess engines don't understand by vkou on Monday May 17, 2021 @07:29PM (#27189621)
This obviously can't be trivially gleaned from those statistics - but would you say most of the bishop/rook promotions are just showboating, or are they done to avoid stalemates?

I, of course, understand why people would promote to a knight.

Re:Positions chess engines don't understand by gamegoblin on Monday May 17, 2021 @07:42PM (#27189728)
I'm an 1850 player and when I am playing under extreme time pressure (e.g. < 2 seconds remaining), I occasionally underpromote to a rook because I can execute a rook+king endgame mechanically faster than a queen+king without an accidental misclick causing a stalemate.
Re:Positions chess engines don't understand by kadoban on Tuesday May 18, 2021 @01:12AM (#27191454)
That's interesting. Is it just easier because you can't accidentally move to diagonals, or it's easier in your mind because you've seen it more? If you can even tell the difference.
Re:Positions chess engines don't understand by ryanjshaw on Tuesday May 18, 2021 @02:10AM (#27191714)
Not OP but with rook and king you make a box and shrink it while keeping your king next to your rook, and stalemate is all but impossible. With queen and rook you have to get the queen to a knight's distance from your opponents king and mirror their moves until the edge of the board, and at the end you need a slightly bigger L (4 squares) to avoid stalemate while your bring your king around. In the former the two pieces work together, in the latter they work somewhat independently (with a quirk at the end) until the final sequence of moves and therefore there is a slightly larger risk of error. In practice you should drill this regularly to mitigate the risk.
Re:Positions chess engines don't understand by eertami on Tuesday May 18, 2021 @05:57AM (#27192851)
>or it's easier in your mind because you've seen it more

I think the point OP is making is that if you need to use your mind at all with <2 seconds left you're going to lose. Pre moving safe legal moves without hitting a stalemate is definitely easier without a queen.

Re:Positions chess engines don't understand by bluGill on Monday May 17, 2021 @08:57PM (#27190195)
A rook promotion is something regular chess players will need to do to prevent stalemate, but it isn't that common where it is required (as opposed to someone who could win with a queen instead but it is trickery so beginners should go for a rook ). A Knight is the better promotion choice often enough that you should study tactics that lead to it, while a rook it is enough to do a stalemate check before promoting. There are tactics that only a bishop wins, but they are things you study for fun, not because you expect them.
Re:Positions chess engines don't understand by perihelions on Monday May 17, 2021 @07:43PM (#27189744)
Ahh you're right; I should have thought of that possibility! It turns out my data is more or less garbage; mea culpa.

In fact: all of the =R promotions I inspected were frivolous, and 4/5 of the =N promotions were frivolous. I'm surprised it's that bad. One scenario where this happens is "capture-promote, followed by immediate re-capture".

Re:Positions chess engines don't understand by ZephyrBlu on Monday May 17, 2021 @08:25PM (#27189973)
Props for trying it out even though the data was garbage.
Re:Positions chess engines don't understand by avip on Monday May 17, 2021 @08:23PM (#27189962)
I've seen a game by Alireza where he delivers mate by promoting to a knight. Arguably, the position was winning anyhow and standard promotion would also win, but the knight made it immediate checkmate.

(also this https://www.youtube.com/watch?v=3COS0_p3sfo)

Re:Positions chess engines don't understand by toast0 on Monday May 17, 2021 @08:49PM (#27190134)
Knight instead of queen offers different moves. Bishop instead of queen offers fewer moves. It's easy to imagine (and demonstrate, as you have) positions where a promotion to knight is advantageous, but it's hard to imagine positions where a promotion to bishop is advantageous except that it may confuse the opponent (computer or otherwise).

Well, on a little bit further reflection, possibly you may want to promote to bishop instead of queen if it helped you get to stalemate when you were confident you wouldn't win. Or as others said, to avoid the opponent having an opportunity to get stalemate.

Re:Positions chess engines don't understand by seoaeu on Monday May 17, 2021 @10:10PM (#27190597)
Avoiding stalemate is a reason to underpromote, but it seems rather improbable that such a situation would come up twice in a single game.
Re:Positions chess engines don't understand by TchoBeer on Monday May 17, 2021 @08:38PM (#27190056)
I think it's worth noting the value here. The reason why these positions are interesting is that they're so obvious to humans, even ametuer humans, and yet difficult to even very strong computers. This implies that the way computers "understand" the game is radically different; an engine can't reason logically about a chess puzzle like a human can, for instance.
Re:Positions chess engines don't understand by Isthatablackgsd on Monday May 17, 2021 @08:49PM (#27190131)
I would say that the computers are operating in a binary way, they don't have a "spectrum brain" which humans have various components to be able to analyze and see different scenarios. It is like humans have spatial awareness whereas computers are "one-track mind".
Re:Positions chess engines don't understand by ntr-- on Monday May 17, 2021 @09:43PM (#27190444)
The linked article includes a concrete example of such a case wherein a GM underpromotes to a rook to avoid a stalemate against another GM.

https://media.chesscomfiles.com/videos/wide/My_Best_Move_Ale...