Smooth scaling stockfish

Discussion of anything and everything relating to chess playing software and machines.

Moderator: Ras

User avatar
Matthias Gemuh
Posts: 3245
Joined: Thu Mar 09, 2006 9:10 am

Re: Little test with both stockfish 1.6s versions!

Post by Matthias Gemuh »

Dann Corbit wrote:... if I have an advantage of 5000 pawns, ...
Are you really talking about chess ?

.
My engine was quite strong till I added knowledge to it.
http://www.chess.hylogic.de
Uri Blass
Posts: 10805
Joined: Thu Mar 09, 2006 12:37 am
Location: Tel-Aviv Israel

Re: Little test with both stockfish 1.6s versions!

Post by Uri Blass »

Dann Corbit wrote:
hgm wrote:
Dann Corbit wrote:I think if I see a full queen advantage or full queen disadvantage I do not need to examine those lines as thoroughly as a one pawn advantage or disadvantage.
But this is exactly what normal null-move pruning (= with score-independent reduction) already does. So it cannot be used as an argument to introduce score dependence in the reduction.
If I have an advantage of 2.5 pawns or if I have an advantage of 5000 pawns, the need to search is different. Hence, the reduction is different.

At least, that is how I see it. I can be wrong, as I often am, but so far the idea appears to offer some improvement. It may well be that I have things very backwards (as I am wont to do, being dyslexic and all). If so, then proper calculations using an appropriate curve should do better.
I think that null move pruning mean searching less lines with bigger advantages because you can find less threats for the weaker side so you already reduce more when there is a big advantage.

I also believe that pruning based on evaluation when the remaining depth is small can also help to reduce more when you see big advantage.

I see no reason for direct reduction and it seems to me that pruning should be superior to reduction and it may be possible to replace every reduction that works by pruning.

Pruning means reduce later in the tree and I suspect that it is better to take decision about reduction later in the tree when you have more information.

Maybe it is better also to get rid of LMR and replace it by direct pruning
(LMR is of course productive but I see no logical reason that it should be more productive then pruning)

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

Re: Little test with both stockfish 1.6s versions!

Post by Michael Sherwin »

hgm wrote:
Dann Corbit wrote:I think if I see a full queen advantage or full queen disadvantage I do not need to examine those lines as thoroughly as a one pawn advantage or disadvantage.
But this is exactly what normal null-move pruning (= with score-independent reduction) already does. So it cannot be used as an argument to introduce score dependence in the reduction.
IMO, you are only partially correct, in that a continued deficit in score will lead to further reductions by Null Move. A larger deficit therefore will on average lead to more reductions. However, larger deficits on average need solving much more quickly or they are not solvable. Deeper solutions will most likely involve early checks and mate threats that recover the needed depth. Small deltas can be satisfied by moving a piece to a better square and therefore refuting that refutation may take more depth in which check extensions and mate threats are not involved.
Last edited by Michael Sherwin on Thu Dec 31, 2009 12:00 am, edited 1 time in total.
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
Dann Corbit
Posts: 12778
Joined: Wed Mar 08, 2006 8:57 pm
Location: Redmond, WA USA

Re: Little test with both stockfish 1.6s versions!

Post by Dann Corbit »

bob wrote:
Dann Corbit wrote:
hgm wrote:This does not feel right. You reduce more when you are more ahead. I would expect that a fundamentally flawed strategy. Allowing less depth is then almost a guarantee that you will never earn back the material. You might as well prune the branch, rather than reduce it.

The whole idea of recursive null-move pruning is already that you reduce more when you are ahead more, because you can afford to ignore more threats or captures by the opponent (each null move giving an extra reduction). So increasing the null-move reduction should have a similar effect as giving extra reduction based on the current eval. But with null-move you ctually test if you can afford the reducton dynamically, and if the opponent (although heavily behind) can play a number of very dangerous threats (checks, or atacks on your Queen) that might conceivably allow him to get even, the reduction evaporates, and you will get the fail low. Reducing based on the static eval is much more dangerous.

If increasng the reduction when you are more head helps, it just means your base reduction was not large enough.
I think it more fully mirrors how humans play.
When you see a huge advantage or huge disadvantage you do not have to study the move as carefully.

When moves are about even is when you have to really ponder over them.
I've been playing chess for over 50 years now and I _never_ do a "null-move" in any of my analysis. That's not a human concept. You have to be careful and not start imagining what it is doing. Null-move is based on Beal's "null-move observation" idea. If you give your opponent two moves in a row, and he can't damage your position, even though you give him fewer plies than normal to do this, then your position is winning and there is no need to search any further along this pathway.

Null-move is not about winning material, or losing material, it is simply asking the question "Do I need to search all moves to the normal depth at this position, or can I do a shallow null-move search and use that result to get me out of here much quicker?" The idea of tying it to material imbalance is flawed, because that is not how it works. It is relative to the material balance difference between the current ply and the point where alpha/beta was defined earlier in the tree.

As a human you might "ponder more" when material is even, but as soon as you find a crushing move in your analysis for one possible candidate, you don't continue to search that, you move on to something that is more likely to be relevant, and this is what null-move is about. It works whether you start off a queen up or a queen down...
When I say "a queen up" I am referring to previous searches and not just to wood count. The first thing that is done is to look in the hash table. If any search is available (including one that is too shallow for skip of search) then I use that as an estimate. This is much more than a wood difference. So 'queen up' is referring to 900 centipawns after a search has been performed. It is true that I will resort to an estimate based on eval if search is missing. It might be much better to use an IID like idea instead (I have mentioned that elsewhere).
Uri Blass
Posts: 10805
Joined: Thu Mar 09, 2006 12:37 am
Location: Tel-Aviv Israel

Re: Little test with both stockfish 1.6s versions!

Post by Uri Blass »

bob wrote:
hgm wrote:
Dann Corbit wrote:I think if I see a full queen advantage or full queen disadvantage I do not need to examine those lines as thoroughly as a one pawn advantage or disadvantage.
But this is exactly what normal null-move pruning (= with score-independent reduction) already does. So it cannot be used as an argument to introduce score dependence in the reduction.
But what he needs to change is the "queen advantage or disadvantage". He is thinking of the initial position where you are a queen up. That is _not_ what null-move does for us. If we start off a queen down, it will help us prune branches where we end up two queens down. It is simply looking at the delta change from positoin P1 to position Pn where n is the depth.
Positions when you start queen down or queen up have a little effect on playing strength because you win or lose them almost always.

I assume that you start with some more interesting score(something between -2 pawn and +2 pawns so the final score is not clear)

In this case
queen advantage or disadvantage relative to the initial score is similiar to queen advantage or disadvantage relative to equality.

Uri
Henrik Dinesen
Posts: 877
Joined: Wed Mar 08, 2006 9:52 pm
Location: Denmark

Re: Smooth scaling stockfish

Post by Henrik Dinesen »

Dann Corbit wrote:This version of Stockfish:
http://cap.connx.com/chess-engines/new- ... x64_ja.rar

Scales null move smoothly. I get about +150 Elo so far in my testing. How about yours?
Do you have a working link ? :)
Henrik
User avatar
hgm
Posts: 28354
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Little test with both stockfish 1.6s versions!

Post by hgm »

bob wrote:But what he needs to change is the "queen advantage or disadvantage". He is thinking of the initial position where you are a queen up. That is _not_ what null-move does for us. If we start off a queen down, it will help us prune branches where we end up two queens down. It is simply looking at the delta change from positoin P1 to position Pn where n is the depth.
Well, I think that we only need to consider positions that are about equal in the root score (which will then be used as null-windw in the remaining search). If you are up or down a Queen in score, the game is already decided. So no matter how inefficient your search works there, it will not affect the game result anymore. You coud probably win it with a 5-ply search against perfect play.

It is the efficiency of the search in the score range -2 ... +2 that has an effect on the rating; outside that it would hardly matter.

And about human thinking: when I play Chess, I always do recursive null move. The first thing I ask myself when my opponent has moved is "what does he threaten". To answer that I first look what moves he has from the current position (although it is my move, i.e. after my null move), and then what plans he could have with series of two or three moves when I am idle. When I have identified a list of possible goals f my opponent, I then start thinking what I should do to frustrate them pre-emptively, while at the same time advance my own plans (which I conceive by looking what I can acheive with series of 1, 2, 3, ... moves when my opponent remains idle.)
Michael Sherwin
Posts: 3196
Joined: Fri May 26, 2006 3:00 am
Location: WY, USA
Full name: Michael Sherwin

Re: Little test with both stockfish 1.6s versions!

Post by Michael Sherwin »

hgm wrote:
bob wrote:But what he needs to change is the "queen advantage or disadvantage". He is thinking of the initial position where you are a queen up. That is _not_ what null-move does for us. If we start off a queen down, it will help us prune branches where we end up two queens down. It is simply looking at the delta change from positoin P1 to position Pn where n is the depth.
Well, I think that we only need to consider positions that are about equal in the root score (which will then be used as null-windw in the remaining search). If you are up or down a Queen in score, the game is already decided. So no matter how inefficient your search works there, it will not affect the game result anymore. You coud probably win it with a 5-ply search against perfect play.

It is the efficiency of the search in the score range -2 ... +2 that has an effect on the rating; outside that it would hardly matter.

And about human thinking: when I play Chess, I always do recursive null move. The first thing I ask myself when my opponent has moved is "what does he threaten". To answer that I first look what moves he has from the current position (although it is my move, i.e. after my null move), and then what plans he could have with series of two or three moves when I am idle. When I have identified a list of possible goals f my opponent, I then start thinking what I should do to frustrate them pre-emptively, while at the same time advance my own plans (which I conceive by looking what I can acheive with series of 1, 2, 3, ... moves when my opponent remains idle.)
In few words you have just described the basic Botvinnik algorithm for computer chess. I hope to try this someday.
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