Author: Alessandro Scotti
Date: 07:31:05 08/24/04
Go up one level in this thread
On August 24, 2004 at 09:37:27, Tord Romstad wrote: >As far as I can see, you should't need to do any such thing. It should >be perfectly safe to return mate scores in the qsearch, and there is >no need to do an "if(isMate(result)) ..." after the qsearch returns. >The mate score should be handled exactly like all other scores. > >I can't see how this could give rise to incorrect mate scores at the root. >You probably have a bug somewhere. I have run the program thru several hundred test positions and it's the first time I noticed this behavior. This is the position (from IQ3, id "8...") which made me suspect: 3r1r2/p4pk1/bp2p1P1/4P2p/Pq1N1P2/2p4Q/2P3P1/3RK2R w - - bm Qxh5; ... PV: 6 2915 85 0 Qxh5 Rd7 gxf7 Re8 fxe8=Q Qb3 Qxd7+ Kf8 PV: 6 19987 85 0 Qxh5 Be2 Nxe6+ Kg8 gxf7+ Rxf7 Rxd8+ Rf8 Rxf8+ Qxf8 PV: 6 1570 85 0 Qxh5 Be2 Nxe6+ Kg8 gxf7+ Rxf7 Rxd8+ Rf8 Qg6+ PV: 7 19989 85 0 Qxh5 Be2 Nxe6+ Kg8 gxf7+ Rxf7 Rxd8+ Rf8 Qg6+ PV: 7 19989 87 0 Qxh5 Rh8 Nxe6+ fxe6 Rd7+ Qe7 Rxe7+ Kf8 Rf7+ Ke8 => OK Here I noticed that after having found a mate in 7 (=19987) the programs then gets a score of 1570 when it raises the bar and starts looking for a mate in 6. The fact that it actually finds the mate is misleading, because the "mate in 7" score is a lower bound and you should never fall below that. Moreover, if I play with engine parameters sometimes I am able to get a wrong move at the root, e.g. Qf5 mate in 6. I tracked the cause to the quiescence search returning mate, where it doesn't actually explore all the possible variations. If I eliminate mate scores from the quiesce search I now get: PV: 6 195 20 0 Qh4 Qxd4 Qf6+ Kg8 gxf7+ Rxf7 Qxd8+ Qxd8 Rxd8+ Kg7 PV: 6 200 26 0 Qxh5 Rb8 gxf7 Qe7 Rh3 Rfd8 Rxc3 PV: 7 1165 75 0 Qxh5 Rh8 Nxe6+ fxe6 Rd7+ Qe7 Rxe7+ Kf8 g7+ Kxe7 ...score raises PV: 7 2720 110 0 Qxh5 Rc8 gxf7 Qb3 cxb3 Bc4 bxc4 Rce8 fxe8=Q PV: 7 19987 110 0 Qxh5 Rc8 gxf7 Qb3 cxb3 Rfe8 Qg4+ Kf8 Rh8+ Ke7 PV: 7 19989 112 0 Qxh5 Rh8 Nxe6+ fxe6 Rd7+ Qe7 Rxe7+ Kf8 Qxh8+ Kxe7 I like this a lot more! Also, changing parameters doesn't seem to matter much anymore. I might as well have other bugs somewhere, I have found so many so far that I wouldn't be surprised at all!
This page took 0 seconds to execute
Last modified: Thu, 15 Apr 21 08:11:13 -0700
Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.