# Handling mate scores

Normal nodes have a score that is dependent upon the position on the board and the amount of depth searched under the node.

Mate scores are different, because the score is different depending upon where the mate is found.  For an explanation of this, check out the article on mate scoring.

You can't just go sticking mate scores in the main transposition table without performing some sort of translation, so that your program doesn't say "mate in 34" when it's really a mate in 5.

I could explain how to do this, but I'd have to figure out how to do it, first.  I've listened to people explain how to do it, but it makes my head hurt, and I'm even more averse to hearing about this when they tell me about the bugs they've had.

So what I do instead is turn all exact mate scores into bounded mate scores.  "Mate in 3" becomes "at least mate in 500".

This allows me to cut off in the most interesting cases, because "at least mate in 500" will typically cause a beta failure unless alpha and beta are in the mate range already, in which case the game is decided.

See Gerbil for example of how to handle this without a lot of angst.

 
Send mail to brucemo@seanet.com with questions or comments about this web site.
Copyright © 2001 Bruce Moreland
Last modified: 12/27/02
