about researches

Discussion of chess software programming and technical issues.

Moderator: Ras

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

about researches

Post by Daniel Shawul »

What are your conditions for doing researches for a reduced move.
a) score > alpha or score >= beta
I am doing the first but I guess this doesn't matter much inside the tree as most nodes there are non-pv.

b) retrieve the whole depth at once or do it iteratively. I do the second which means if the move is reduced by 4, i do 3 researches...

c) if the move is reduced and window is zeroed, which do you do first ? research with full window, and then with full depth ? or the opposite ?
or both at the same time. I do the first because i think changing the window changes the search space more than changing the search depth.

I find that these decisions are rather important especially at the root ?
thoughts?

Daniel
User avatar
rvida
Posts: 481
Joined: Thu Apr 16, 2009 12:00 pm
Location: Slovakia, EU

Re: about researches

Post by rvida »

Daniel Shawul wrote:What are your conditions for doing researches for a reduced move.
a) score > alpha or score >= beta
I am doing the first but I guess this doesn't matter much inside the tree as most nodes there are non-pv.
You are doing it right. In non-pv nodes beta = alpha + 1, therefore if score > alpha is true then automatically score >= beta is true too.
Daniel Shawul wrote: b) retrieve the whole depth at once or do it iteratively. I do the second which means if the move is reduced by 4, i do 3 researches...
IIRC Stockfish does this in 2 steps (but only if reduction was greater than 4). In Critter this did not work, it does re-searches with full depth right away.
Daniel Shawul wrote: c) if the move is reduced and window is zeroed, which do you do first ? research with full window, and then with full depth ? or the opposite ?
or both at the same time. I do the first because i think changing the window changes the search space more than changing the search depth.
Critter 0.8:
Research with zero window full depth first, if this fails high then research again with full window full depth

Critter 0.9:
Research immediately with full window full depth, except at root.

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

Re: about researches

Post by Daniel Shawul »

Critter 0.8:
Research with zero window full depth first, if this fails high then research again with full window full depth

Critter 0.9:
Research immediately with full window full depth, except at root.
So you noted that too :) At the root these decisions are very crucial it seems.
Not doing researches is better than doing it badly. At first I got the order wrong (first full window, then iteratively incremented depth), which performed badly.

Correction: In my previous post in (b) , I mentioned things wrong

root : iteratively research with depth incremented, then full window
elsewhere : opposite of root

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.

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

Re: about researches

Post by Daniel Shawul »


What are your conditions for doing researches for a reduced move.
a) score > alpha or score >= beta
I am doing the first but I guess this doesn't matter much inside the tree as most nodes there are non-pv.


You are doing it right. In non-pv nodes beta = alpha + 1, therefore if score > alpha is true then automatically score >= beta is true too.
Here you misunderstood me. It is not that I missed both conditions are the same at ZWS, as I have mentioned in the bold faced text. The question should be rephrased " At pv nodes, do you do the research when the move is better than what we have so far (score > alpha) or exceed the highest of our expectation (score >= beta) ". Less researches in the latter case.I distinctly remember there was some discussion of which case to use when lmr was introduced...
bob
Posts: 20943
Joined: Mon Feb 27, 2006 7:30 pm
Location: Birmingham, AL

Re: about researches

Post by bob »

Daniel Shawul wrote:What are your conditions for doing researches for a reduced move.
a) score > alpha or score >= beta
I am doing the first but I guess this doesn't matter much inside the tree as most nodes there are non-pv.

b) retrieve the whole depth at once or do it iteratively. I do the second which means if the move is reduced by 4, i do 3 researches...

c) if the move is reduced and window is zeroed, which do you do first ? research with full window, and then with full depth ? or the opposite ?
or both at the same time. I do the first because i think changing the window changes the search space more than changing the search depth.

I find that these decisions are rather important especially at the root ?
thoughts?

Daniel
a. I use >= beta.

b. I do not follow the question.

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.
bob
Posts: 20943
Joined: Mon Feb 27, 2006 7:30 pm
Location: Birmingham, AL

Re: about researches

Post by bob »

Daniel Shawul wrote:
Critter 0.8:
Research with zero window full depth first, if this fails high then research again with full window full depth

Critter 0.9:
Research immediately with full window full depth, except at root.
So you noted that too :) At the root these decisions are very crucial it seems.
Not doing researches is better than doing it badly. At first I got the order wrong (first full window, then iteratively incremented depth), which performed badly.

Correction: In my previous post in (b) , I mentioned things wrong

root : iteratively research with depth incremented, then full window
elsewhere : opposite of root
This makes absolutely no sense to me. What makes the root behave the opposite of all other nodes? Nothing I can think of. I do it the same everywhere. And don't even have a separate SearchRoot() function any longer in Crafty.


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.

Daniel
Engin
Posts: 1001
Joined: Mon Jan 05, 2009 7:40 pm
Location: Germany
Full name: Engin Üstün

Re: about researches

Post by Engin »

agree, i doing it in non pv nodes too with score >= beta, before i done score > alpha, but search a move to go out of beta in ZWS so beta is the right choice.

if score >= beta then research it with full depth and let see if it is really go out of beta, then return beta.
Engin
Posts: 1001
Joined: Mon Jan 05, 2009 7:40 pm
Location: Germany
Full name: Engin Üstün

Re: about researches

Post by Engin »

that what i use at root and pv nodes score > alpha, in cut nodes score >= beta a full depth search again
mcostalba
Posts: 2684
Joined: Sat Jun 14, 2008 9:17 pm

Re: about researches

Post by mcostalba »

bob wrote: a. I use >= beta.
I guess it's time you spin your cluster on "score > alpha" ;-)
Engin
Posts: 1001
Joined: Mon Jan 05, 2009 7:40 pm
Location: Germany
Full name: Engin Üstün

Re: about researches

Post by Engin »

Marco, are you not mean that in non pv nodes alpha = beta - 1, so why we should only beat alpha, we need to beating beta here.

not true ?