Reducing the horizon effect

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

Mike Sherwin
Posts: 860
Joined: Fri Aug 21, 2020 1:25 am
Location: Planet Earth, Sol system
Full name: Michael J Sherwin

Reducing the horizon effect

Post by Mike Sherwin »

There might be a way to reduce the horizon effect by detecting a stable horizon and extending the search if it is not stable. The idea is to call Qsearch say two ply early and compare the score to that returned by a two ply further search. If the scores are close then the horizon is stable because two additional moves changed nothing. On the other hand if the scores are not close then the horizon is not stable and the search should be extended.
Mike Sherwin
Posts: 860
Joined: Fri Aug 21, 2020 1:25 am
Location: Planet Earth, Sol system
Full name: Michael J Sherwin

Re: Reducing the horizon effect

Post by Mike Sherwin »

This idea can be brought further down toward the root. If a "stable horizon" can be detected lower in the tree then a level of confidence can be established that may allow for reductions in search depth.
Ras
Posts: 2487
Joined: Tue Aug 30, 2016 8:19 pm
Full name: Rasmus Althoff

Re: Reducing the horizon effect

Post by Ras »

I think we had some discussion along that line, and HGM gave that approach the nickname "headlight algorithm": If you're in your car at night, and don't see a road turn, reduce your headlights. If you still don't see a road turn, turn them down further. Then a road turn comes up, but your headlights are switched off at this point.
Rasmus Althoff
https://www.ct800.net
Mike Sherwin
Posts: 860
Joined: Fri Aug 21, 2020 1:25 am
Location: Planet Earth, Sol system
Full name: Michael J Sherwin

Re: Reducing the horizon effect

Post by Mike Sherwin »

I admit that analogy does not enlighten me. Okay I found it. Some slight similarity in idea. Though, not really the same. But, it is hard to discern with the headlights dimmed.
Pio
Posts: 334
Joined: Sat Feb 25, 2012 10:42 pm
Location: Stockholm

Re: Reducing the horizon effect

Post by Pio »

Mike Sherwin wrote: Thu Sep 10, 2020 11:57 am There might be a way to reduce the horizon effect by detecting a stable horizon and extending the search if it is not stable. The idea is to call Qsearch say two ply early and compare the score to that returned by a two ply further search. If the scores are close then the horizon is stable because two additional moves changed nothing. On the other hand if the scores are not close then the horizon is not stable and the search should be extended.
Hi Mike, I really enjoy your posts 😀. Maybe it is because we have lots of similar ideas. I think your idea of trying to estimate the stability of the position close to the leafs is really great. I have three ideas of how it could be made

1) if the positions’ evaluation deteriorate from grandfather to father to son it shows that the position might get worse and you should extend.

2) The same might be done if the evaluations fluctuate a lot (it could actually be a really stupid way of doing quiescence search) and is a type of generalisation of Qsearch

3) If the move stored in the hash table (transposition table) is the same going one depth greater a counter is increased for the position saved in the TT, if it changes the counter is decreased. When probing for an entry in the TT you read the counters. If the counters are high it means the path is more stable and you can reduce.

Good luck Mike. I follow your threads with great interest and think most of your ideas are great!!!
Mike Sherwin
Posts: 860
Joined: Fri Aug 21, 2020 1:25 am
Location: Planet Earth, Sol system
Full name: Michael J Sherwin

Re: Reducing the horizon effect

Post by Mike Sherwin »

Pio wrote: Thu Sep 10, 2020 7:31 pm
Mike Sherwin wrote: Thu Sep 10, 2020 11:57 am There might be a way to reduce the horizon effect by detecting a stable horizon and extending the search if it is not stable. The idea is to call Qsearch say two ply early and compare the score to that returned by a two ply further search. If the scores are close then the horizon is stable because two additional moves changed nothing. On the other hand if the scores are not close then the horizon is not stable and the search should be extended.
Hi Mike, I really enjoy your posts 😀. Maybe it is because we have lots of similar ideas. I think your idea of trying to estimate the stability of the position close to the leafs is really great. I have three ideas of how it could be made

1) if the positions’ evaluation deteriorate from grandfather to father to son it shows that the position might get worse and you should extend.

2) The same might be done if the evaluations fluctuate a lot (it could actually be a really stupid way of doing quiescence search) and is a type of generalisation of Qsearch

3) If the move stored in the hash table (transposition table) is the same going one depth greater a counter is increased for the position saved in the TT, if it changes the counter is decreased. When probing for an entry in the TT you read the counters. If the counters are high it means the path is more stable and you can reduce.

Good luck Mike. I follow your threads with great interest and think most of your ideas are great!!!
ty :)
abulmo2
Posts: 433
Joined: Fri Dec 16, 2016 11:04 am
Location: France
Full name: Richard Delorme

Re: Reducing the horizon effect

Post by abulmo2 »

Mike Sherwin wrote: Thu Sep 10, 2020 12:31 pm This idea can be brought further down toward the root. If a "stable horizon" can be detected lower in the tree then a level of confidence can be established that may allow for reductions in search depth.
Don't strong programs à la stockfish do something similar? They check if the static evaluation is improving between current ply and grand parent ply (ply - 2) and change the ways they reduce or the margins to prune bad lines.
Richard Delorme
Mike Sherwin
Posts: 860
Joined: Fri Aug 21, 2020 1:25 am
Location: Planet Earth, Sol system
Full name: Michael J Sherwin

Re: Reducing the horizon effect

Post by Mike Sherwin »

abulmo2 wrote: Fri Sep 11, 2020 8:43 am
Mike Sherwin wrote: Thu Sep 10, 2020 12:31 pm This idea can be brought further down toward the root. If a "stable horizon" can be detected lower in the tree then a level of confidence can be established that may allow for reductions in search depth.
Don't strong programs à la stockfish do something similar? They check if the static evaluation is improving between current ply and grand parent ply (ply - 2) and change the ways they reduce or the margins to prune bad lines.
I honestly do not know much about SF or any other strong programs, sry.