H.G.Muller wrote:I even 'upgrade' such an entry in the hash table, by listing it as being calculated to infinite depth; even if it is a 'mate in 3' that was discovered in a 6-ply search, nothing can be expected from deepening the search, since this can only lead to the discovery of slower mates that will have lower score. So if an evaluation at 12 ply is needed, the 6-ply evaluation foud in the hash table is still perfectly useable if it is a forced mate.
Beware, though:
From playing a little bit with a hash-table extension to my minimalistic chess engine, I just came to realize the following: it is only save to do this when an n-ply search finds a mate in at most n+2 plies. If it finds a slower mate, there is no guarantee that there are no routes to mate at intermediate distances. For instances, in the archetypal pawn ending KPK (Ke1, Pe2; Ke8) with the aid of the hash table the first forced mate is found at a search depth of 26 ply, and it is a mate in 32.
It is interesting, by the way, that the search is much more efficient if I completely open the (alpha,beta) window on every ply (i.e. set it to (-inf,+inf)). On the first few plies this leads to more nodes being searched, but this is just an investment in the quality of the contents of hash table: the fact that every entry in there is always compatible with any window makes you catch up later.