Author: Tord Romstad
Date: 04:02:05 10/20/04
Go up one level in this thread
On October 20, 2004 at 02:21:26, martin fierz wrote: >On October 19, 2004 at 10:34:39, Tord Romstad wrote: > >>On October 19, 2004 at 04:15:19, martin fierz wrote: >> >>>On October 18, 2004 at 22:10:48, Zach Wegner wrote: >>> >>>>Going back into the main search is the cheap way out, IMO. >>> >>>i disagree. going back into the main search is the right way out IMO. let's say >>>you duplicate your code in the qsearch for the case you're in check as you >>>suggest. then you change something in the way you handle in-checks. => you have >>>to change it in two places. a very bad idea... >> >>I agree with Zach here. There is really not a lot of code that needs to be >>duplicated in the qsearch anyway. In both of my engines, the only special >>code for handling situations where the side to move is in check in the >>qsearch is that all legal moves are generated (rather than just captures, >>promotions and checks), and that returning a stand pat score is not allowed. >> >>>the speed gain you get for your version is probably tiny - i admit that it will >>>be faster. >> >>The speed gain could be quite big (at least in some positions) for engines >>which extend single replies to checks. If you call the main search from the >>qsearch when the side to move is in check, there is a risk that there is >>only a single legal move, and that this move will be extended. This means >>that you will stay in the main search for yet another ply, and search >>all moves rather than just captures for one more ply _after_ the check >>evasion. This can be quite expensive. It will probably help you find >>some tactics more quickly, but I doubt that it is worth the cost. > >i do extend single replies, but in fact my feeling is that the behavior you >described is a feature and not a bug :-) Why? To me this 'feature' does not just sound very expensive, but also not very logical. It makes some sense to search checks (or at least checks which do not lose material) in the qsearch at a node directly following a single reply to check, especially if all previous moves in the qsearch have been checks and check evasions (I do this, but I have some additional restrictions in order to prevent search explosions). I don't think it makes much sense to search *all* legal moves at such a node, though. Consider a node several plies into the qsearch. It is quite likely that the current path in the qsearch consists entirely of stupid captures, and that one or both sides had better moves (moves of a kind which is not searched in the qsearch) along the way. Suddenly, we enter a node where the side to move is in check and has only a single legal move. At the node *after* the check evasion, you search all legal moves, including losing captures and even non-capturing, non-checking moves which just hang a piece. Why does it make more sense to search all moves here than in the previous plies of the qsearch? >perhaps you're right though and i should give it a try. I think you should. I am fairly sure it would be an improvement, in tactical test suites as well as in real games (at least if you search safe checks at the node following a single reply to check, like I described above). Tord
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.