Mates that are difficult for engines

Sort:
drdos7
MARattigan wrote:
drdos7 wrote:
EndgameEnthusiast2357 wrote:

Probably because it's a capture. Remove the knight and see what it says.

With the black Knight removed, Stockfish plays 1.Ne2 Mate consistantly.

Strictly speaking the GUI plays 1.Ne2# if the UCI interface is used. Probably because the knight is on c1 and that is the first square under the ordering αν≤α'ν' when α<α' (alphabetically) or α=α' (alphabetically) and ν≤ν' (numerically).

Here is Stockfish from the command line without any GUI, and it's not loaded in any GUI in the background:

It still seems to like 1.Ne2

EndgameEnthusiast2357

Because N is less than R or Q, or because the starting and destination squares are lower, or both?

MARattigan

In that case the command line is the GUI (in UCI terms), but you choose the move. A GUI will almost always play the returned "bestmove" so you wouldn't expect the distinction to be relevant in this context. It does mean you get variations in quality of play between different GUIs presumably because they allocate time differently, for example, in my set up, Tarrasch/SF15 will reliably play a mate in 36 in KNNvKP with the pawn on the sixth rank under 40 moves in 2 hrs. time controls but Arena/SF15 won't under the same time control.

My guess would still be 1.Ne2# is played because SF uses the ordering I suggested on its optimal moves.

Edit: I guess wrong.

(a) I got the letters and numbers the wrong way round (it would give 1.Qab4# with the ordering I showed).

(b) It doesn't work with the order reversed anyway. (I checked. The piece moved below is not first either way round.)

I suppose it's just based on the order they happen to finish up with SF's search algorithm.

Second edit: When I said you choose the move above, that's Hobson's choice if you have MultiPV set to 1. If you increase it you get extra options.

Arisktotle
MARattigan wrote:

Is the fact your engine picks the draw one of the flaws to be fixed?

It was a joke winkwinkwinkwinkwinkwinkwinkwinkwinkwink

Btw, without the knight the position is stalemate as the move always goes to the side which is provably on move. It overrides the default on move assumption. No joke, just 1 wink wink

MARattigan
EndgameEnthusiast2357 wrote:

Because N is less than R or Q, or because the starting and destination squares are lower, or both?

Type of piece also doesn't appear to fix the order.

EndgameEnthusiast2357

Well then what alphabetical ordering is it using to land on whatever move it chooses?

drdos7
Arisktotle wrote:
MARattigan wrote:

Is the fact your engine picks the draw one of the flaws to be fixed?

It was a joke

Btw, without the knight the position is stalemate as the move always goes to the side which is provably on move. It overrides the default on move assumption. No joke, just 1 wink

I knew you were joking, but it reminded me of one of the gentlemen in one of the forums I go to who was releasing his engine that he named "Moron 1.0", and as months went by he would release versions 2.0 and 3.0, I even made a logo of the fictitious engine for him with a caricatured picture of him. grin

MARattigan
EndgameEnthusiast2357 wrote:

Well then what alphabetical ordering is it using to land on whatever move it chooses?

As I said in my edit to #75 alphabetical/numeric ordering doesn't fit the facts. Actually common sense dictates that it wouldn't order the optimal moves before returning a "bestmove". My original post was ill advised.

drdos7
MARattigan wrote:

"In that case the command line is the GUI (in UCI terms), but you choose the move."

I don't think I "chose the move", I simply loaded the FEN into the command line and then gave the command "go movetime 1" for Stockfish to move in the command line and Stockfish chose the move.

Edit:

If I simply hit "go" in the command line without specifying it a time then Stockfish chooses 1.Qb2 mate consistently.

EndgameEnthusiast2357

What I'asking is what defines "optimal moves" when it comes to multiple mates, like in this position:

How does it decide which checkmate is more optimal?

MARattigan
drdos7 wrote:
MARattigan wrote:

"In that case the command line is the GUI (in UCI terms), but you choose the move."

I don't think I "chose the move", I simply loaded the FEN into the command line and then gave the command "go movetime 1" for Stockfish to move in the command line and Stockfish chose the move.

Edit:

If I simply hit "go" in the command line without specifying it a time then Stockfish chooses 1.Qb2 mate consistently.

I've clarified what I was trying to say in a second edit to my post. Was unclear.

EndgameEnthusiast2357

In this example there are not only 2 different ways of going about mate, but in 1 of them there are 2 final moves that mate. How does the engine branching algorithm decide which sequence to choose, since all 3 are exactly 3 moves long?

MARattigan
EndgameEnthusiast2357 wrote:

In this example there are not only 2 different ways of going about mate, but in 1 of them there are 2 final moves that mate. How does the engine branching algorithm decide which sequence to choose, since all 3 are exactly 3 moves long?

My answer would be I don't know, you'ld have to look at the code.

The recommended move will be the first move in its evaluation order and that order will in general vary with time, hash space, possibly hash table hits and options, though this one will obviously be fixed pretty quickly. At 5ms it gives Nxd3 on my system; at 50ms it gives

(Browser zoom to 175% to read.)

In most positions the order after any amount of time is unpredictable even for someone fully conversant with the code (otherwise they'd all be pretty hot players). Some might have a stab at it for this particular position given that all variations are almost finished.

Arisktotle
drdos7 wrote:

Here's a mate in 58:

White to move and mate in 58

It appears black can delay the mate by 1 move at the start: 1. f7 Rxg7 2. f8=Q Rg6! (instead of Rg4) 3. Qf4+ Rg4 4. Qf6+ etc. Am I missing something?

Ilampozhil25
Arisktotle wrote:
MARattigan wrote:

Is the fact your engine picks the draw one of the flaws to be fixed?

It was a joke

Btw, without the knight the position is stalemate as the move always goes to the side which is provably on move. It overrides the default on move assumption. No joke, just 1 wink

i said basically that but with a proof

Arisktotle
Ilampozhil25 wrote:

i said basically that but with a proof

You did though the people in this conversation already figured out that proof themselves. They are quite clever in this territory.

I reacted to the question whether or not explicit text statements about the side on-move can override the default assumptions for a puzzle. That is not so clear here as the question does not apply to the diagram where it is no issue with the black Knight, but to the edited diagram without the black Knight. Anyway, the composition author was aware of it or he hadn't added the black Knight!

MARattigan
drdos7 wrote:

Here's a mate in 58:

White to move and mate in 58

You need to demonstrate mate in 58 or less after 2...Kg4/5.

For example here is a few SF15 continuations strung together after 2...Kg5 finishing in a draw after 62 moves.

 
drdos7
Arisktotle wrote:
drdos7 wrote:

Here's a mate in 58:

White to move and mate in 58

It appears black can delay the mate by 1 move at the start: 1. f7 Rxg7 2. f8=Q Rg6! (instead of Rg4) 3. Qf4+ Rg4 4. Qf6+ etc. Am I missing something?

I'll take a look at it when I get home from work. Thanks

drdos7
MARattigan wrote:
drdos7 wrote:

Here's a mate in 58:

White to move and mate in 58

You need to demonstrate mate in 58 or less after 2...Kg4/5.

For example here is a few SF15 continuations strung together after 2...Kg5 finishing in a draw after 62 moves.

 

I'll take a look at your PGN when I get home from work. Thanks

MARattigan
drdos7 wrote:
MARattigan wrote:
drdos7 wrote:

Here's a mate in 58:

White to move and mate in 58

You need to demonstrate mate in 58 or less after 2...Kg4/5.

For example here is a few SF15 continuations strung together after 2...Kg5 finishing in a draw after 62 moves.

 

I'll take a look at your PGN when I get home from work. Thanks

The PGN is obviously not SF15's A game. It's just to suggest that a line should be included in the solution that covers the moves.

It's not difficult to demonstrate mate in less than 58 after the moves suggested because Black's pieces on the queen side are totally useless if White's king doesn't move and White can simply capture the king's side pawns and promote his own.

But while it's obviously quicker than the defence you show a full proof would be a bit messy. In view of that and @Arisktotle's point, might be easier to change it to "White to play and win".