I've been thinking about this thread as I worked my way through the WAC positions.sje wrote:Note that if a sufficiently fast forced mate (or loss) is found, the program should exit the test early for that position.
I test a set of positions iteratively (starting at one second per position) with each test allowing twice the time than the prior test run. Problems solved in one run are not tried in succeeding runs.
Unless I misunderstand the intent of the bolded remark, is there not an issue here whereby the program stops after finding a fast enough forced mate, but overlooks an even faster mate because it stopped too soon?
As an example, there was a position whereby my program found a mate in four, but as it played out the line, it never reached the mate, because at each turn it kept finding mates in 4 before it found the mate in 2 move that was part of the original line. Or something very much like that
Naturally a properly designed program that "saves its analysis" won't have this problem, but that rather begs the question IMO. Anyways, it's just an example of how an engine can find a forcing line, yet be unable to drive home the point.
Anyways, until I am able to do it properly, I just added a routine whereby the engine would reduce the ply by 2 whenever it played a move in a line that forced checkmate.