A balanced approach to imbalances

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

Moderator: Ras

Lyudmil Tsvetkov
Posts: 6052
Joined: Tue Jun 12, 2012 12:41 pm

A balanced approach to imbalances

Post by Lyudmil Tsvetkov »

I just wrote a very tiny document on imbalances evaluation.

It is available for download here, http://www.freeuploadsite.com/do.php?id=23623, maybe someone would be interested, or otherwise, even if downloaded, there is always the recycle bin :) (but do not forget to empty it in a while)

Best, Lyudmil
User avatar
hgm
Posts: 28419
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: A balanced approach to imbalances

Post by hgm »

I think you left out one of the most fundamental aspect of imbalances, which is Reinhard Scharnagle's 'elephantiasis effect'. The factors you take into account would have a very hard time explaining why 7 Knights are so much stronger than 3 Queens, while any reasonable set of piece values would predict exactly the opposite. Of course I realize this is an extreme situation, which would never occur in practice, but that is just to magnify the effect such that most engines would mis-evaluate it by about 9 Pawns.

This huge value shows that sizable corrections must remain even when you scale it down to realistic imbalances, for instance why the Queen side with Q+R vs R+B+B+N should seek trading the Rooks.

Valuable pieces devaluate in the presence of enemy lower pieces, and each extra lower-valued opponent suppresses its value further, because it interdicts access for it to part of the board.
Lyudmil Tsvetkov
Posts: 6052
Joined: Tue Jun 12, 2012 12:41 pm

Re: A balanced approach to imbalances

Post by Lyudmil Tsvetkov »

hgm wrote:I think you left out one of the most fundamental aspect of imbalances, which is Reinhard Scharnagle's 'elephantiasis effect'. The factors you take into account would have a very hard time explaining why 7 Knights are so much stronger than 3 Queens, while any reasonable set of piece values would predict exactly the opposite. Of course I realize this is an extreme situation, which would never occur in practice, but that is just to magnify the effect such that most engines would mis-evaluate it by about 9 Pawns.

This huge value shows that sizable corrections must remain even when you scale it down to realistic imbalances, for instance why the Queen side with Q+R vs R+B+B+N should seek trading the Rooks.

Valuable pieces devaluate in the presence of enemy lower pieces, and each extra lower-valued opponent suppresses its value further, because it interdicts access for it to part of the board.
[d]2n2nk1/n1p1nnp1/1n3p1n/8/1P1PQ3/1Q3P2/3Q4/6K1 w - - 0 1
I think white wins here easily, maybe someone could check. I tried to create as realistic position as possible, it seems that all knights defend well, but black should still lose.

Regarding Q+R vs R+B+B+N, and the possibility for exchange of rooks, I think that both imbalances would highly favour the side with the 2 bishops, precisely because of that reason (as Q is better than B+N+N, but worse than B+B+N). According to my humble theory of complementarity (which might not be new, or not entirely new, I do not care), indeed the queen side would be favoured by exchange of rooks, as in the Q you would have 2 capacities (linear and diagonal), and in the B+B+N - also 2 (diagonal and knight), while with rooks added you would have again just 2 capacities in the Q+R (linear and diagonal, the rook adds nothing of value here in terms of complementarity), but already 3 capacities in the R+B+B+N (linear, diagonal and knight, here the rooks already adds another capacity and real complementary value). Repetitions would be less important, but here they are almost equal.

Regarding your theory that pieces of lower power, when in big numbers, are valuable because they would limit the mobility of the pieces of bigger strength, I absolutely do not know if this is so. Special conditions on the board could make it so, but they could also make it exactly the opposite way, i.e., the presence of a queen would be dangerous for the mobility/existence of a lower power piece. I really do not know if any specific rules could be formulated here, for me, it is very much like pieces of bigger and lower power in respect of attack and defence: bigger power pieces are more valuable in attacking, but less valuable in defence.

For me, imbalances would have more to do with the potential access to a range of squares, rather than to the immediate access to such squares. Mobility would be responsible more for the immediate access, while complementarity for the potential access, that might matter in a number of moves.

The document is very rough, I included just the most obvious and important ideas, there are many others, but those for me are which really matter, as well as having considerable practical impact.
syzygy
Posts: 5801
Joined: Tue Feb 28, 2012 11:56 pm

Re: A balanced approach to imbalances

Post by syzygy »

Lyudmil Tsvetkov wrote:[d]2n2nk1/n1p1nnp1/1n3p1n/8/1P1PQ3/1Q3P2/3Q4/6K1 w - - 0 1
I think white wins here easily, maybe someone could check. I tried to create as realistic position as possible, it seems that all knights defend well, but black should still lose.
I don't know the game-theoretic outcome of this position, but the fact that my engine's evaluation for white keeps dropping with each extra ply searched certainly does not disprove the "elephantiasis effect". My guess is that black will eat all of white's pawns and then promotes one of its own.
User avatar
hgm
Posts: 28419
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: A balanced approach to imbalances

Post by hgm »

Lyudmil Tsvetkov wrote: [d]2n2nk1/n1p1nnp1/1n3p1n/8/1P1PQ3/1Q3P2/3Q4/6K1 w - - 0 1
I think white wins here easily, maybe someone could check. I tried to create as realistic position as possible, it seems that all knights defend well, but black should still lose.
And how wrong you are! :D

Let's have Stockfish play it against a 2400-Elo engine:

Code: Select all

[Event "Computer Chess Game"]
[Site "MAKRO-PC"]
[Date "2013.10.23"]
[Round "-"]
[White "Stockfish 4 64 SSE4.2"]
[Black "QueeNy 0.16"]
[Result "0-1"]
[TimeControl "40/300"]
[FEN "2n2nk1/n1p1nnp1/1n3p1n/8/1P1PQ3/1Q3P2/3Q4/6K1 w - - 0 1"]
[SetUp "1"]

{--------------
. . n . . n k .
n . p . n n p .
. n . . . p . n
. . . . . . . .
. P . P Q . . .
. Q . . . P . .
. . . Q . . . .
. . . . . . K .
white to play
--------------}
1. Qb7 {+7.41/16} Nb5 {+6.55/15 5} 2. Qa6 {+4.96/19 19} c6 {+7.00/14 6} 3.
Qbd1 {+6.10/17 16} Nbd5 {+7.44/13 4} 4. Qh2 {+5.37/18 10} Nhf5 {+8.97/13 6}
5. Kf2 {+4.84/18 9} Nbxd4 {+9.25/14 6} 6. b5 {+3.81/18 10} cxb5
{+10.62/14 6} 7. Qdh1 {+2.88/19 4} Ne5 {+11.39/14 8} 8. Qa5 {+1.41/19 13}
Nfg6 {+11.66/13 8} 9. Qa3 {+0.00/18 8} Ngf4 {+13.13/14 11} 10. Qb1
{-2.80/18 1.0} Ncd6 {+12.63/13 4} 11. Qhh1 {-4.90/16 6} Ndc4
{+16.14/13 2.2} 12. Qa8+ {-6.76/18 6} Kf7 {+16.27/15 5} 13. Qhh8
{-9.45/21 9} Nfd3+ {+16.77/14 8} 14. Qxd3 {-10.08/20 2.6} Nxd3+
{+16.87/15 8} 15. Kg1 {-10.78/21 3} Nxf3+ {+16.83/14 5} 16. Kh1
{-5.21/14 2.0} N3d4 {+16.85/14 6} 17. Qhe8+ {-6.70/16 7} Ke6 {+16.94/15 8}
18. Qeb8 {-10.02/20 7} g5 {+17.02/14 8} 19. Qa6+ {-11.85/21 17} Nfd6
{+16.88/10 0.1} 20. Qa2 {-13.11/20 9} Nef5 {+17.04/13 5} 21. Qb1
{-12.00/18 8} N5f4 {+17.15/13 2.2} 22. Qa2 {-14.62/20 5} Ng3+ {+26.27/15 7}
23. Kh2 {-104.13/21 1.9} Nge4 {+26.42/15 8} 24. Kh1 {-104.13/21 31} Kf5
{+31.39/10 0.1} 25. Qba8 {-99.84/18 5} Nf3 {+319.92/16 9} 26. Qd5+
{-99.86/27 5} Nxd5 {+319.93/20 9} 27. Qg2 {-99.88/34 0.1} Nef2+
{+319.94/22 7} 28. Qxf2 {-99.90/70 5} Nxf2+ {+319.95/26 7} 29. Kg2
{-99.92/100 0.1} Nf4+ {+319.96/26 8} 30. Kf1 {-99.94/100 0.2} Ncd2+
{+319.96/26 6} 31. Kxf2 {-99.94/100 0.2} N6e4+ {+319.97/30 9} 32. Ke3
{-99.96/100 0.1} Nc4+ {+319.98/33 5} 33. Kxf3 {-99.98/100 0.1} g4#
{+319.99/42 11}
{Xboard adjudication: Checkmate} 0-1
[d]8/8/5p2/1p3k2/2n1nnp1/5K2/8/8 w - - 0 34
Poor Stockfish... Pickled and packed!

Initially Stockfish sees things your way (+7.41). Queeny already knows better. But Stockfish starts revising its score downward very quickly, as the loss of the first of its Queens comes within the horizon.

Promoting wasn't even necessary. Just go for the throat.

If you want to try it yourself, you can try this with your favorite engine. The recommended opponent is Queeny. It would beat Stockfish probably even with 6 Knights against 3 Queens! :P
Last edited by hgm on Wed Oct 23, 2013 10:08 pm, edited 1 time in total.
Lyudmil Tsvetkov
Posts: 6052
Joined: Tue Jun 12, 2012 12:41 pm

Re: A balanced approach to imbalances

Post by Lyudmil Tsvetkov »

syzygy wrote:
Lyudmil Tsvetkov wrote:[d]2n2nk1/n1p1nnp1/1n3p1n/8/1P1PQ3/1Q3P2/3Q4/6K1 w - - 0 1
I think white wins here easily, maybe someone could check. I tried to create as realistic position as possible, it seems that all knights defend well, but black should still lose.
I don't know the game-theoretic outcome of this position, but the fact that my engine's evaluation for white keeps dropping with each extra ply searched certainly does not disprove the "elephantiasis effect". My guess is that black will eat all of white's pawns and then promotes one of its own.
I am sure other engines could also lose that for white, if they proceed the materialistic way. But for me, white has a clear winning plan: sacrifice both queens for 2 enemy knights each, eat in the process the c7 pawn, win one other black knight for the b white passer, and then proceed to win the remaining endgame of Q and p vs N+N+ 2p, maybe with the help of syzygy tablebases :D

The right approach would be to sacrifice a pair of queens for 4 knights, but white should proceed quickly, if you do not sacrifice, maybe it is difficult to win.
User avatar
hgm
Posts: 28419
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: A balanced approach to imbalances

Post by hgm »

Lyudmil Tsvetkov wrote:But for me, white has a clear winning plan: sacrifice both queens for 2 enemy knights each, eat in the process the c7 pawn, win one other black knight for the b white passer, and then proceed to win the remaining endgame of Q and p vs N+N+ 2p, maybe with the help of syzygy tablebases :D

The right approach would be to sacrifice a pair of queens for 4 knights, but white should proceed quickly, if you do not sacrifice, maybe it is difficult to win.
Good plan. Now see if the engine playing the Knights would allow you to make such sacrifices. (That is what distinguishes QueeNy from other engines: it values 2N > Q, as you should with this imbalance. So it will never offer you such trades.)

With 7 Knights in general the Knights never need to expose themselves to a two-for-one trade. QueeNy would even win this with the Knights against an opponent that strives for such trades (namely itself), no matter how much time advantage that opponent is given to make it tactically superior. Believe me, I extensively tried that. The position is utterly won for black.

Just post a game where you beat QueeNy here from this position to prove me wrong.

Against only 6 Knights your plan would work, btw.
Lyudmil Tsvetkov
Posts: 6052
Joined: Tue Jun 12, 2012 12:41 pm

Re: A balanced approach to imbalances

Post by Lyudmil Tsvetkov »

Btw., factors like blocked pawns might seem utterly inappropriate when adjusting piece values, but that will be so only when both players have exactly the same set of pieces. In this case, obviously, many conditions, including blocked pawns, would be the same for both opponents. But when an imbalance arises, it suddenly becomes evident that blocked pawns are more beneficial to some pieces and less to other, even detrimental. So, considering blocked pawns would be useful only with imbalances, but very much so, as blockages are not that rare. For me, blocked pawns having an impact on piece values is a very major term, I do not know about possible implementation.

Very much the same with play/available pawns on both sides/wings of the board. This is also a major term, affecting piece values, but only with imbalances, as otherwise conditions will be the same for both players. It is relevant not only to B vs N, but also to many other imbalances, but those are possibly less known.

How should we evaluate the imbalance R vs N + 2 pawns? There is simply not a single rule, if you do not consider if play is on both sides or just a single side of the board (meaning presence or not of pawns on both sides of the board, which is a constant, in distinction to presence of pieces on both sides of the board).

[d]6k1/7p/5pp1/4n3/8/8/6P1/2R3K1 w - - 0 1
This is a draw.

[d]8/1p4kp/p4pp1/4n3/8/1P6/P5P1/3R2K1 w - - 0 1
Same imbalance, but here already the rook side wins, as there are pawns on both wings.

Of course, search will help here engines, but not in more complex situations, if a specific rule, encompassing adjusting piece values of imbalances to the availability of play on both sides (which would be the much more common case, but not always) is not coded.
It is very real, and very pragmatic: bishops are relatively stronger than knights with pawns on both sides (but number of blocked pawns could definitely change that), rooks are even more so than knights, rooks are somewhat stronger than bishops with this arrangement, but also it has impact on the queen. The conclusion could be that adjusting values based on play on both sides is an important term, and nothing could possibly compensate for its lack in imbalance evaluation. Obviously, bonus points here increase with the increase in speed of movement of the specific pieces.

For me, in particular concerning the Q vs 3 minors imbalance, this is possibly one of the most convenient imbalances to estimate some average value for pieces. If a queen is stronger than 2 knights and a bishop by maybe some 50cps, but weaker than 2 bishops and a knight by maybe some 35cps, it might be possible to judge something about the mean values of the Q, B and N. With other imbalances, it is not that easy to judge strength.

But again, you have an imbalance, you know how pieces complement, but the estimate might be changed by the presence of many blocked pawns, and then again by the presence or not of pawns on both sides. To be correct, you have to evaluate everything.
User avatar
hgm
Posts: 28419
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: A balanced approach to imbalances

Post by hgm »

Lyudmil Tsvetkov wrote: [d]8/1p4kp/p4pp1/4n3/8/1P6/P5P1/3R2K1 w - - 0 1
Same imbalance, but here already the rook side wins, as there are pawns on both wings.
Yet black has a clear winning plan: just trade the Knight against the Rook, and then make use of syzygy tablebases to convert its two-Pawn advantage into a win... :wink:
Lyudmil Tsvetkov
Posts: 6052
Joined: Tue Jun 12, 2012 12:41 pm

Re: A balanced approach to imbalances

Post by Lyudmil Tsvetkov »

hgm wrote:
Lyudmil Tsvetkov wrote: [d]8/1p4kp/p4pp1/4n3/8/1P6/P5P1/3R2K1 w - - 0 1
Same imbalance, but here already the rook side wins, as there are pawns on both wings.
Yet black has a clear winning plan: just trade the Knight against the Rook, and then make use of syzygy tablebases to convert its two-Pawn advantage into a win... :wink:
I suppose Queeny will trade here with white the rook for the knight, as knights are stronger than rooks, but maybe this will only work with 2 rooks against 3 knights. :D