Page 2 of 2

Re: Engines fail to find mate in two

Posted: Tue Nov 08, 2016 4:33 pm
by Brendan O'Gorman
John, are you sure you didn't set up the position with Black playing up the board?

Re: Engines fail to find mate in two

Posted: Tue Nov 08, 2016 5:44 pm
by Christopher Kreuzer
If he played 1.Rb7 manually, and the engine then found the mates in two, I suspect not?

Also, Lawrence said "The same (not surprisingly) with Fritz 11."

I can try it with Fritz 6 if that helps... :oops:

(Does anyone still have chess engines older than Fritz 6?)

Re: Engines fail to find mate in two

Posted: Tue Nov 08, 2016 6:37 pm
by Ian Kingston
Just checked with Fritz 11SE (comes with ChessBase): finds the mate in 2 instantly.

Re: Engines fail to find mate in two

Posted: Tue Nov 08, 2016 8:49 pm
by MartinCarpenter
Suppose it must be some sort of odd bug that they fixed at some point then. Not a remotely relevant one for normal play I'd suspect.

Re: Engines fail to find mate in two

Posted: Tue Nov 08, 2016 8:52 pm
by John Clarke
No engine will fail to find a mate in three for White here - whichever way up you set the board.

Position given by Gerald Abrahams in Test Your Chess (Constable, 1963). Claimed he came across it in the Cafe de la Regence in 1925, but was never able to find out who composed it.

Re: Engines fail to find mate in two

Posted: Tue Nov 08, 2016 9:04 pm
by Ian Thompson
LawrenceCooper wrote:The same (not surprisingly) with Fritz 11.
I got the same with Fritz 11 SE. I also noticed that if you play any legal move for White and then retract it, it then immediately finds the mate in 2 in the starting position.

Re: Engines fail to find mate in two

Posted: Tue Nov 08, 2016 9:17 pm
by Nick Grey
Very nice - seen this before with Bf6 but not the other way round with Kc3.

Re: Engines fail to find mate in two

Posted: Wed Nov 09, 2016 11:04 am
by Mike Gunn
Programs that play chess use a technique called alpha/beta pruning (or similar, this is based on memory of stuff I read more than 30 years ago). The program considers all positions that can be generated by legal moves from the current position and then all positions that can be generated by legal replies to those moves (and so on for further moves). The program uses an evaluation function to see whether the positions reached are favourable for one side or another (and how favourable they are). The "tree" of possible positions grows exponentially and so does the computer storage requirement to store them and the time to carry out all the evaluations. Hence programmers adopt techniques to "prune" the tree of positions by ignoring what seem to be unpromising variations (and positions that would develop from them).

The above could be the reason for Fritz failing to find the mate in two. One of the earliest chess programs I bought (Chessmaster?) had separate options for finding "mate in n moves" and playing a game, the point being that mate in n would be done with no pruning.

So this could be a bug in setting appropriate initial parameters for the pruning algorithm ...

Re: Engines fail to find mate in two

Posted: Wed Nov 09, 2016 12:46 pm
by Michael Farthing
I think a more likely explanation is that having found a mate in 3 the engine decided it wasn't worth bothering to look any further. It might be, for instance, that check and capture lines get explored ahead of others so the engine would consider Bg6 + first. It could also be that the engine considers lines with the fewest variations the best, even if they take longer. That would also lead to Bg6+ since that move permits only two continuation lines. The idea that an engine would completely discard a first possibility that was not even vaguely unreasonable seems quite implausible.

Re: Engines fail to find mate in two

Posted: Wed Nov 09, 2016 1:19 pm
by Mike Gunn
Another possibility is that at any stage it only considers the top m continuations in a given position. Then selecting a continuation and deleting it could promote another line.

Re: Engines fail to find mate in two

Posted: Wed Nov 09, 2016 1:54 pm
by MartinCarpenter
Checks and captures do definitely get examined ahead of everything else, that was a very early thing they worked out when programming this stuff :)