Checks and move ordering

Discussion of chess software programming and technical issues.

Moderators: Harvey Williamson, bob, hgm

Forum rules
This textbox is used to restore diagrams posted with the [d] tag before the upgrade.
User avatar
Posts: 25009
Joined: Fri Mar 10, 2006 9:06 am
Location: Amsterdam
Full name: H G Muller

Re: Checks and move ordering

Post by hgm » Tue May 01, 2007 4:58 pm

Well, for any extension one can find positions where the extension helps. That doesn't really prove anything. The question is how often such positions occur in the tree, and in how many cases you would do the extension in vain, drawing away valuable resources from the rest of the search.

Even in the example you give the example works both ways: the engine will abandon Rxh7 at lower depth when it uses the check-extension, but once you pass the depth where it switches, you will find everything else much more slowly. Because the branches where the King has to walk upto the Rook to make further checking impossible so it can finally capture the trapped Bishop remains extended by many ply, even though it has become a totally irrelevant branch once you decide that the checks cannot prevent the loss of the Bishop. In general there can be many lines that contain such useless delays of one or two intervening checking moves, and they will all remain extended.

The problem in this position is that at the horizon the threat against the Bishop still exists why you are checking. The best solution would be to extend in QS only, as long as is needed to resolve the threat or decide it is a perpetual. But when you can resolve that within the normal horizon, the reason to extend disappears.

Posts: 20918
Joined: Mon Feb 27, 2006 6:30 pm
Location: Birmingham, AL

Re: Checks and move ordering

Post by bob » Tue May 01, 2007 9:08 pm

jwes wrote:I have been working on my move generator and now I know if a move gives check before I make it. Now I am wondering how I should use this information in move ordering, e.g. should a winning capture that gives check be tried ahead of winning captures that appear to gain more material, or should discoverd checks be tried ahead of all other moves, etc. I would be interested to hear what experiences others have with this.
Hard to say. The general rule of thumb at any node is that you want to try the move that will produce a score at least good enough to fail high, while requiring the least amount of work. A check rarely fits this latter part since it results in a search extension that makes that sub-tree larger.

Post Reply