Will your engine play better or worse?

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

Michael Sherwin
Posts: 3196
Joined: Fri May 26, 2006 3:00 am
Location: WY, USA
Full name: Michael Sherwin

Will your engine play better or worse?

Post by Michael Sherwin »

score = -Search(...
if(score > alpha && score < beta && beta - score < 5) score = beta;
If you are on a sidewalk and the covid goes beep beep
Just step aside or you might have a bit of heat
Covid covid runs through the town all day
Can the people ever change their ways
Sherwin the covid's after you
Sherwin if it catches you you're through
Harald Johnsen

Re: Will your engine play better or worse?

Post by Harald Johnsen »

Should it play better because the node count is reduced ? Is the node count reduced btw, I think the search will be more instable.

What you are doing is perhaps better done with rounding of scores returned by the evaluation function.

HJ.
Michael Sherwin
Posts: 3196
Joined: Fri May 26, 2006 3:00 am
Location: WY, USA
Full name: Michael Sherwin

Re: Will your engine play better or worse?

Post by Michael Sherwin »

It seems better for RomiChess.

There are fewer nodes examined on average at fixed depth.

No stability problem noted.

Notice, that it is done only when the window is quite narrow, when there is not much to be gained from further searching anyway.

It is just a one-liner so, maybe at least a few will give it a try and give a report.
If you are on a sidewalk and the covid goes beep beep
Just step aside or you might have a bit of heat
Covid covid runs through the town all day
Can the people ever change their ways
Sherwin the covid's after you
Sherwin if it catches you you're through
Harald Johnsen

Re: Will your engine play better or worse?

Post by Harald Johnsen »

I'll have a look when i'm at home.

What you are doing looks like sibbling prediction when using a small positional margin.

HJ.
mcostalba
Posts: 2684
Joined: Sat Jun 14, 2008 9:17 pm

Re: Will your engine play better or worse?

Post by mcostalba »

Michael Sherwin wrote:score = -Search(...
if(score > alpha && score < beta && beta - score < 5) score = beta;
Sorry for my silly question. But with null window searching if

score > alpha && score < beta

then it is always true that

beta - score < 5

Am I missing something ? Do you intend to apply to PV search only ?

Thanks
Marco
User avatar
hgm
Posts: 27808
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Will your engine play better or worse?

Post by hgm »

With a null window you will never have

score > alpha && score < beta

so indeed this only applies to PV nodes.
bob
Posts: 20943
Joined: Mon Feb 27, 2006 7:30 pm
Location: Birmingham, AL

Re: Will your engine play better or worse?

Post by bob »

Michael Sherwin wrote:score = -Search(...
if(score > alpha && score < beta && beta - score < 5) score = beta;
You are trying to prevent "small" score jumps? Some have tried this in the past, including me (although 10 years ago or so). It never worked for me...
BubbaTough
Posts: 1154
Joined: Fri Jun 23, 2006 5:18 am

Re: Will your engine play better or worse?

Post by BubbaTough »

I have tried a technique I saw in Glaurung for this that looked cool for doing something similar (look at GrainSize in Glaurung evaluate function)...it did not help. Which made me glad actually, because I prefer the idea that accurate eval is helpful and that rounding, while it makes search trees smaller and lets you go a little deeper, is not worth because of the corresponding decreased accuracy in eval. I would assume the technique is helpful for some and harmful to others depending on the degree of sensitivity of the eval.

-Sam
User avatar
Zach Wegner
Posts: 1922
Joined: Thu Mar 09, 2006 12:51 am
Location: Earth

Re: Will your engine play better or worse?

Post by Zach Wegner »

BubbaTough wrote:I have tried a technique I saw in Glaurung for this that looked cool for doing something similar (look at GrainSize in Glaurung evaluate function)...it did not help. Which made me glad actually, because I prefer the idea that accurate eval is helpful and that rounding, while it makes search trees smaller and lets you go a little deeper, is not worth because of the corresponding decreased accuracy in eval. I would assume the technique is helpful for some and harmful to others depending on the degree of sensitivity of the eval.
Of course, there are other ways to make use of this granularity.


;)
User avatar
Eelco de Groot
Posts: 4567
Joined: Sun Mar 12, 2006 2:40 am
Full name:   

Re: Will your engine play better or worse?

Post by Eelco de Groot »

Zach Wegner wrote:
BubbaTough wrote:I have tried a technique I saw in Glaurung for this that looked cool for doing something similar (look at GrainSize in Glaurung evaluate function)...it did not help. Which made me glad actually, because I prefer the idea that accurate eval is helpful and that rounding, while it makes search trees smaller and lets you go a little deeper, is not worth because of the corresponding decreased accuracy in eval. I would assume the technique is helpful for some and harmful to others depending on the degree of sensitivity of the eval.
Of course, there are other ways to make use of this granularity.


;)
Would you care to elaborate a bit on that?
Something found in the Strelka sources or is it something you found by yourself Zach? I believe "grain-size" of the eval was also part of some of the later Fruits from Ryan, as an UCI option but it seemed to be doing not much for testpositions at least...

Eelco
Debugging is twice as hard as writing the code in the first
place. Therefore, if you write the code as cleverly as possible, you
are, by definition, not smart enough to debug it.
-- Brian W. Kernighan