The value of the improving variable

Discussion of chess software programming and technical issues.

Moderator: Ras

Bart Weststrate
Posts: 27
Joined: Fri Mar 18, 2016 3:34 pm

The value of the improving variable

Post by Bart Weststrate »

I wonder. Don't get it to work.

The improving variable is known in all the sources on Github as "very important"...

This thingie is defined as inline evaluation (node eval) > the same on ply-2
As this is the case we can do various fuzzy logic:
- reduce less in lmr and or lmp, also nullmove in zillions of variations.

What framework is necessary to get this to work?

Thoughts please Gents. :)
Aleks Peshkov
Posts: 951
Joined: Sun Nov 19, 2006 9:16 pm
Location: Russia
Full name: Aleks Peshkov

Re: The value of the improving variable

Post by Aleks Peshkov »

I wonder if most "very important" features are typical cargo cult.
Joost Buijs
Posts: 1646
Joined: Thu Jul 16, 2009 10:47 am
Location: Almere, The Netherlands

Re: The value of the improving variable

Post by Joost Buijs »

Things like this can only work when you have a very smooth evaluation-function. When there is noise on your evaluation-function it will probably hurt more than it helps, and make your search very unstable.

Nowadays every engine looks alike, everybody seems to be doing what others are doing, I dont think this is a very good development.
User avatar
Eelco de Groot
Posts: 4676
Joined: Sun Mar 12, 2006 2:40 am
Full name:   Eelco de Groot

Re: The value of the improving variable

Post by Eelco de Groot »

You have to go back to somewhere timeframe Stockfish 11 for the introduction. Without Marco Costalba's rigorous approach to atomic testing I doubt it would have worked well. And he knew how to get it technically perfect. We later got word from Mark Lefler and Larry Kaufman I think on the Rybka forum it was but I don't know exactly the source, not Larry but another programmer it was but with a pseudonym, that it worked well for them too. I am glad it has been adopted so widely! If it did work, somewhat universally, strengthens the 'theory' if you may call it that. Which is not difficult to follow really, more chess than programming.

Here it is on Catawiki. but mainly programming examples:
https://www.chessprogramming.org/Improving
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
Bart Weststrate
Posts: 27
Joined: Fri Mar 18, 2016 3:34 pm

Re: The value of the improving variable

Post by Bart Weststrate »

Sounds like religion Eelco. :? All due respect to Marco C. for his good work but in what sense did he make it "technically perfect"? There is no direct proof for that. Or is it?

What it obviously does is "shaping the tree" in a way. But in what way...

As we speak: the Ed Schroeder reduction a.k.a. "IIR" is also a white raven shaping the tree in a very difficult to understand way.
Last edited by Bart Weststrate on Mon Oct 20, 2025 9:40 pm, edited 1 time in total.
Bart Weststrate
Posts: 27
Joined: Fri Mar 18, 2016 3:34 pm

Re: The value of the improving variable

Post by Bart Weststrate »

Joost Buijs wrote: Mon Oct 20, 2025 7:45 am Things like this can only work when you have a very smooth evaluation-function. When there is noise on your evaluation-function it will probably hurt more than it helps, and make your search very unstable.

Nowadays every engine looks alike, everybody seems to be doing what others are doing, I dont think this is a very good development.
Joost and Eelco : 15 + 16 november Leiden tournament for old times sake maybe.. :P

Nu al hebben de volgende mensen zich aangemeld! (participants up to now)

Wees er snel bij!

Dog Folkert van Heusden
Knight Clubbing Ralf van Aert
Lunar Patrick Hilhorst
Single Malt Hans Secelle/Bart Weststrate/Jeroen Noomen
The Baron Richard Pijl
The King Johan de Koning
Titan4 Aldo Voogt
Arminius Volker Annuss
Spartacus Harm Geert Muller
ZirconiumX
Posts: 1361
Joined: Sun Jul 17, 2011 11:14 am
Full name: Hannah Ravensloft

Re: The value of the improving variable

Post by ZirconiumX »

Bart Weststrate wrote: Mon Oct 20, 2025 9:24 pmAs we speak: the Ed Schroeder reduction a.k.a. "IIR" is also a white raven shaping the tree in a very difficult to understand way.
Is it so difficult to understand? If we're a PV node in a part of the tree that has a low-depth/no TT entry, this implies that the previous PV move in the parent node failed low, and we find ourselves in the critical situation of having to discover a new PV.

Because we have a low-depth/no TT entry, we expect to have poor move ordering, and subsequently are at risk of search explosion in this part of the tree; by reducing the size of the tree, we mitigate the effects of this.
tu ne cede malis, sed contra audentior ito
Bart Weststrate
Posts: 27
Joined: Fri Mar 18, 2016 3:34 pm

Re: The value of the improving variable

Post by Bart Weststrate »

If you put it that way... :D Thanks for the explanation.
Bart Weststrate
Posts: 27
Joined: Fri Mar 18, 2016 3:34 pm

Re: The value of the improving variable

Post by Bart Weststrate »

But what i ment was that it is shaping the tree in unexpected ways. Hence the confusion.
IID was ment to speed up things somewhat. IIR is shaping the tree in a totally different way.

See here:

https://www.talkchess.com/forum3/viewto ... 41#p857041
Bart Weststrate
Posts: 27
Joined: Fri Mar 18, 2016 3:34 pm

Re: The value of the improving variable

Post by Bart Weststrate »

And also this:

https://www.talkchess.com/forum3/viewto ... 83#p856983

Oliver Brausch was also struggeling to understand what happens exactly. :wink: