about researches

Discussion of chess software programming and technical issues.

Moderator: Ras

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

Re: about researches

Post by bob »

Daniel Shawul wrote:a) I believe score > alpha is appropriate, because the move has exceeded the best expectation for an assumed fail low node. Why does it have to exceed beta too? I always understood this decision of using beta instead of alpha as a way to avoid many researches.
For a non-pv node they are the same as I have already mentioned.

b) if you do two or more reductions, how do you do the research? By retrieving the whole depth at once Or incrementing it by a small amount.
Doing the first one at the root really made it weaker, hence my question.

c)
I tested both ways, and settled on just one drop, back to the nominal depth. But the only reduction values I use currently are 1 and 2. It _might_ make a difference at 3/4 and beyond, which I am going to work on pretty shortly.
Daniel Shawul
Posts: 4186
Joined: Tue Mar 14, 2006 11:34 am
Location: Ethiopia

Re: about researches

Post by Daniel Shawul »

Again read that same line, you get the reason.
I have no reason to change the order inside tree. What is done at the root should work there too. But the fact that we have very few pv nodes in there makes things unmeasurable which is why i left it as it is. But I did notice the significance of doing things correctly at the root.
To spell it out for you :
-Very few pv nodes means. Most of the time we have only researches due to redcution. You only do researches due to zero windows, at PV nodes.
So most of the time you have only depth researches. Only at PV nodes you need to take care of which to do first.
-I also said I got unmeasurable ELO difference so I left it in there

So is that not reason enough for you ?
Daniel Shawul
Posts: 4186
Joined: Tue Mar 14, 2006 11:34 am
Location: Ethiopia

Re: about researches

Post by Daniel Shawul »

c. On a reduced move that returns v >= beta, re-search without reduction. Certainly before you try the wide window re-search which. Re-searching the null-window first would be pointless. You could not trust it if it fails high, until you restore the depth. So start there first to avoid wasted time.
Not necessarily. ZW researches are done when v > alpha, but reduced depth
researches are done in either of them v > alpha or b >= beta , depending on how aggressively you want to research, in your case also reason of longer pv.

If you use v >= beta for reduction researches, you can not be sure whether a move which failed high searched with a ZW (i.e v > alpha),
will necessarily make it above beta too. So in this scenario, you can decide to do any of them first or even combine them if you will...
bob
Posts: 20943
Joined: Mon Feb 27, 2006 7:30 pm
Location: Birmingham, AL

Re: about researches

Post by bob »

Daniel Shawul wrote:Again read that same line, you get the reason.
I have no reason to change the order inside tree. What is done at the root should work there too. But the fact that we have very few pv nodes in there makes things unmeasurable which is why i left it as it is. But I did notice the significance of doing things correctly at the root.
To spell it out for you :
-Very few pv nodes means. Most of the time we have only researches due to redcution. You only do researches due to zero windows, at PV nodes.
So most of the time you have only depth researches. Only at PV nodes you need to take care of which to do first.
-I also said I got unmeasurable ELO difference so I left it in there

So is that not reason enough for you ?
Too convoluted for me. If you do something different at the root than elsewhere, and it makes no measurable difference, I would remove it. If you have something that you do at all nodes and it makes no measureable difference, I would remove it. I only keep code that helps. Every line of code tossed out eliminates one potential line of code with a present bug, or which might cause a future bug when other changes are made.

But back to the original question, I don't care about "very few PV nodes". If things are done differently at the root than at an interior node, I see no justification, particularly if there is no measurable gain. If things are done the same everywhere, then I don't see why you made the original comment...
bob
Posts: 20943
Joined: Mon Feb 27, 2006 7:30 pm
Location: Birmingham, AL

Re: about researches

Post by bob »

Daniel Shawul wrote:
c. On a reduced move that returns v >= beta, re-search without reduction. Certainly before you try the wide window re-search which. Re-searching the null-window first would be pointless. You could not trust it if it fails high, until you restore the depth. So start there first to avoid wasted time.
Not necessarily. ZW researches are done when v > alpha, but reduced depth
researches are done in either of them v > alpha or b >= beta , depending on how aggressively you want to research, in your case also reason of longer pv.

If you use v >= beta for reduction researches, you can not be sure whether a move which failed high searched with a ZW (i.e v > alpha),
will necessarily make it above beta too. So in this scenario, you can decide to do any of them first or even combine them if you will...
Already covered. I use v > alpha as I previously corrected...
Daniel Shawul
Posts: 4186
Joined: Tue Mar 14, 2006 11:34 am
Location: Ethiopia

Re: about researches

Post by Daniel Shawul »

bob wrote:
Daniel Shawul wrote:
c. On a reduced move that returns v >= beta, re-search without reduction. Certainly before you try the wide window re-search which. Re-searching the null-window first would be pointless. You could not trust it if it fails high, until you restore the depth. So start there first to avoid wasted time.
Not necessarily. ZW researches are done when v > alpha, but reduced depth
researches are done in either of them v > alpha or b >= beta , depending on how aggressively you want to research, in your case also reason of longer pv.

If you use v >= beta for reduction researches, you can not be sure whether a move which failed high searched with a ZW (i.e v > alpha),
will necessarily make it above beta too. So in this scenario, you can decide to do any of them first or even combine them if you will...
Already covered. I use v > alpha as I previously corrected...
I understand you said that but I wanted to point out this because it seems to be the cause of confusion in the other thread.
I have been using v >= beta for so long to avoid too many researches. And I was doing the window research first.

I went to v > alpha just recently when I tried to do researches at the root.
I saw too many weak moves were being accepted as if they were good just because they
were reduced with a ply or two. Before that it was no research at all which seemed
to work better than doing the research wrong, especially with multiple reduction researches..
Btw I have still not found a better reduction than 1 at the root.
Daniel Shawul
Posts: 4186
Joined: Tue Mar 14, 2006 11:34 am
Location: Ethiopia

Re: about researches

Post by Daniel Shawul »

bob wrote:
Daniel Shawul wrote:Again read that same line, you get the reason.
I have no reason to change the order inside tree. What is done at the root should work there too. But the fact that we have very few pv nodes in there makes things unmeasurable which is why i left it as it is. But I did notice the significance of doing things correctly at the root.
To spell it out for you :
-Very few pv nodes means. Most of the time we have only researches due to redcution. You only do researches due to zero windows, at PV nodes.
So most of the time you have only depth researches. Only at PV nodes you need to take care of which to do first.
-I also said I got unmeasurable ELO difference so I left it in there

So is that not reason enough for you ?
Too convoluted for me. If you do something different at the root than elsewhere, and it makes no measurable difference, I would remove it. If you have something that you do at all nodes and it makes no measureable difference, I would remove it. I only keep code that helps. Every line of code tossed out eliminates one potential line of code with a present bug, or which might cause a future bug when other changes are made.

But back to the original question, I don't care about "very few PV nodes". If things are done differently at the root than at an interior node, I see no justification, particularly if there is no measurable gain. If things are done the same everywhere, then I don't see why you made the original comment...
I covered this in the other post about v > alpha or v>=beta, but i will repeat it for consitency.
I was using v>=beta for researches at interior nodes for so long, and the ZW research first & reduction research later.
At the root , it was no reductions first but then I went to a 1 ply reduction without a research.
Just recently when I tried to use 2 or more ply reductions, I realized I have to do researches and do
it carefully for every move that updates alpha.

In short for me not everything was automatic regarding what to do at the root and interior nodes.
For example, extensions,reductions & prunings,researches and move ordering are still done differently.
I am sure you have done these things differntly in the past too..
bob
Posts: 20943
Joined: Mon Feb 27, 2006 7:30 pm
Location: Birmingham, AL

Re: about researches

Post by bob »

Daniel Shawul wrote:
bob wrote:
Daniel Shawul wrote:Again read that same line, you get the reason.
I have no reason to change the order inside tree. What is done at the root should work there too. But the fact that we have very few pv nodes in there makes things unmeasurable which is why i left it as it is. But I did notice the significance of doing things correctly at the root.
To spell it out for you :
-Very few pv nodes means. Most of the time we have only researches due to redcution. You only do researches due to zero windows, at PV nodes.
So most of the time you have only depth researches. Only at PV nodes you need to take care of which to do first.
-I also said I got unmeasurable ELO difference so I left it in there

So is that not reason enough for you ?
Too convoluted for me. If you do something different at the root than elsewhere, and it makes no measurable difference, I would remove it. If you have something that you do at all nodes and it makes no measureable difference, I would remove it. I only keep code that helps. Every line of code tossed out eliminates one potential line of code with a present bug, or which might cause a future bug when other changes are made.

But back to the original question, I don't care about "very few PV nodes". If things are done differently at the root than at an interior node, I see no justification, particularly if there is no measurable gain. If things are done the same everywhere, then I don't see why you made the original comment...
I covered this in the other post about v > alpha or v>=beta, but i will repeat it for consitency.
I was using v>=beta for researches at interior nodes for so long, and the ZW research first & reduction research later.
At the root , it was no reductions first but then I went to a 1 ply reduction without a research.
Just recently when I tried to use 2 or more ply reductions, I realized I have to do researches and do
it carefully for every move that updates alpha.

In short for me not everything was automatic regarding what to do at the root and interior nodes.
For example, extensions,reductions & prunings,researches and move ordering are still done differently.
I am sure you have done these things differntly in the past too..
I have always ordered things differently at the root, because I can afford to spend more time and do a full q-search on each root move. And once the search starts, the "good moves" get moved to the top of the list as they become best moves. But for me, that is the only ordering issue. I do not do a hash probe at the root, because I want to get a PV, although I could actually do even that since I now hash the path as well...

But I now have one Search() function, having gotten rid of SearchRoot() because I hate to maintain duplicate code.
Engin
Posts: 1001
Joined: Mon Jan 05, 2009 7:40 pm
Location: Germany
Full name: Engin Üstün

Re: about researches

Post by Engin »

>> Btw I have still not found a better reduction than 1 at the root.

right, i get better results with only 1 ply reduce at root too :)