OK, I tried your idea (more or less) and tried also to output the case which this occur. Most of them was very short term, such as the pawn will be captured vary soon.
Some of the few first positions I had are:
rnbqkbnr/pp2pppp/2p5/1B1P4/8/8/PPPP1PPP/RNBQK1NR b KQkq - 0 3
rnbqkbnr/ppp1pppp/8/8/3P4/5p2/PPP2PPP/RNBQKB1R w KQkq - 0 4rnbqkbnr/ppp1pppp/8/8/3Pp3/5P2/PPP3PP/RNBQKBNR b KQkq - 0 3
rnbqkb1r/ppp1nppp/4p3/3P4/3P4/8/PPP2PPP/RNBQKBNR b KQkq - 0 4
rn1qkbnr/pp3ppp/4p3/3p1b2/3p4/P1N1PN2/1PP2PPP/R1BQKB1R w KQkq - 0 6
Advanced levers
Moderator: Ras
-
- Posts: 6052
- Joined: Tue Jun 12, 2012 12:41 pm
Re: Advanced levers
Just stick to search, Thomas.tpetzke wrote:iCE currently does not but it is a bit hard to tell anyway without considering the mobility scores.I can hardly give an advice to an author whose engine evaluates the queen higher in the middlegame than in the endgame.
Thanks for the double pawn stuff. I'll bookmark this and test some of them when I turn my focus on eval again, currently I'm doing a bit on my search framework.
Thomas...
It is more promising.

-
- Posts: 6052
- Joined: Tue Jun 12, 2012 12:41 pm
Re: Advanced levers
Hi Carl.carldaman wrote:Hi Lyudmil - not sure if it was mentioned, but doubled AND isolated on an (opponent's) open file with no chance of liquidation (trades) should be worth a bigger penalty.Lyudmil Tsvetkov wrote:Thanks Thomas.tpetzke wrote:Thanks for your interesting ideas. They are always inspiring.
If you are thinking about pawns currently, what are your thoughts on doubled pawns. I find this a very difficult feature, and I've read Larry's article on it, but so far I had not really luck with it.
Sometimes the double pawn are no weakness at all, sometimes even a strength and this makes it a difficult feature to implement for me.
Thomas...
You are flattering me unnecessarily, but never mind.
I can hardly give an advice to an author whose engine evaluates the queen higher in the middlegame than in the endgame.
Concerning doubled pawns however, there is nothing easier than that, although many people say they are worthless. A couple of very easy rules:
1. Give standard penalty, say 20cps, to a random doubled pawn.
2. Increase this penalty by 25% if the pawn is opposed by an enemy pawn, so the 20cps become 25cps. This is because such opposed pawns undouble more difficult.
3. Decrease this penalty by 25% if the pawn is not opposed on the same file by an enemy pawn, so the 20cps become 15cps. This is because the pawn undoubles easier.
4. increase the penalty by 25% if the pawn is blocked by an enemy pawn, further to already being opposed, as this makes undoubling even more difficult. Thus the 20cps become 25cps for this.
5. Increase the penalty by another 25% further if the pawn is opposed and conditions on the 2 adjacent files are fully equal for the 2 sides: no pawns or just one pawn each side, as this makes the doubled feature very permanent and greatly depreciates the doubled pawn.
6. increase the penalty by another 25% if the pawn is blocked and conditions on the 2 adjacent files are fully equal as above, for the similar reason, but highlighted further.
7. increase the penalty by 50% if the doubled pawn is isolated at the same time. So the 20cps become 30cps. Please note that this increase is above the isolated penalty. Penalising doubled and isolated separately does not explain things and is not enough, as doubled pawns that are isolated at the same time are an enormous liability.
8. score edge a and h doubled pawn significantly higher than other files, as they are depreciated there enormously and very immobile. The standard 20cps penalty could become 30cps for a and h files.
Very simple rules. Considering that rules 5 and 6 are a bit difficult to implement (you have to specify), I think you could easily and successfully implement at least 1,2,3,4,7 and 8. On the other hand, 5 and 6 are important rules as bigger penalties are involved.
Standard 20cps penalty for b3, any doubled pawn (I will refer here to the more advanced pawn as the doubled pawn)
8 7 6 5 4 3 2 1 a b c d e f g h
6k1/6p1/8/4P3/4P3/1P4P1/1PP3PP/6K1 w - - 0 1
50% higher penalty for e5, that is also isolated, so it gets 30cps.
25% higher penalty for g3 that is opposed by enemy g7, so the penalty becomes 25cps.
25% lower penalty for b3, as it is not opposed by an enemy pawn on the same file, so the 20cps become 15cps.
8 7 6 5 4 3 2 1 a b c d e f g h
6k1/2p2pp1/4p3/8/4P3/1P2PP2/1PP4P/6K1 w - - 0 1
increased penalty for e4, as it is opposed and conditions on the 2 adjacent files are equal for both sides in terms of pawns.
25% higher penalty for b4, e4 and g3, as they are blocked by enemy pawns. The 20cps become 25cps.
8 7 6 5 4 3 2 1 a b c d e f g h
6k1/p7/2p5/1p2p2p/1P2P1p1/2P1P1P1/1P4PP/6K1 w - - 0 1
further penalty for e4 and g3, as conditions on the 2 adjacent files are equal in terms of pawns and they are blocked.
I can not tell you if the b or d doubled pawn is weaker, probably about equal (and the same would hold true for c and f doubled pawns, I can not see distinction between those pawns in terms of doubleness), but the h doubled pawn is quite certainly much weaker than all other doubled pawns. So that I would evaluate edge a and h doubled pawns apart with bigger penalties. They are much less mobile and also more difficult to connect to other friendly pawns on adjacent files.
8 7 6 5 4 3 2 1 a b c d e f g h
6k1/pp3pp1/2ppp2p/8/3P4/1P1P2PP/1PP4P/6K1 w - - 0 1
As you see, it is all very simple:
- increased penalty when doubled is opposed, blocked or isolated
- increased penalty when conditions on the 2 adjacent files are equal
- increased penalty for edge a and h files
- decreased penalty when doubled is unopposed
Happy testing.
Glad you got around to checking out Kmoch's book. Funny thing is that SF was known to have trouble maintaining the tension up until a year ago. It was one of the main reasons I didn't like to use it for analysis in those days.
CL
I would expect a bit more knowledgeable contribution from you on the topic of levers, after all you have read Mr. Kmoch's book in-depth...
I never had the impression SF has had any problems with pawn levers in the past; on the contrary, I have always thought it plays them very well, but who knows.
You can possibly apply this when you are deficient on pawn storms, breaks on the queen side, tactically weak, etc. And I never got the impression SF is one of these.
Btw., just to update you, I looked at some 10-12 more games, and it proved that you can not draw a general conclusion about how much levers last on average. In most cases pawn levers tend to be very short or short, some 1,3,5,8 plies, but there are also quite frequent cases when a lever lasts 15,20 and more plies. In one of the games I saw a lever that lasted 40 plies... So not easy to classify.
-
- Posts: 6052
- Joined: Tue Jun 12, 2012 12:41 pm
Re: Advanced levers
8 | |||||||||
7 | |||||||||
6 | |||||||||
5 | |||||||||
4 | |||||||||
3 | |||||||||
2 | |||||||||
1 | |||||||||
a | b | c | d | e | f | g | h |
rnbqkbnr/pp2pppp/2p5/1B1P4/8/8/PPPP1PPP/RNBQK1NR b KQkq - 0 3
8 | |||||||||
7 | |||||||||
6 | |||||||||
5 | |||||||||
4 | |||||||||
3 | |||||||||
2 | |||||||||
1 | |||||||||
a | b | c | d | e | f | g | h |
rnbqkbnr/ppp1pppp/8/8/3P4/5p2/PPP2PPP/RNBQKB1R w KQkq - 0 4
8 | |||||||||
7 | |||||||||
6 | |||||||||
5 | |||||||||
4 | |||||||||
3 | |||||||||
2 | |||||||||
1 | |||||||||
a | b | c | d | e | f | g | h |
rnbqkbnr/ppp1pppp/8/8/3Pp3/5P2/PPP3PP/RNBQKBNR b KQkq - 0 3
8 | |||||||||
7 | |||||||||
6 | |||||||||
5 | |||||||||
4 | |||||||||
3 | |||||||||
2 | |||||||||
1 | |||||||||
a | b | c | d | e | f | g | h |
rnbqkb1r/ppp1nppp/4p3/3P4/3P4/8/PPP2PPP/RNBQKBNR b KQkq - 0 4
8 | |||||||||
7 | |||||||||
6 | |||||||||
5 | |||||||||
4 | |||||||||
3 | |||||||||
2 | |||||||||
1 | |||||||||
a | b | c | d | e | f | g | h |
rn1qkbnr/pp3ppp/4p3/3p1b2/3p4/P1N1PN2/1PP2PPP/R1BQKB1R w KQkq - 0 6
-
- Posts: 6052
- Joined: Tue Jun 12, 2012 12:41 pm
Re: Advanced levers
Thanks Reuven.rap wrote:OK, I tried your idea (more or less) and tried also to output the case which this occur. Most of them was very short term, such as the pawn will be captured vary soon.
Some of the few first positions I had are:
rnbqkbnr/pp2pppp/2p5/1B1P4/8/8/PPPP1PPP/RNBQK1NR b KQkq - 0 3
rnbqkbnr/ppp1pppp/8/8/3P4/5p2/PPP2PPP/RNBQKB1R w KQkq - 0 4rnbqkbnr/ppp1pppp/8/8/3Pp3/5P2/PPP3PP/RNBQKBNR b KQkq - 0 3
rnbqkb1r/ppp1nppp/4p3/3P4/3P4/8/PPP2PPP/RNBQKBNR b KQkq - 0 4
rn1qkbnr/pp3ppp/4p3/3p1b2/3p4/P1N1PN2/1PP2PPP/R1BQKB1R w KQkq - 0 6
I am not sure this could benefit SF very much, as it is tactically very strong.
This could rather be of use to tactically weaker engines with somewhat deficient pawn storm code, queenside break code, etc.
Anyway, thanks very much!
-
- Posts: 2285
- Joined: Sat Jun 02, 2012 2:13 am
Re: Advanced levers
I know there was a general agreement (if we can call it that) about a year ago or before that, that SF was releasing the tension too early, and many promising attacking positions would dry up as a result. Of course, it's hard to say how long tension should be maintained. In some case, it is best to release it as the search requires, but all things being equal keeping the tension longer can't be wrong.Lyudmil Tsvetkov wrote:Hi Carl.carldaman wrote:Hi Lyudmil - not sure if it was mentioned, but doubled AND isolated on an (opponent's) open file with no chance of liquidation (trades) should be worth a bigger penalty.Lyudmil Tsvetkov wrote:Thanks Thomas.tpetzke wrote:Thanks for your interesting ideas. They are always inspiring.
If you are thinking about pawns currently, what are your thoughts on doubled pawns. I find this a very difficult feature, and I've read Larry's article on it, but so far I had not really luck with it.
Sometimes the double pawn are no weakness at all, sometimes even a strength and this makes it a difficult feature to implement for me.
Thomas...
You are flattering me unnecessarily, but never mind.
I can hardly give an advice to an author whose engine evaluates the queen higher in the middlegame than in the endgame.
Concerning doubled pawns however, there is nothing easier than that, although many people say they are worthless. A couple of very easy rules:
1. Give standard penalty, say 20cps, to a random doubled pawn.
2. Increase this penalty by 25% if the pawn is opposed by an enemy pawn, so the 20cps become 25cps. This is because such opposed pawns undouble more difficult.
3. Decrease this penalty by 25% if the pawn is not opposed on the same file by an enemy pawn, so the 20cps become 15cps. This is because the pawn undoubles easier.
4. increase the penalty by 25% if the pawn is blocked by an enemy pawn, further to already being opposed, as this makes undoubling even more difficult. Thus the 20cps become 25cps for this.
5. Increase the penalty by another 25% further if the pawn is opposed and conditions on the 2 adjacent files are fully equal for the 2 sides: no pawns or just one pawn each side, as this makes the doubled feature very permanent and greatly depreciates the doubled pawn.
6. increase the penalty by another 25% if the pawn is blocked and conditions on the 2 adjacent files are fully equal as above, for the similar reason, but highlighted further.
7. increase the penalty by 50% if the doubled pawn is isolated at the same time. So the 20cps become 30cps. Please note that this increase is above the isolated penalty. Penalising doubled and isolated separately does not explain things and is not enough, as doubled pawns that are isolated at the same time are an enormous liability.
8. score edge a and h doubled pawn significantly higher than other files, as they are depreciated there enormously and very immobile. The standard 20cps penalty could become 30cps for a and h files.
Very simple rules. Considering that rules 5 and 6 are a bit difficult to implement (you have to specify), I think you could easily and successfully implement at least 1,2,3,4,7 and 8. On the other hand, 5 and 6 are important rules as bigger penalties are involved.
Standard 20cps penalty for b3, any doubled pawn (I will refer here to the more advanced pawn as the doubled pawn)
8 7 6 5 4 3 2 1 a b c d e f g h
6k1/6p1/8/4P3/4P3/1P4P1/1PP3PP/6K1 w - - 0 1
50% higher penalty for e5, that is also isolated, so it gets 30cps.
25% higher penalty for g3 that is opposed by enemy g7, so the penalty becomes 25cps.
25% lower penalty for b3, as it is not opposed by an enemy pawn on the same file, so the 20cps become 15cps.
8 7 6 5 4 3 2 1 a b c d e f g h
6k1/2p2pp1/4p3/8/4P3/1P2PP2/1PP4P/6K1 w - - 0 1
increased penalty for e4, as it is opposed and conditions on the 2 adjacent files are equal for both sides in terms of pawns.
25% higher penalty for b4, e4 and g3, as they are blocked by enemy pawns. The 20cps become 25cps.
8 7 6 5 4 3 2 1 a b c d e f g h
6k1/p7/2p5/1p2p2p/1P2P1p1/2P1P1P1/1P4PP/6K1 w - - 0 1
further penalty for e4 and g3, as conditions on the 2 adjacent files are equal in terms of pawns and they are blocked.
I can not tell you if the b or d doubled pawn is weaker, probably about equal (and the same would hold true for c and f doubled pawns, I can not see distinction between those pawns in terms of doubleness), but the h doubled pawn is quite certainly much weaker than all other doubled pawns. So that I would evaluate edge a and h doubled pawns apart with bigger penalties. They are much less mobile and also more difficult to connect to other friendly pawns on adjacent files.
8 7 6 5 4 3 2 1 a b c d e f g h
6k1/pp3pp1/2ppp2p/8/3P4/1P1P2PP/1PP4P/6K1 w - - 0 1
As you see, it is all very simple:
- increased penalty when doubled is opposed, blocked or isolated
- increased penalty when conditions on the 2 adjacent files are equal
- increased penalty for edge a and h files
- decreased penalty when doubled is unopposed
Happy testing.
Glad you got around to checking out Kmoch's book. Funny thing is that SF was known to have trouble maintaining the tension up until a year ago. It was one of the main reasons I didn't like to use it for analysis in those days.
CL
I would expect a bit more knowledgeable contribution from you on the topic of levers, after all you have read Mr. Kmoch's book in-depth...
I never had the impression SF has had any problems with pawn levers in the past; on the contrary, I have always thought it plays them very well, but who knows.
You can possibly apply this when you are deficient on pawn storms, breaks on the queen side, tactically weak, etc. And I never got the impression SF is one of these.
Btw., just to update you, I looked at some 10-12 more games, and it proved that you can not draw a general conclusion about how much levers last on average. In most cases pawn levers tend to be very short or short, some 1,3,5,8 plies, but there are also quite frequent cases when a lever lasts 15,20 and more plies. In one of the games I saw a lever that lasted 40 plies... So not easy to classify.
People talk about pawn breaks a lot, but they are just levers against an opponent's static pawn structure. I wonder if there would be any benefit to the eval, if these potential pawn breaks can be counted and quantified in some way. Generally, the side with more (possible) pawn breaks has a lot of hidden potential that may or not be reflected in the engine eval.
It's been 20+ years since I read the Kmoch book. It definitely made me a better positional player at the time. It was a unique and original book that didn't retread the same old material.
-
- Posts: 6052
- Joined: Tue Jun 12, 2012 12:41 pm
Re: Advanced levers
Hi Carl.carldaman wrote:I know there was a general agreement (if we can call it that) about a year ago or before that, that SF was releasing the tension too early, and many promising attacking positions would dry up as a result. Of course, it's hard to say how long tension should be maintained. In some case, it is best to release it as the search requires, but all things being equal keeping the tension longer can't be wrong.Lyudmil Tsvetkov wrote:Hi Carl.carldaman wrote:Hi Lyudmil - not sure if it was mentioned, but doubled AND isolated on an (opponent's) open file with no chance of liquidation (trades) should be worth a bigger penalty.Lyudmil Tsvetkov wrote:Thanks Thomas.tpetzke wrote:Thanks for your interesting ideas. They are always inspiring.
If you are thinking about pawns currently, what are your thoughts on doubled pawns. I find this a very difficult feature, and I've read Larry's article on it, but so far I had not really luck with it.
Sometimes the double pawn are no weakness at all, sometimes even a strength and this makes it a difficult feature to implement for me.
Thomas...
You are flattering me unnecessarily, but never mind.
I can hardly give an advice to an author whose engine evaluates the queen higher in the middlegame than in the endgame.
Concerning doubled pawns however, there is nothing easier than that, although many people say they are worthless. A couple of very easy rules:
1. Give standard penalty, say 20cps, to a random doubled pawn.
2. Increase this penalty by 25% if the pawn is opposed by an enemy pawn, so the 20cps become 25cps. This is because such opposed pawns undouble more difficult.
3. Decrease this penalty by 25% if the pawn is not opposed on the same file by an enemy pawn, so the 20cps become 15cps. This is because the pawn undoubles easier.
4. increase the penalty by 25% if the pawn is blocked by an enemy pawn, further to already being opposed, as this makes undoubling even more difficult. Thus the 20cps become 25cps for this.
5. Increase the penalty by another 25% further if the pawn is opposed and conditions on the 2 adjacent files are fully equal for the 2 sides: no pawns or just one pawn each side, as this makes the doubled feature very permanent and greatly depreciates the doubled pawn.
6. increase the penalty by another 25% if the pawn is blocked and conditions on the 2 adjacent files are fully equal as above, for the similar reason, but highlighted further.
7. increase the penalty by 50% if the doubled pawn is isolated at the same time. So the 20cps become 30cps. Please note that this increase is above the isolated penalty. Penalising doubled and isolated separately does not explain things and is not enough, as doubled pawns that are isolated at the same time are an enormous liability.
8. score edge a and h doubled pawn significantly higher than other files, as they are depreciated there enormously and very immobile. The standard 20cps penalty could become 30cps for a and h files.
Very simple rules. Considering that rules 5 and 6 are a bit difficult to implement (you have to specify), I think you could easily and successfully implement at least 1,2,3,4,7 and 8. On the other hand, 5 and 6 are important rules as bigger penalties are involved.
Standard 20cps penalty for b3, any doubled pawn (I will refer here to the more advanced pawn as the doubled pawn)
8 7 6 5 4 3 2 1 a b c d e f g h
6k1/6p1/8/4P3/4P3/1P4P1/1PP3PP/6K1 w - - 0 1
50% higher penalty for e5, that is also isolated, so it gets 30cps.
25% higher penalty for g3 that is opposed by enemy g7, so the penalty becomes 25cps.
25% lower penalty for b3, as it is not opposed by an enemy pawn on the same file, so the 20cps become 15cps.
8 7 6 5 4 3 2 1 a b c d e f g h
6k1/2p2pp1/4p3/8/4P3/1P2PP2/1PP4P/6K1 w - - 0 1
increased penalty for e4, as it is opposed and conditions on the 2 adjacent files are equal for both sides in terms of pawns.
25% higher penalty for b4, e4 and g3, as they are blocked by enemy pawns. The 20cps become 25cps.
8 7 6 5 4 3 2 1 a b c d e f g h
6k1/p7/2p5/1p2p2p/1P2P1p1/2P1P1P1/1P4PP/6K1 w - - 0 1
further penalty for e4 and g3, as conditions on the 2 adjacent files are equal in terms of pawns and they are blocked.
I can not tell you if the b or d doubled pawn is weaker, probably about equal (and the same would hold true for c and f doubled pawns, I can not see distinction between those pawns in terms of doubleness), but the h doubled pawn is quite certainly much weaker than all other doubled pawns. So that I would evaluate edge a and h doubled pawns apart with bigger penalties. They are much less mobile and also more difficult to connect to other friendly pawns on adjacent files.
8 7 6 5 4 3 2 1 a b c d e f g h
6k1/pp3pp1/2ppp2p/8/3P4/1P1P2PP/1PP4P/6K1 w - - 0 1
As you see, it is all very simple:
- increased penalty when doubled is opposed, blocked or isolated
- increased penalty when conditions on the 2 adjacent files are equal
- increased penalty for edge a and h files
- decreased penalty when doubled is unopposed
Happy testing.
Glad you got around to checking out Kmoch's book. Funny thing is that SF was known to have trouble maintaining the tension up until a year ago. It was one of the main reasons I didn't like to use it for analysis in those days.
CL
I would expect a bit more knowledgeable contribution from you on the topic of levers, after all you have read Mr. Kmoch's book in-depth...
I never had the impression SF has had any problems with pawn levers in the past; on the contrary, I have always thought it plays them very well, but who knows.
You can possibly apply this when you are deficient on pawn storms, breaks on the queen side, tactically weak, etc. And I never got the impression SF is one of these.
Btw., just to update you, I looked at some 10-12 more games, and it proved that you can not draw a general conclusion about how much levers last on average. In most cases pawn levers tend to be very short or short, some 1,3,5,8 plies, but there are also quite frequent cases when a lever lasts 15,20 and more plies. In one of the games I saw a lever that lasted 40 plies... So not easy to classify.
People talk about pawn breaks a lot, but they are just levers against an opponent's static pawn structure. I wonder if there would be any benefit to the eval, if these potential pawn breaks can be counted and quantified in some way. Generally, the side with more (possible) pawn breaks has a lot of hidden potential that may or not be reflected in the engine eval.
It's been 20+ years since I read the Kmoch book. It definitely made me a better positional player at the time. It was a unique and original book that didn't retread the same old material.
There might be some added value about pawn breaks, I do not know.
On the other hand SF breaks all too often the position open in my games, even in situations I totally do not expect it to do so, and when breaks at first glance seem absolutely impossible...
Obviously, its search guides it through.
-
- Posts: 12
- Joined: Mon May 12, 2014 5:21 pm
Re: Advanced levers
Tryied it again, and it passed both STC and LTC at Testing Framework.
http://tests.stockfishchess.org/tests/v ... 380f640ed3
http://tests.stockfishchess.org/tests/v ... 46444cb4ea
Thank you very much!
http://tests.stockfishchess.org/tests/v ... 380f640ed3
http://tests.stockfishchess.org/tests/v ... 46444cb4ea
Thank you very much!
-
- Posts: 6052
- Joined: Tue Jun 12, 2012 12:41 pm
Re: Advanced levers
Thank you very much, Reuven.rap wrote:Tryied it again, and it passed both STC and LTC at Testing Framework.
http://tests.stockfishchess.org/tests/v ... 380f640ed3
http://tests.stockfishchess.org/tests/v ... 46444cb4ea
Thank you very much!
That would be a nice present for my birthday tomorrow, if Marco applies it.

But I doubt that will happen, even with the new SPRT.
It took a lot of games to pass, it is possible that some other values, for example lower for 5th and higher for 6th, or vice versa, do better.
So that unofficial definitions also work sometimes.
Thank you very much again Reuven, I am also very happy.
-
- Posts: 12
- Joined: Mon May 12, 2014 5:21 pm
Re: Advanced levers
One of my previous patched passed LTC with more than 100K games and applied. With SPRT human intuition is useless and sometimes misleading.Lyudmil Tsvetkov wrote:
But I doubt that will happen, even with the new SPRT.
It took a lot of games to pass, it is possible that some other values, for example lower for 5th and higher for 6th, or vice versa, do better.
So that unofficial definitions also work sometimes.
Thank you very much again Reuven, I am also very happy.
Tuning can be done before or after patch apply, but cannot prevent it.
The only 'danger' for the patch is that it might pass because of under-evaluation of advanced pawns in general. In this case, someone will post a [-3, 1] SPRT test and remove it later.