singular moves

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

Daniel Shawul
Posts: 4185
Joined: Tue Mar 14, 2006 11:34 am
Location: Ethiopia

singular moves

Post by Daniel Shawul »

if singular move extensions do work, why do we spend time
proving that the most obvious singular moves (single reply to check
and recapture extenensions) are useless ? Or is it that the non-obvious
singular moves (may be non-captures found by shallow search) are more important
than the obvious ones ? We usually don't reduce the obvious singular moves. Most
don't reduce the first move or captures. So extending those could be redundant in a way
because we never reduce them in the first place. But singular non-captures could get reduced.
Another form of favouring singular moves, could be to reduce all but the singular move.
For example when you have a winning capture (foretold by SEE) then reduce the rest of the moves
by a ply. I presume extending the singular winning capture, and doing nothing on the rest should
give the same effect. But again captures are never reduced by LMR so this extention/reduction could
be redundant. My question is if LMR changed the picture regarding singular moves.

I am also not convinced if the two methods, extending the singular move AND reducing all but the singular moves,
have the same effect. Simplest case is the single reply to check extension. Here we can not use the second method
because we only have one move, so we end up doing nothing. But in the first case we may search a d+1 sub tree.
So the trees searched by the two methods are different. If that happens at the root, it is like doing a d+1 ID ,but not
otherwise. This simple case study made me think that the above methods of doing selectivity may not give similar results when
we have a few moves ?? Doing selectivity (pruning/extensions) for the first few moves and later moves may have a different
effect, basically becuase the differnce in size of sub-treees under those moves is significantly different.
So may be reducing non-singular moves when we have a singlular move is an idea worth testing.

I appreciate your thoughts.

Daniel
bob
Posts: 20943
Joined: Mon Feb 27, 2006 7:30 pm
Location: Birmingham, AL

Re: singular moves

Post by bob »

Daniel Shawul wrote:if singular move extensions do work, why do we spend time
proving that the most obvious singular moves (single reply to check
and recapture extenensions) are useless ? Or is it that the non-obvious
singular moves (may be non-captures found by shallow search) are more important
than the obvious ones ? We usually don't reduce the obvious singular moves. Most
don't reduce the first move or captures. So extending those could be redundant in a way
because we never reduce them in the first place. But singular non-captures could get reduced.
Another form of favouring singular moves, could be to reduce all but the singular move.
For example when you have a winning capture (foretold by SEE) then reduce the rest of the moves
by a ply. I presume extending the singular winning capture, and doing nothing on the rest should
give the same effect. But again captures are never reduced by LMR so this extention/reduction could
be redundant. My question is if LMR changed the picture regarding singular moves.

I am also not convinced if the two methods, extending the singular move AND reducing all but the singular moves,
have the same effect. Simplest case is the single reply to check extension. Here we can not use the second method
because we only have one move, so we end up doing nothing. But in the first case we may search a d+1 sub tree.
So the trees searched by the two methods are different. If that happens at the root, it is like doing a d+1 ID ,but not
otherwise. This simple case study made me think that the above methods of doing selectivity may not give similar results when
we have a few moves ?? Doing selectivity (pruning/extensions) for the first few moves and later moves may have a different
effect, basically becuase the differnce in size of sub-treees under those moves is significantly different.
So may be reducing non-singular moves when we have a singlular move is an idea worth testing.

I appreciate your thoughts.

Daniel
This is about moves, rather than trees. Some moves ought to be extended. Some should not. How you implement that is a personal choice. You can choose to reduce the moves that should not be extended, and not reduce the rest, which gives you an effect just like extending some and not extending others.

We are (today) doing a 3-level approach. We extend some moves a lot. Others less. Others not at all. We make this happen by really extending some, not extending or reducing some, and reducing the rest, giving us three classes of moves.

I did not find any use for the single-reply-to-check extension and have not been using anything except for a "check" extension for a couple of years. Singular extensions are a completely different topic from this, as one-legal-reply is a very narrow subset of the entire class of "singular moves".
Daniel Shawul
Posts: 4185
Joined: Tue Mar 14, 2006 11:34 am
Location: Ethiopia

Re: singular moves

Post by Daniel Shawul »

I think it is a fair question to ask ,given that three of the most straightforward and _best_ singular type moves
(single reply to check,forced re-capture, winning captures ) do not give much benefit if at all. I dont know if
more of inferior singular moves will be better. Say extending singular move better than the rest by a margin of a
half pawn or so. The only reason I can think of why this should work, is extending non-capture singular moves
is not redundant with LMR. The three special cases I mentioned above never get reduced by LMR , so extending them
could be too much, and may be thats why they don't give a lot of improvement in practice.
We are (today) doing a 3-level approach. We extend some moves a lot. Others less. Others not at all. We make this happen by really extending some, not extending or reducing some, and reducing the rest, giving us three classes of moves.

I did not find any use for the single-reply-to-check extension and have not been using anything except for a "check" extension for a couple of years. Singular extensions are a completely different topic from this, as one-legal-reply is a very narrow subset of the entire class of "singular moves".
I agree that the effect is similar but not exactly the same. I am of the opinion that the extending the singular move
could result in more work for the same effect. It is obvious for the single reply to check. We can extend that further to
say when we have 6 moves.First one takes 10000 nodes, the rest take 100 nodes each. Now extending the first move (1st option)
is much more work than reducing the rest of the moves 5 moves by one ply (2nd option). They both achieve the same effect of
favoring the singular move.
bob
Posts: 20943
Joined: Mon Feb 27, 2006 7:30 pm
Location: Birmingham, AL

Re: singular moves

Post by bob »

Daniel Shawul wrote:I think it is a fair question to ask ,given that three of the most straightforward and _best_ singular type moves
(single reply to check,forced re-capture, winning captures ) do not give much benefit if at all. I dont know if
more of inferior singular moves will be better. Say extending singular move better than the rest by a margin of a
half pawn or so. The only reason I can think of why this should work, is extending non-capture singular moves
is not redundant with LMR. The three special cases I mentioned above never get reduced by LMR , so extending them
could be too much, and may be thats why they don't give a lot of improvement in practice.
We are (today) doing a 3-level approach. We extend some moves a lot. Others less. Others not at all. We make this happen by really extending some, not extending or reducing some, and reducing the rest, giving us three classes of moves.

I did not find any use for the single-reply-to-check extension and have not been using anything except for a "check" extension for a couple of years. Singular extensions are a completely different topic from this, as one-legal-reply is a very narrow subset of the entire class of "singular moves".
I agree that the effect is similar but not exactly the same. I am of the opinion that the extending the singular move
could result in more work for the same effect. It is obvious for the single reply to check. We can extend that further to
say when we have 6 moves.First one takes 10000 nodes, the rest take 100 nodes each. Now extending the first move (1st option)
is much more work than reducing the rest of the moves 5 moves by one ply (2nd option). They both achieve the same effect of
favoring the singular move.
Here's a question to ponder. Program A extends checks by 1 ply. And nothing else. Program B reduces everything but checks by 1 ply. How do they compare?

If you use a depth-limited match, A wins hands down. But if you use a timed match, they play identically. B will reach a deeper depth, but it will be no more accurate than the depth A reaches in the same time.

That was the point of my comments. You can extend, or reduce, or do nothing, which is exactly the same as extending 2, extending 1 or doing nothing. The depths will differ, but in the same time, they will all coverge to exactly the same score and PV (hash issues notwithstanding, of course).

There are lots of other classes of singular moves besides the ones you mention. In fact, the ones you mention were _specifically_ excluded in the DB singular extensions paper. You don't want to extend recaptures. Those are non-interesting. If the recap is not best, you are already screwed. But what about the subtle moves that create a threat that leave you with just one way to defend against it? That "one way to defend" move is interesting and needs to be searched deeper to see if it _really_ defends or just postpones.
Uri Blass
Posts: 10281
Joined: Thu Mar 09, 2006 12:37 am
Location: Tel-Aviv Israel

Re: singular moves

Post by Uri Blass »

bob wrote:
Daniel Shawul wrote:if singular move extensions do work, why do we spend time
proving that the most obvious singular moves (single reply to check
and recapture extenensions) are useless ? Or is it that the non-obvious
singular moves (may be non-captures found by shallow search) are more important
than the obvious ones ? We usually don't reduce the obvious singular moves. Most
don't reduce the first move or captures. So extending those could be redundant in a way
because we never reduce them in the first place. But singular non-captures could get reduced.
Another form of favouring singular moves, could be to reduce all but the singular move.
For example when you have a winning capture (foretold by SEE) then reduce the rest of the moves
by a ply. I presume extending the singular winning capture, and doing nothing on the rest should
give the same effect. But again captures are never reduced by LMR so this extention/reduction could
be redundant. My question is if LMR changed the picture regarding singular moves.

I am also not convinced if the two methods, extending the singular move AND reducing all but the singular moves,
have the same effect. Simplest case is the single reply to check extension. Here we can not use the second method
because we only have one move, so we end up doing nothing. But in the first case we may search a d+1 sub tree.
So the trees searched by the two methods are different. If that happens at the root, it is like doing a d+1 ID ,but not
otherwise. This simple case study made me think that the above methods of doing selectivity may not give similar results when
we have a few moves ?? Doing selectivity (pruning/extensions) for the first few moves and later moves may have a different
effect, basically becuase the differnce in size of sub-treees under those moves is significantly different.
So may be reducing non-singular moves when we have a singlular move is an idea worth testing.

I appreciate your thoughts.

Daniel
This is about moves, rather than trees. Some moves ought to be extended. Some should not. How you implement that is a personal choice. You can choose to reduce the moves that should not be extended, and not reduce the rest, which gives you an effect just like extending some and not extending others.

We are (today) doing a 3-level approach. We extend some moves a lot. Others less. Others not at all. We make this happen by really extending some, not extending or reducing some, and reducing the rest, giving us three classes of moves.

I did not find any use for the single-reply-to-check extension and have not been using anything except for a "check" extension for a couple of years. Singular extensions are a completely different topic from this, as one-legal-reply is a very narrow subset of the entire class of "singular moves".
I wonder if you try to restrict the single reply to check to part of the cases.

For example you may restrict it to the cases when the side that reply to check(I will call him the defender) is not losing based on evaluation after the single reply(evaluation not more than 2 pawns against the defender after the single reply)

The point is that if the defender is already losing then this evaluation
is not going to be changed most of the time so extending is a waste of time and you may extend some simple winning endgames of many pieces against a single king because of checks that force the next move of the weaker side.

I think that it is better also not to have the check extension in these cases
and it is better to have check extension only if the attacker is not obviously winning.

Uri
metax
Posts: 344
Joined: Wed Sep 23, 2009 5:56 pm
Location: Germany

Re: singular moves

Post by metax »

bob wrote:That was the point of my comments. You can extend, or reduce, or do nothing, which is exactly the same as extending 2, extending 1 or doing nothing. The depths will differ, but in the same time, they will all coverge to exactly the same score and PV (hash issues notwithstanding, of course).
Are you sure they will converge to the same score and PV? For example, Program B would have a lower branching factor, wouldn't it? So with increasing time, wouldn't Program B get an advantage slowly?
Sven
Posts: 4052
Joined: Thu May 15, 2008 9:57 pm
Location: Berlin, Germany
Full name: Sven Schüle

Re: singular moves

Post by Sven »

metax wrote:
bob wrote:That was the point of my comments. You can extend, or reduce, or do nothing, which is exactly the same as extending 2, extending 1 or doing nothing. The depths will differ, but in the same time, they will all coverge to exactly the same score and PV (hash issues notwithstanding, of course).
Are you sure they will converge to the same score and PV? For example, Program B would have a lower branching factor, wouldn't it? So with increasing time, wouldn't Program B get an advantage slowly?
In Bob's example, program A would do the same search in iteration N that is done in iteration N+1 by program B. So I can't see any difference in branching factor.

Sven
Daniel Shawul
Posts: 4185
Joined: Tue Mar 14, 2006 11:34 am
Location: Ethiopia

Re: singular moves

Post by Daniel Shawul »

Two points to consider.
a) The extension/reductions are not necessarily done at the root. Program B's N+1 th iteration
will be same as A's Nth below the node where selectivity is applied. When B does its N+1 th iteration
it spends more work on other parts of the tree first, then when it reaches that node where selectivity is
applied everything below will be similar. B's N+1 th iteration is D + 1 _everywhere_ and D at reduced moves,
and A's Nth iteration D everywhere, and D + 1 only at the check move.
I think A's way of doing it is more aggressive and hence why
it sometimes leads to tree explosions.

b) As I tried to point out with the specific case of single reply to check, if we simplify Program A and B's behaviour to the
absurd, Program A's behaviour will be to extend single replies, and Program B's is to do nothing. We already
know that Program A will have higher BF with the extension (at least for me). The reason why we been doing it is that
the selectivity will result in a better search overall. Note here that if the single reply extension was done only at the
root, the behaviour would have been the same.Taking this further, where the good moves take a lot more nodes than the bad ones (which is usually the case),
similar behaviour could be found.
Sven
Posts: 4052
Joined: Thu May 15, 2008 9:57 pm
Location: Berlin, Germany
Full name: Sven Schüle

Re: singular moves

Post by Sven »

Daniel Shawul wrote:Two points to consider.
a) The extension/reductions are not necessarily done at the root. Program B's N+1 th iteration
will be same as A's Nth below the node where selectivity is applied. When B does its N+1 th iteration
it spends more work on other parts of the tree first, then when it reaches that node where selectivity is
applied everything below will be similar. B's N+1 th iteration is D + 1 _everywhere_ and D at reduced moves,
and A's Nth iteration D everywhere, and D + 1 only at the check move.
I think A's way of doing it is more aggressive and hence why
it sometimes leads to tree explosions.

b) As I tried to point out with the specific case of single reply to check, if we simplify Program A and B's behaviour to the
absurd, Program A's behaviour will be to extend single replies, and Program B's is to do nothing. We already
know that Program A will have higher BF with the extension (at least for me). The reason why we been doing it is that
the selectivity will result in a better search overall. Note here that if the single reply extension was done only at the
root, the behaviour would have been the same.Taking this further, where the good moves take a lot more nodes than the bad ones (which is usually the case),
similar behaviour could be found.
Maybe you misread or misunderstood Bob's example:
Bob wrote:Here's a question to ponder. Program A extends checks by 1 ply. And nothing else. Program B reduces everything but checks by 1 ply. How do they compare?
So iteration N of program A does depth N+1 if there is one check on the move path, and depth N everywhere else (I don't care about move paths with more than one check here). Iteration N+1 of program B does depth N+1 for the non-reduced checks, and depth N everywhere else. I can only see a difference for some leaf nodes where the last move gives check but program B does not extend checks. This should not make a huge difference - but o.k., it is not 100% perfectly the same search. At least the overall number of nodes searched by A and B would be very close, so A would finish N roughly when B finishes N+1.

@Bob: I hope I have interpreted your example correctly.

Sven
Daniel Shawul
Posts: 4185
Joined: Tue Mar 14, 2006 11:34 am
Location: Ethiopia

Re: singular moves

Post by Daniel Shawul »

So iteration N of program A does depth N+1 if there is one check on the move path, and depth N everywhere else (I don't care about move paths with more than one check here). Iteration N+1 of program B does depth N+1 for the non-reduced checks, and depth N everywhere else. I can only see a difference for some leaf nodes where the last move gives check but program B does not extend checks. This should not make a huge difference - but o.k., it is not 100% perfectly the same search. At least the overall number of nodes searched by A and B would be very close, so A would finish N roughly when B finishes N+1.
I think you should look into both of my comments more carefully. It is not specific to checking moves rather to all singular moves. The question is when you have a singular move , do you want to extend that singular move or reduce every other move on that node ? I tried to point out the behavior is the same if the singular move is at the root (no other selectivity below it). Program B searches same tree at its N+1th iteration as B does at its N.

If I understand correctly, when Bob says everywhere he is talking about nodes where you have a singular move. It doesn't make sense to reduce moves at a node where there is no singular move. I suspect the search would degenerate into nothing if you reduce every non-singular move at every node.