SF's root

Discussion of chess software programming and technical issues.

Moderator: Ras

lech
Posts: 1169
Joined: Sun Feb 14, 2010 10:02 pm

SF's root

Post by lech »

Why SF repeats the main evaluation (root) for each iteration?
Maybe, I can't be friendly, but let me be useful.
Ralph Stoesser
Posts: 408
Joined: Sat Mar 06, 2010 9:28 am

Re: SF's root

Post by Ralph Stoesser »

lech wrote:Why SF repeats the main evaluation (root) for each iteration?
It makes no sense. id_loop() is the appropriate place for root evaluation.
mcostalba
Posts: 2684
Joined: Sat Jun 14, 2008 9:17 pm

Re: SF's root

Post by mcostalba »

It is there to let root_search() to follow the same template of normal search(), see also the surrounding comments.

I agree could be moved in idle_loop, but because the advantage is zero (about 20 saved evaluation out of many millions) perhaps has more sense to prefer clarity to teorethical speedup.
lech
Posts: 1169
Joined: Sun Feb 14, 2010 10:02 pm

Re: SF's root

Post by lech »

Thanks for answers.
Another questions for root:
Why there is no threat detection in root (to avoid reduction if true).
Maybe, I can't be friendly, but let me be useful.
zamar
Posts: 613
Joined: Sun Jan 18, 2009 7:03 am

Re: SF's root

Post by zamar »

lech wrote:Thanks for answers.
Another questions for root:
Why there is no threat detection in root (to avoid reduction if true).
Nobody ever put it there :) Shouldn't be a big deal, but still one of those little things which could be tested...
Joona Kiiski
lech
Posts: 1169
Joined: Sun Feb 14, 2010 10:02 pm

Re: SF's root

Post by lech »

zamar wrote:
lech wrote:Thanks for answers.
Another questions for root:
Why there is no threat detection in root (to avoid reduction if true).
Nobody ever put it there :) Shouldn't be a big deal, but still one of those little things which could be tested...
I thought about the mate threat detection in root only.
I was watching how works Houdini 1.5
In this position
[d] rk6/p1p5/Bp2p3/1P6/q2B1P2/4K3/8/8 b - - 0 1
after 21 iterations Houdini on 3rd and 4th places analyzing Qxd4 and Qxa6 (!) and it is a long analyze (like PV search).
It looks like Houdini use root to set (select) moves by increase (?).
Next example:
[d] 8/5pKN/5Pp1/5kP1/1B6/8/b7/7q b - - 0 1
Very quick (26 depth) the move Qxh7 is on 3rd place (!!!) Amazing ! :shock:
Maybe, I can't be friendly, but let me be useful.