But I'm not searching PV first, I'm just using my hash table for transpositions only. PV is for display purposes only. In fact I got rid of my PV array altogther. AM I missing something there?hgm wrote: ...
The reason is that you get an inexact-depth hash hit after Bd6-d8 on the position that was already searched after 1.a8=Q Bxd8 2.Qxd8#, which was the PV at 3 ply, (although it could not see it ws a checkmate there), and was thus searched as the first branch at 4 ply. There it was discovered that black was in fact checkmated, so it started to look for black alternatives. It then found a better black defense (presumably 1.... Bb7+), which pushed the mate again over the horizon, and then it tried a white alternative 1.Bd6+, which ended up in the graft.
The fact that you don't see a 5-ply PV at 5 ply is further evidence of the hash hit; this position was searched at d=1 in the 4-ply search, so the hit would still be valid for the 5-ply search. The hash cutoffs then cuts the PV (obtained through the triangular method) short.
p.s. I'm not using iterative deepening either. Just a fixed depth, 6-ply search perhaps that points to the problem. Anyways, I'll be working on it.