Revisiting Check Extensions

Discussion of chess software programming and technical issues.

Moderators: bob, hgm, Harvey Williamson

Forum rules
This textbox is used to restore diagrams posted with the [d] tag before the upgrade.
bob
Posts: 20665
Joined: Mon Feb 27, 2006 6:30 pm
Location: Birmingham, AL

Re: Revisiting Check Extensions

Post by bob » Fri Jun 08, 2007 3:25 pm

mjlef wrote:Most programs I have seen seem to extend checks exactly one full ply. Some also extend one reply to checks another full ply (or sometimes less). A very few use an extession of 3/4 a ply. In my continuing experiments in my program, I have tried to come up with different criteria, and in testing they seem to help.

First I divide moves into capture and promotions, or non captures.

For promotions/captures, I use the results of an SEE to determine if the piece moving is being lost. Losing captures get a reduced extension (1/4 a ply to 1/2 a ply seems OK). Winning and equal captures get a full ply extension. I have also experimented with losing up to a pawn or material; getting the full ply extenion. Also, i have epxerimented with varying the extnsion depending on if it is a PV node (non-PV nodes get a lesser extension, but if they become PV nodes, get extended a full ply).

For non-captures, I do something similar (of course, the move is either equal or losing). Losing captures get a smaller extension.

My best tests so far suggest moves losing more than 1.5 pawns of material get no extension. Moves losing less material get 1/4 to 1/2 a ply, and winning or equal moves get a full ply. Ptrobably winning capture checks deserve more than a ply but I have not done enough testing to know for sure.

The goals of all of this is to shape the search tree, so moves with a higher probability of being best have more search under them, and moves likely to be bad, samller trees.

Has anyone revisited this issue, and is there something better than "always a full ply"?

Mark
Basing this on material has a couple of dangers:

(1) if you don't extend checks that lose material, what happens to you on positions like WAC 141 where the key move tosses the queen for no apparent gain?

(2) if you are well ahead, not extending also has a down-side. Suppose you grabbed what appeared to be a hanging rook (I will include a FEN below from the 1981 game between belle and Cray Blitz where we were running in "batch mode" and without pondering, and played what appeared to be an "easy move" that won material but was a losing move if searched a little deeper) and by not extending any checks below that, you let yourself horizon the ultimate loss away and you just grab the rook.

There are good reasons to not extend here and there, but I am not sure that basing the decision just on material is good enough. Here's the B-CB FEN:

5r1k/6p/1n2Q2p/4p//7P/PP4PK/R1B1q/ w

Qxb6 is bad. Bxh6 is a forced draw. Doesn't take long for today's programs to discover that Qxb6 is unplayable (unless you play at an ICC-like 1+0 time control maybe). But what does your material limit do to the depth required to avoid Qxb6???

Tony

Re: Revisiting Check Extensions

Post by Tony » Fri Jun 08, 2007 3:50 pm

[D]5r1k/6p1/1n2Q2p/4p3/8/7P/PP4PK/R1B1q3 w - 0 1

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

Re: Revisiting Check Extensions

Post by bob » Fri Jun 08, 2007 4:03 pm

Tony wrote:[D]5r1k/6p1/1n2Q2p/4p3/8/7P/PP4PK/R1B1q3 w - 0 1
Didn't even think about the diagram ability. :)

thanks...

Tony

Re: Revisiting Check Extensions

Post by Tony » Fri Jun 08, 2007 7:28 pm

It took me 6 tries I think (after try 3 it became personal), so I don't use it that often either :)

Tony

mjlef
Posts: 1431
Joined: Thu Mar 30, 2006 12:08 pm
Contact:

Re: Revisiting Check Extensions

Post by mjlef » Sat Jun 09, 2007 8:04 pm

bob wrote:
mjlef wrote:
Basing this on material has a couple of dangers:

(1) if you don't extend checks that lose material, what happens to you on positions like WAC 141 where the key move tosses the queen for no apparent gain?
I see no reason why people here keep giving single exceptional positions when new ideas are presented. Of course you can find expections to rules and find some positions where the rule might not work as well as what had been done before. What I quoted was my results in hundreds of real games. Of course some sacrifical checks can lead to wins, but overall, the extra search depth of not extending on them so much seemed to help Now. Tossing queens away is generally foolish. Instead of citing single examples, how about some test runs in games?

I frankly think most tactical test sets are not very useful in making programs play better. Most are loaded with "lets throw away a lot of pieces and force a mate in an unexpected way". I have extensive tests and statistics I have gathered and they show most sacrifices are just sacrifices and lead to bad play. Isn't that how most programs qsearch works... apparently losing moves are tossed? My past obsessions with trying to do better on tactical test sets probably never lead to a program strength increase. Although some changes, say in speeding up a move generator or evaluation, can use a tactical test to show an increase.

I am not trying be critical...I just have grown slightly tired of people implying one example disproves a larger idea. I do find some examples very useful, and I encourage them...but I would really prefer replies like "I tried your idea back in 1995 and my program did not benefit, as these test results show...."

Mark

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

Re: Revisiting Check Extensions

Post by bob » Sat Jun 09, 2007 9:59 pm

mjlef wrote:
bob wrote:
mjlef wrote:
Basing this on material has a couple of dangers:

(1) if you don't extend checks that lose material, what happens to you on positions like WAC 141 where the key move tosses the queen for no apparent gain?
I see no reason why people here keep giving single exceptional positions when new ideas are presented. Of course you can find expections to rules and find some positions where the rule might not work as well as what had been done before. What I quoted was my results in hundreds of real games. Of course some sacrifical checks can lead to wins, but overall, the extra search depth of not extending on them so much seemed to help Now. Tossing queens away is generally foolish. Instead of citing single examples, how about some test runs in games?

I frankly think most tactical test sets are not very useful in making programs play better. Most are loaded with "lets throw away a lot of pieces and force a mate in an unexpected way". I have extensive tests and statistics I have gathered and they show most sacrifices are just sacrifices and lead to bad play. Isn't that how most programs qsearch works... apparently losing moves are tossed? My past obsessions with trying to do better on tactical test sets probably never lead to a program strength increase. Although some changes, say in speeding up a move generator or evaluation, can use a tactical test to show an increase.

I am not trying be critical...I just have grown slightly tired of people implying one example disproves a larger idea. I do find some examples very useful, and I encourage them...but I would really prefer replies like "I tried your idea back in 1995 and my program did not benefit, as these test results show...."

Mark
I'm not giving "single exceptions". I just gave you _one_ position.. How many would you like? The majority of chess combinations are based on a sacrificial theme don't forget. And those are the very positions where you need to be sure that you are really material ahead, or material behind, not use either of those as a justification for not looking deeper.

That was my point. Search however you want of course... But there are risks.

mjlef
Posts: 1431
Joined: Thu Mar 30, 2006 12:08 pm
Contact:

Re: Revisiting Check Extensions

Post by mjlef » Sun Jun 10, 2007 7:34 am

bob wrote:
mjlef wrote:
bob wrote:
mjlef wrote:
Basing this on material has a couple of dangers:

(1) if you don't extend checks that lose material, what happens to you on positions like WAC 141 where the key move tosses the queen for no apparent gain?
I see no reason why people here keep giving single exceptional positions when new ideas are presented. Of course you can find expections to rules and find some positions where the rule might not work as well as what had been done before. What I quoted was my results in hundreds of real games. Of course some sacrifical checks can lead to wins, but overall, the extra search depth of not extending on them so much seemed to help Now. Tossing queens away is generally foolish. Instead of citing single examples, how about some test runs in games?

I frankly think most tactical test sets are not very useful in making programs play better. Most are loaded with "lets throw away a lot of pieces and force a mate in an unexpected way". I have extensive tests and statistics I have gathered and they show most sacrifices are just sacrifices and lead to bad play. Isn't that how most programs qsearch works... apparently losing moves are tossed? My past obsessions with trying to do better on tactical test sets probably never lead to a program strength increase. Although some changes, say in speeding up a move generator or evaluation, can use a tactical test to show an increase.

I am not trying be critical...I just have grown slightly tired of people implying one example disproves a larger idea. I do find some examples very useful, and I encourage them...but I would really prefer replies like "I tried your idea back in 1995 and my program did not benefit, as these test results show...."

Mark
I'm not giving "single exceptions". I just gave you _one_ position.. How many would you like? The majority of chess combinations are based on a sacrificial theme don't forget. And those are the very positions where you need to be sure that you are really material ahead, or material behind, not use either of those as a justification for not looking deeper.

That was my point. Search however you want of course... But there are risks.
The number of examples is rather meanlingless unless placed in the context of real games. Losing captures are rarely the best move in a position. My stats gathered from thousands of searches show about 0.1% of the time are losing cpatures the best move, on average compared with over 70% of the time for winning captures. Losing capture checks have similar stats. What is important is is the increase in nodes under the extension point worth the extra effort expended. Is it likely to change the PV?

I think some good rules could be included to allow some extensions fo losing captures. Right now I do extend losing capture slightly if they lose les then 1.5 pawns. A sacrifice exposing the opponent king could be worth extending even if it loses material, and that is something I am testing. Maybe always extend check on expected PV nodes makes sense. My goal is not to do well in tactical combinations. It is to do well in real games.

I know many programmers say "always extend all checks"...but why do they say that and what data do they have to back it up?

Mark

Uri Blass
Posts: 8650
Joined: Wed Mar 08, 2006 11:37 pm
Location: Tel-Aviv Israel

Re: Revisiting Check Extensions

Post by Uri Blass » Sun Jun 10, 2007 7:46 am

Note that I have pruning based on evaluation when the remaining depth is small so checks that lose matrial and extended can be pruned later in the search.

Uri

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

Re: Revisiting Check Extensions

Post by bob » Sun Jun 10, 2007 3:25 pm

mjlef wrote:
bob wrote:
mjlef wrote:
bob wrote:
mjlef wrote:
Basing this on material has a couple of dangers:

(1) if you don't extend checks that lose material, what happens to you on positions like WAC 141 where the key move tosses the queen for no apparent gain?
I see no reason why people here keep giving single exceptional positions when new ideas are presented. Of course you can find expections to rules and find some positions where the rule might not work as well as what had been done before. What I quoted was my results in hundreds of real games. Of course some sacrifical checks can lead to wins, but overall, the extra search depth of not extending on them so much seemed to help Now. Tossing queens away is generally foolish. Instead of citing single examples, how about some test runs in games?

I frankly think most tactical test sets are not very useful in making programs play better. Most are loaded with "lets throw away a lot of pieces and force a mate in an unexpected way". I have extensive tests and statistics I have gathered and they show most sacrifices are just sacrifices and lead to bad play. Isn't that how most programs qsearch works... apparently losing moves are tossed? My past obsessions with trying to do better on tactical test sets probably never lead to a program strength increase. Although some changes, say in speeding up a move generator or evaluation, can use a tactical test to show an increase.

I am not trying be critical...I just have grown slightly tired of people implying one example disproves a larger idea. I do find some examples very useful, and I encourage them...but I would really prefer replies like "I tried your idea back in 1995 and my program did not benefit, as these test results show...."

Mark
I'm not giving "single exceptions". I just gave you _one_ position.. How many would you like? The majority of chess combinations are based on a sacrificial theme don't forget. And those are the very positions where you need to be sure that you are really material ahead, or material behind, not use either of those as a justification for not looking deeper.

That was my point. Search however you want of course... But there are risks.
The number of examples is rather meanlingless unless placed in the context of real games. Losing captures are rarely the best move in a position. My stats gathered from thousands of searches show about 0.1% of the time are losing cpatures the best move, on average compared with over 70% of the time for winning captures. Losing capture checks have similar stats. What is important is is the increase in nodes under the extension point worth the extra effort expended. Is it likely to change the PV?

I think some good rules could be included to allow some extensions fo losing captures. Right now I do extend losing capture slightly if they lose les then 1.5 pawns. A sacrifice exposing the opponent king could be worth extending even if it loses material, and that is something I am testing. Maybe always extend check on expected PV nodes makes sense. My goal is not to do well in tactical combinations. It is to do well in real games.

I know many programmers say "always extend all checks"...but why do they say that and what data do they have to back it up?

Mark
lots of games and observations to "back that up". Just because you don't play many sacrifices in real games doesn't mean your search doesn't have to deal with them. In general, any sacrifice can be properly defended against, if you see/recognize it quickly enough and don't wait until it is actually played/playable. So just because you don't play them (or see them) very often doesn't mean that you are not searching/evaluating/dismissing them in the search somewhere.

Simple test is to run a test suite (WAC is an easy one) and see how your changes affect things there. I do this frequently when I am modifying the search, as what appear to be inconsequential changes sometimes totally wreck the tactical quality of the search.

Note that if you are doing LMR, then you are actually extending checks without extending them, since nobody (that I know of) reduces a check, which is the same thing as extending the thing since other moves are reduced.

Post Reply