sunfish
sunfish copied to clipboard
Tempo
Sunfish currently doesn't do 'tempo'. A mate in 6 is considered the same as a mate in 1.
I have this solved in my master. d6bb441
Interesting. Isn't it normally implemented by always subtracting a bit from the score returned in minmax?
Nope. If you always do that then you introduce a bug where a bad move searched shallowly is favoured over a good move searched deeply.
Matthew:out
But it doesn't have to be a big constant. Otherwise, don't you have to do a lot of 'correcting' in the TT code, like the describe on http://chessprogramming.wikispaces.com/Checkmate ? Another approach I've thought about is to keep the global movenumber in the Position representation. Then we could make MATE_SCORE-global_ply the value of a checkmate. This might give new problems in TT though.
2014-03-13 18:16 GMT+01:00 ZirconiumX [email protected]:
Nope. If you always do that then you introduce a bug where a bad move searched shallowly is favoured over a good move searched deeply.
Matthew:out
— Reply to this email directly or view it on GitHubhttps://github.com/thomasahle/sunfish/issues/11#issuecomment-37559774 .
Mvh. Thomas
Search deep enough and even 1 centipawn can make a difference.
It's better to have to deal with mate scores in the TT than having to deal with false mate scores in the TT.
Matthew:out
Have you tried testing the engines against each other and compared results?
A mate in 6 is considered the same as a mate in 1.
I "solve" this in my rust engine by exiting the search early on mate found, which while not correct 100% of the time is a good approximation, makes the engine appear faster and can very easily be done by making _search yield the score
I like the way this is done in Micromax: https://home.hccnet.nl/h.g.muller/delay.html
But I haven't found a position where it matters in the current sunfish, so I can't really test whether it improves anything.