stockfish and test positions

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

Uri Blass
Posts: 10309
Joined: Thu Mar 09, 2006 12:37 am
Location: Tel-Aviv Israel

stockfish and test positions

Post by Uri Blass »

I noticed that stockfish is relatively very slow in some test positions
and it seems that it does too much pruning

for example
This position from Arasan's test suite

old glaurung can solve it in 22 seconds and depth 12



[D]2q2r2/3n1p2/p2p2k1/3PpRp1/P1n1P3/2P2QB1/1rB1R1P1/6K1 w - - 0 1

New game, 5'/40+5'/40+5'/40
2q2r2/3n1p2/p2p2k1/3PpRp1/P1n1P3/2P2QB1/1rB1R1P1/6K1 w - - 0 1

Analysis by Glaurung 1.2.1:

1.Qf3-g4 Kg6-g7 2.Qg4xg5+ Kg7-h8
+- (1.56) Depth: 2 00:00:00
1.Bc2-d3 Rb2xe2 2.Bd3xe2
+- (3.32) Depth: 2 00:00:00
1.Bc2-d3 Kg6-h6 2.Re2xb2 Nc4xb2
+- (2.45) Depth: 3 00:00:00
1.Qf3-g4 f7-f6 2.Qg4-h3
+- (4.00) Depth: 3 00:00:00
1.Qf3-g4 f7-f6 2.Bc2-d3 Nd7-b6 3.Re2xb2 Nc4xb2
+- (3.15) Depth: 4 00:00:00
1.Qf3-g4 f7-f6 2.Bc2-d3 Rb2xe2 3.Bd3xe2 Qc8-c5+ 4.Rf5-f2
+- (3.12) Depth: 5 00:00:00
1.Qf3-g4 f7-f6 2.Bc2-d3 Rb2xe2 3.Qg4xe2 Qc8-c5+ 4.Rf5-f2
+- (2.35) Depth: 6 00:00:00 15kN
1.Qf3-g4 f7-f6 2.Bc2-d3 Rb2xe2 3.Qg4xe2 Nd7-b6 4.Qe2-d1
+- (2.29) Depth: 7 00:00:00 61kN
1.Qf3-g4 f7-f6 2.Bc2-d3 Rb2xe2 3.Qg4xe2 Nd7-b6 4.a4-a5 Nc4xa5 5.Bd3xa6 Qc8xc3
+- (2.23) Depth: 8 00:00:00 139kN
1.Qf3-g4 f7-f6 2.Bc2-d3 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-c7 8.g2-g4 Qc7-c8 9.Qd3-f3 Qc8-d8 10.Kg1-g2 Nc4-b6 11.a4-a5 Nb6-c4 12.Qf3-d3 Qd8-c8 13.Qd3-h3 Kg6-g7
² (0.68) Depth: 23/39 00:03:13 83531kN
1.Bg3-h4 f7-f6 2.Bh4xg5 f6xg5 3.Re2-f2 Rb2xc2 4.Rf2xc2 Nd7-f6 5.Rc2-f2 Qc8-d8 6.Qf3-e2 Qd8-c8 7.Qe2-d3 Qc8-c7 8.g2-g4 a6-a5 9.Qd3-e2 Qc7-c8 10.Qe2-f3 Qc8-d8 11.Qf3-h3 Qd8-c7 12.Kg1-h1 Qc7-e7 13.Rf2-h2 Qe7-g7 14.Rf5xf6+ Kg6xf6 15.Qh3-f1+ Kf6-g6 16.Qf1xc4 Qg7-a7
± (0.76) Depth: 24/39 00:04:39 116812kN
1.Rf5xg5+ Kg6xg5 2.Qf3-f5+ Kg5-h6 3.Bg3-f4+ e5xf4 4.g2-g4 Qc8-c5+ 5.Kg1-h1 Rb2xc2 6.Re2xc2 Kh6-g7 7.Rc2-h2 Rf8-h8 8.Qf5-g5+
+- (105.64) Depth: 25/39 00:08:38 217951kN

(, 31.05.2011)


The reason is that stockfish prunes too much and I wonder if the developers try to improve stockfish by having rules to do less pruning
in relevant positions.

I do not suggest to accept a change if it does better in test suites but only that it is a direction for improvement.

The idea is to start with testing a change that say do not prune
if you sacrifice and have a compensation in the term of strong attack(when the change improve stockfish's results in test suites)
and if the change does not work in games then to try to change the definition of strong attack to be as minimalistic as possible but still help to solve the test positions(so it is going to have a relatively small effect in positions with no good sacrifices)
User avatar
Don
Posts: 5106
Joined: Tue Apr 29, 2008 4:27 pm

Re: stockfish and test positions

Post by Don »

Uri Blass wrote:I noticed that stockfish is relatively very slow in some test positions
and it seems that it does too much pruning

for example
This position from Arasan's test suite

old glaurung can solve it in 22 seconds and depth 12

.... stuff

new stockfish 1 cpu cannot find it in a small time and needs depth 25

... stuff

The reason is that stockfish prunes too much and I wonder if the developers try to improve stockfish by having rules to do less pruning
in relevant positions.
This concept is the holy grail of computer chess.

I do not suggest to accept a change if it does better in test suites but only that it is a direction for improvement.

The idea is to start with testing a change that say do not prune
if you sacrifice and have a compensation in the term of strong attack(when the change improve stockfish's results in test suites)
and if the change does not work in games then to try to change the definition of strong attack to be as minimalistic as possible but still help to solve the test positions(so it is going to have a relatively small effect in positions with no good sacrifices)
In general it's difficult to tune by using tactical positions as a guide. Computers are rarely losing games in positions where (from our point of view) there is a clear tactical shot, but they still make dubious moves that make it more and more difficult to hold the position.

An experiment we could do is to run the new test suite, or any other good tactical set against several versions of the same program and see how the tactical performance changes with each version. You have stockfish going back to glaurung for example, and you have several version of Komodo going back to Doch and in all of these versions you have ELO improvements spanning several hundred points. How strong is the correlation in general between the programs and their game tested strength?
Dann Corbit
Posts: 12541
Joined: Wed Mar 08, 2006 8:57 pm
Location: Redmond, WA USA

Re: stockfish and test positions

Post by Dann Corbit »

Don wrote:
Uri Blass wrote:I noticed that stockfish is relatively very slow in some test positions
and it seems that it does too much pruning

for example
This position from Arasan's test suite

old glaurung can solve it in 22 seconds and depth 12

.... stuff

new stockfish 1 cpu cannot find it in a small time and needs depth 25

... stuff

The reason is that stockfish prunes too much and I wonder if the developers try to improve stockfish by having rules to do less pruning
in relevant positions.
This concept is the holy grail of computer chess.

I do not suggest to accept a change if it does better in test suites but only that it is a direction for improvement.

The idea is to start with testing a change that say do not prune
if you sacrifice and have a compensation in the term of strong attack(when the change improve stockfish's results in test suites)
and if the change does not work in games then to try to change the definition of strong attack to be as minimalistic as possible but still help to solve the test positions(so it is going to have a relatively small effect in positions with no good sacrifices)
In general it's difficult to tune by using tactical positions as a guide. Computers are rarely losing games in positions where (from our point of view) there is a clear tactical shot, but they still make dubious moves that make it more and more difficult to hold the position.

An experiment we could do is to run the new test suite, or any other good tactical set against several versions of the same program and see how the tactical performance changes with each version. You have stockfish going back to glaurung for example, and you have several version of Komodo going back to Doch and in all of these versions you have ELO improvements spanning several hundred points. How strong is the correlation in general between the programs and their game tested strength?
I think that the quiet positions are the area that computers need to focus on. They all do very well in tactical positions, but in a quiet position with no captures in the next ten ply or so, what move do they choose?
User avatar
Don
Posts: 5106
Joined: Tue Apr 29, 2008 4:27 pm

Re: stockfish and test positions

Post by Don »

Dann Corbit wrote:
Don wrote:
Uri Blass wrote:I noticed that stockfish is relatively very slow in some test positions
and it seems that it does too much pruning

for example
This position from Arasan's test suite

old glaurung can solve it in 22 seconds and depth 12

.... stuff

new stockfish 1 cpu cannot find it in a small time and needs depth 25

... stuff

The reason is that stockfish prunes too much and I wonder if the developers try to improve stockfish by having rules to do less pruning
in relevant positions.
This concept is the holy grail of computer chess.

I do not suggest to accept a change if it does better in test suites but only that it is a direction for improvement.

The idea is to start with testing a change that say do not prune
if you sacrifice and have a compensation in the term of strong attack(when the change improve stockfish's results in test suites)
and if the change does not work in games then to try to change the definition of strong attack to be as minimalistic as possible but still help to solve the test positions(so it is going to have a relatively small effect in positions with no good sacrifices)
In general it's difficult to tune by using tactical positions as a guide. Computers are rarely losing games in positions where (from our point of view) there is a clear tactical shot, but they still make dubious moves that make it more and more difficult to hold the position.

An experiment we could do is to run the new test suite, or any other good tactical set against several versions of the same program and see how the tactical performance changes with each version. You have stockfish going back to glaurung for example, and you have several version of Komodo going back to Doch and in all of these versions you have ELO improvements spanning several hundred points. How strong is the correlation in general between the programs and their game tested strength?
I think that the quiet positions are the area that computers need to focus on. They all do very well in tactical positions, but in a quiet position with no captures in the next ten ply or so, what move do they choose?
I agree. The move a program chooses is very much bound to it's evaluation function in the absence of unambiguous tactics. That's why Komodo is so focused on evaluation and less on search. I mistake in evaluation can take many ply of searching to "correct" and many could be 20 ply or more beyond what it might normally do.

Also, I believe that because modern programs are so aggressive about pruning and reducing we have to be especially good in evaluation.
Uri Blass
Posts: 10309
Joined: Thu Mar 09, 2006 12:37 am
Location: Tel-Aviv Israel

Re: stockfish and test positions

Post by Uri Blass »

Dann Corbit wrote:
Don wrote:
Uri Blass wrote:I noticed that stockfish is relatively very slow in some test positions
and it seems that it does too much pruning

for example
This position from Arasan's test suite

old glaurung can solve it in 22 seconds and depth 12

.... stuff

new stockfish 1 cpu cannot find it in a small time and needs depth 25

... stuff

The reason is that stockfish prunes too much and I wonder if the developers try to improve stockfish by having rules to do less pruning
in relevant positions.
This concept is the holy grail of computer chess.

I do not suggest to accept a change if it does better in test suites but only that it is a direction for improvement.

The idea is to start with testing a change that say do not prune
if you sacrifice and have a compensation in the term of strong attack(when the change improve stockfish's results in test suites)
and if the change does not work in games then to try to change the definition of strong attack to be as minimalistic as possible but still help to solve the test positions(so it is going to have a relatively small effect in positions with no good sacrifices)
In general it's difficult to tune by using tactical positions as a guide. Computers are rarely losing games in positions where (from our point of view) there is a clear tactical shot, but they still make dubious moves that make it more and more difficult to hold the position.

An experiment we could do is to run the new test suite, or any other good tactical set against several versions of the same program and see how the tactical performance changes with each version. You have stockfish going back to glaurung for example, and you have several version of Komodo going back to Doch and in all of these versions you have ELO improvements spanning several hundred points. How strong is the correlation in general between the programs and their game tested strength?
I think that the quiet positions are the area that computers need to focus on. They all do very well in tactical positions, but in a quiet position with no captures in the next ten ply or so, what move do they choose?
I think that computers do well in tactical positions only relative to humans.
The importance of solving test positions is not only in the root position because a similiar idea can be later in the tree and a program that is slower in solving a test suite faster can practically do positional mistakes because of not seeing the win early enough.

It is logical to try to improve chess programs in positions when they are relatively weak to other programs and there are tactical positions when stockfish is relatively weak to other programs.

Of course I do not suggest to tune it for test suites but to try to find ideas that help both in test suites and in games.

It is clearly one direction for improvement and it is a fact that stockfish did not get a big improvement lately by other methods.
User avatar
Don
Posts: 5106
Joined: Tue Apr 29, 2008 4:27 pm

Re: stockfish and test positions

Post by Don »

Uri Blass wrote:
Dann Corbit wrote:
Don wrote:
Uri Blass wrote:I noticed that stockfish is relatively very slow in some test positions
and it seems that it does too much pruning

for example
This position from Arasan's test suite

old glaurung can solve it in 22 seconds and depth 12

.... stuff

new stockfish 1 cpu cannot find it in a small time and needs depth 25

... stuff

The reason is that stockfish prunes too much and I wonder if the developers try to improve stockfish by having rules to do less pruning
in relevant positions.
This concept is the holy grail of computer chess.

I do not suggest to accept a change if it does better in test suites but only that it is a direction for improvement.

The idea is to start with testing a change that say do not prune
if you sacrifice and have a compensation in the term of strong attack(when the change improve stockfish's results in test suites)
and if the change does not work in games then to try to change the definition of strong attack to be as minimalistic as possible but still help to solve the test positions(so it is going to have a relatively small effect in positions with no good sacrifices)
In general it's difficult to tune by using tactical positions as a guide. Computers are rarely losing games in positions where (from our point of view) there is a clear tactical shot, but they still make dubious moves that make it more and more difficult to hold the position.

An experiment we could do is to run the new test suite, or any other good tactical set against several versions of the same program and see how the tactical performance changes with each version. You have stockfish going back to glaurung for example, and you have several version of Komodo going back to Doch and in all of these versions you have ELO improvements spanning several hundred points. How strong is the correlation in general between the programs and their game tested strength?
I think that the quiet positions are the area that computers need to focus on. They all do very well in tactical positions, but in a quiet position with no captures in the next ten ply or so, what move do they choose?
I think that computers do well in tactical positions only relative to humans.
The importance of solving test positions is not only in the root position because a similiar idea can be later in the tree and a program that is slower in solving a test suite faster can practically do positional mistakes because of not seeing the win early enough.

It is logical to try to improve chess programs in positions when they are relatively weak to other programs and there are tactical positions when stockfish is relatively weak to other programs.

Of course I do not suggest to tune it for test suites but to try to find ideas that help both in test suites and in games.

It is clearly one direction for improvement and it is a fact that stockfish did not get a big improvement lately by other methods.
There is no questions that (all other things being equal) better tactics will also help the program play a better positional game. But the concept of tactical play and positional play is really just terminology that we use (as humans) to distinguish between winning big and winning small. If a program had nothing but material as an evaluation function it would be quite capable of winning big (winning a piece or a pawn) but it would be constantly losing small. Most importantly, it would not be laying the groundwork for winning big.

The only way to help the evaluation appreciate winning big is to tell it the values of the pieces. That is only 5 terms and if you count combinations that win the "bishop pair" then you could say there are 6 features not counting checkmate or forced draws of course which I am assuming are not static evaluation function terms.

However, there are hundreds of potential issues that speak to the long term potential of the position such as mobility and many pawn structure terms. If your program understands these, it will play correctly and it will get into positions where a "big" win is relatively simple.

Here is a simple thought experiment. Imagine that you have 2 programs which are more or less identical except that one program has the material removed from the evaluation function. The other program has ONLY material and no other evaluation. If you played a 1 ply game you would the see the "positional" program making normal moves. The "tactical" program is just as likely to play 1. a4 on the first move as any other move. The positional program will build up it's position. BOTH programs will be somewhat capable of tactical as well as positional play and with increasing depth both will improve in all areas of the game. Which program will play the best game? I think the positional program will.

Given (let's say) a 10 ply search, the positional program will find tactics. If it can remove the opponents queen that will be a very good thing because it will allow the computer to increase all the small wins without the opponents queen frustrating its plans. And it won't let the opponent win it's pawns or pieces because they will hurt it's mobility and pawn structure.

The tactical program however will also play positional chess but only because bad positions lead to the eventual loss of material.

I have not backed up the assertion I am about to make with any tests, but I believe that if you played these two hypothetical programs against each other, the tactical program would win at very trivial depths but at depths modern programs are capable of it would crush the tactical program without any chance.

Larry and I have discovered positions where programs like houdini, robbo and Komodo require a 5 ply search to see trivial tactics that much weaker programs can see on a 2 ply search. And this requires modern program to require more nodes and time to see. This is because modern programs "cheat" a lot - trading risk for depth. They play the odds and favor missing big tactics over missing small tactics. The mechanism is usually in the form of various margins designed to avoid doing what a "good and proper" program should be doing.

The conclusion to me is inescapable, you have to make a lot of assumptions about what is likely to happen tactically in order to improve the strength of a chess program, so positional play is more important (in some difficult to define sense) than tactics.

The trick, as you point out, is to find ways to get the best of both worlds. I try to find ways for Komodo to not miss tactics in it's eagerness to plow ahead to the next iteration.

Having said all of that, I think you will find that the top programs are pretty strong tactically. Everything is relative. You cannot play grandmaster plus level and completely suck at tactics.
mcostalba
Posts: 2684
Joined: Sat Jun 14, 2008 9:17 pm

Re: stockfish and test positions

Post by mcostalba »

Uri Blass wrote: The reason is that stockfish prunes too much
The interesting part of this post is to experiment how, starting from a somehow arbitrary axiom (like the one you write above) it is possible to build up a complex and lengthy discussion out of it. This is what I call "having fun with words" :-)

Test positions are resolved or missed by engines in most of cases by pure luck IMHO, it is enough an infinitesimal change in an evaluation term or in a parameter to steer the search in one direction instead of another and so "discover" a tactical solution sooner or later with many plies of difference. It is a kind of butterfly effect applied to chess engines :-)
User avatar
Don
Posts: 5106
Joined: Tue Apr 29, 2008 4:27 pm

Re: stockfish and test positions

Post by Don »

mcostalba wrote:
Uri Blass wrote: The reason is that stockfish prunes too much
The interesting part of this post is to experiment how, starting from a somehow arbitrary axiom (like the one you write above) it is possible to build up a complex and lengthy discussion out of it. This is what I call "having fun with words" :-)
Yes, see some of the disputes I had with Bob Hyatt where we are arguing about some poorly defined concept and each of us are talking about two different things.

In this case I have always hated the term "positional" and "tactical" play because they each have different meanings to different people and they are rather abstract concepts anyway. There is no clear and unambiguous definition for these terms.

Test positions are resolved or missed by engines in most of cases by pure luck IMHO, it is enough an infinitesimal change in an evaluation term or in a parameter to steer the search in one direction instead of another and so "discover" a tactical solution sooner or later with many plies of difference. It is a kind of butterfly effect applied to chess engines :-)
There is a mate position I often test after each program changes and there is no pattern as to whether the program will solve it more quickly or less quickly and the depth will vary for no obvious reasons. I like the position because 20 years ago or more I used the same position, believing there was probably a forced mate but not not being able to prove it with a computer.
Uri Blass
Posts: 10309
Joined: Thu Mar 09, 2006 12:37 am
Location: Tel-Aviv Israel

Re: stockfish and test positions

Post by Uri Blass »

mcostalba wrote:
Uri Blass wrote: The reason is that stockfish prunes too much
The interesting part of this post is to experiment how, starting from a somehow arbitrary axiom (like the one you write above) it is possible to build up a complex and lengthy discussion out of it. This is what I call "having fun with words" :-)

Test positions are resolved or missed by engines in most of cases by pure luck IMHO, it is enough an infinitesimal change in an evaluation term or in a parameter to steer the search in one direction instead of another and so "discover" a tactical solution sooner or later with many plies of difference. It is a kind of butterfly effect applied to chess engines :-)
It is clear that if stockfish cannot find some simple tactics for other programs then it prunes too much in the relevant position.

Houdini can find it in 2 seconds at depth 13 and 2.641.769 nodes are enough for it.
Many weak programs are faster than stockfish in finding the right move.
I do not buy the luck story.
It is possible that a small change may fix the problem in this specific position so I do not suggest to use a single position as first testing but many positions when the target is to do changes that improve stockfish results in test positions and also to improve stockfish result in games.

If stockfish is 100 times slower than houdini in some test position then I believe that it is a weakness of stockfish and fixing the weakness in a correct way may improve the result of stockfish in games.

The target of chess programmers should be to improve the level of the program in all positions and test positions are part of the positions that you want to improve so I see no reason not to test in this direction by adding rules when not to prune that improve the results in test suites.

It is obvious that stockfish outsearches houdini and I believe that houdini has a superior search relative to stockfish so I guess that houdini has better rules when not to prune relative to stockfish.
Dann Corbit
Posts: 12541
Joined: Wed Mar 08, 2006 8:57 pm
Location: Redmond, WA USA

Re: stockfish and test positions

Post by Dann Corbit »

Uri Blass wrote:
mcostalba wrote:
Uri Blass wrote: The reason is that stockfish prunes too much
The interesting part of this post is to experiment how, starting from a somehow arbitrary axiom (like the one you write above) it is possible to build up a complex and lengthy discussion out of it. This is what I call "having fun with words" :-)

Test positions are resolved or missed by engines in most of cases by pure luck IMHO, it is enough an infinitesimal change in an evaluation term or in a parameter to steer the search in one direction instead of another and so "discover" a tactical solution sooner or later with many plies of difference. It is a kind of butterfly effect applied to chess engines :-)
It is clear that if stockfish cannot find some simple tactics for other programs then it prunes too much in the relevant position.

Houdini can find it in 2 seconds at depth 13 and 2.641.769 nodes are enough for it.
Many weak programs are faster than stockfish in finding the right move.
I do not buy the luck story.
It is possible that a small change may fix the problem in this specific position so I do not suggest to use a single position as first testing but many positions when the target is to do changes that improve stockfish results in test positions and also to improve stockfish result in games.

If stockfish is 100 times slower than houdini in some test position then I believe that it is a weakness of stockfish and fixing the weakness in a correct way may improve the result of stockfish in games.

The target of chess programmers should be to improve the level of the program in all positions and test positions are part of the positions that you want to improve so I see no reason not to test in this direction by adding rules when not to prune that improve the results in test suites.

It is obvious that stockfish outsearches houdini and I believe that houdini has a superior search relative to stockfish so I guess that houdini has better rules when not to prune relative to stockfish.
I am not sure that the observation about missing some tactics holds.

In the case of Stockfish, it is a very, very deep searcher (the deepest easily of all the strong engines, in fact). It seems to me that the very high strength of Stockfish may be *mainly* due to search.

As Christophe Theron once said, "Search is also knowledge".

It could be that evaluation changes are what is needed to increase the strength of Stockfish rather than search changes (or, more conservatively, that evaluation changes could produce benefit faster than search changes).

Often, tactical positions involve some sort of strange decision, like tossing a piece to gain an advantage:
[d]1r3rk1/3bbppp/1qn2P2/p2pP1P1/3P4/2PB1N2/6K1/qNBQ1R2 w - -
which in general is a bad idea, but once in a while pans out. Houdini solves the above position quickly, and Stockfish takes much longer. But correcting that might make Stockfish play worse and not better.

Since Stockfish is open source, we can easily test our theories if we have enough interest in it.