Even crazier

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

Moderators: hgm, Rebel, chrisw

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

Time and again

Post by Lyudmil Tsvetkov »

I think sometimes it makes sense to consider evaluation terms in respect of their long-term or short-term effect on the board. It is true that while some eval terms are very short-term, and would disappear very rapidly, meaning includingly that you do not need a lot of potential material/activity/tactical energy in order to end their existence, other eval terms, especially of marked positional quality, would persist on the board for much more time, supposing the availability of considerable material/activity/tactical energy to put an end to their existence.

In the case that such long-term eval factors are found, it would make sense to somehow score them higher, precisely because of their effect in respect of the time-frame for their availability.

I will post here one more time the 2 games I played against Stockfish today, not because I would like to post them time and again (and not that I do not like it :D ), but simply because they are a good reference to illustrate my point.

[pgn][PlyCount "61"]
[Event "Blitz 2m+2s"]
[Site "Sofia"]
[Date "2013.09.30"]
[White "Tsvetkov, Lyudmil"]
[Black "Stockfish 4 64 SSE4.2"]
[Result "1-0"]
[ECO "D00"]
[TimeControl "120+2"]
[Annotator "Tsvetkov,Lyudmil"]
[MLNrOfMoves "30"]
[MLFlags "100100"]

{1024MB, Dell XPS 4Cores} 1. e3 {[%emt 0:00:00]} 1... e6 {[%emt 0:00:08]} 2. f4
{[%emt 0:00:02]} 2... Nf6 {[%emt 0:00:06]} 3. Nf3 {[%emt 0:00:02]} 3... Be7
{[%emt 0:00: 04]} 4. d4 {[%emt 0:00:02]} 4... d5 {[%emt 0:00:06]} 5. Bd3
{[%emt 0:00:02]} 5... c5 {[%emt 0:00:05]} 6. c3 {[%emt 0:00:03]} 6... O-O
{[%emt 0:00:04]} 7. O-O {[%emt 0:00: 03]} 7... Bd7 {[%emt 0:00:10]} 8. Nbd2
{[%emt 0:00:06]} 8... Qc7 {[%emt 0:00:07]} 9. Ne5 {[%emt 0:00:02]} 9... a6
{[%emt 0:00:03]} 10. a4 {[%emt 0:00:37]} 10... Nc6 {[%emt 0:00: 04]} 11. g4
{[%emt 0:00:04]} 11... g6 {[%emt 0:00:15]} 12. g5 {[%emt 0:00:06]} 12... Nxe5
{[%emt 0:00:04]} 13. fxe5 {[%emt 0:00:24]} 13... Nh5 {[%emt 0:00:04]} 14. Rf6
{[%emt 0:00:07]} 14... Nxf6 {[%emt 0:00:06]} 15. gxf6 {[%emt 0:00:01]} 15... Bd8
{[%emt 0:00:12]} 16. Nf3 {[%emt 0:00:14]} 16... Kh8 {[%emt 0:00:11]} 17. Qe1
{[%emt 0:00:09]} 17... c4 {[%emt 0:00:04]} 18. Bc2 {[%emt 0:00:04]} 18... Bxf6
{[%emt 0:00:02]} 19. exf6 {[%emt 0:00:05]} 19... Qd8 {[%emt 0:00:00]} 20. Qh4
{[%emt 0:00:09]} 20... Bc6 {[%emt 0:00:02]} 21. Ne5 {[%emt 0:00:52]} 21... Kg8
{[%emt 0:00:00]} 22. Bd2 {[%emt 0:00:13]} 22... Kh8 {[%emt 0:00:01]} 23. Rf1
{[%emt 0:00:06]} 23... Be8 {[%emt 0:00:01]} 24. Rf3 {[%emt 0: 00:18]} 24... Kg8
{[%emt 0:00:00]} 25. Rh3 {[%emt 0:00:57]} 25... h5 {[%emt 0:00:04]} 26. Qg5
{[%emt 0:00:09]} 26... a5 {[%emt 0:00:00]} 27. Rxh5 {[%emt 0:00:12]} 27... Qxf6
{[%emt 0:00:01]} 28. Qxf6 {[%emt 0:00:02]} 28... gxh5 {[%emt 0:00:00]} 29. Qg5+
{[%emt 0:00: 05]} 29... Kh8 {[%emt 0:00:00]} 30. Qh6+ {[%emt 0:00:03]} 30... Kg8
{[%emt 0:00:00]} 31. Qh7# {[%emt 0:00:02]} 1-0

[PlyCount "71"]
[Event "Blitz 2m+2s"]
[Site "Sofia"]
[Date "2013.09.30"]
[White "Tsvetkov, Lyudmil"]
[Black "Stockfish 4 64 SSE4.2"]
[Result "1-0"]
[ECO "C00"]
[TimeControl "120+2"]
[Annotator "Tsvetkov,Lyudmil"]
[MLNrOfMoves "35"]
[MLFlags "000100"]

{1024MB, Dell XPS 4Cores} 1. e4 {[%emt 0:00:00]} 1... e6 {[%emt 0:00:05]} 2. d3
{[%emt 0:00:02]} 2... d5 {[%emt 0:00:05]} 3. Nc3 {[%emt 0:00:03]} 3... d4
{[%emt 0:00:03]} 4. Nce2 {[%emt 0:00:03]} 4... c5 {[%emt 0:00:04]} 5. f4
{[%emt 0:00:02]} 5... Nf6 {[%emt 0:00:06]} 6. h3 {[%emt 0:00:02]} 6... Be7
{[%emt 0:00:08]} 7. g4 {[%emt 0:00:02]} 7... O-O {[%emt 0:00:05]} 8. Bg2
{[%emt 0:00:03]} 8... Nc6 {[%emt 0:00:05]} 9. Nf3 {[%emt 0:00:04]} 9... Nd7
{[%emt 0:00:10]} 10. O-O {[%emt 0:00:05]} 10... b5 {[%emt 0:00: 06]} 11. a4
{[%emt 0:00:17]} 11... b4 {[%emt 0:00:00]} 12. b3 {[%emt 0:00:03]} 12... Bb7
{[%emt 0:00:05]} 13. Qe1 {[%emt 0:00:11]} 13... Qc7 {[%emt 0:00:11]} 14. h4
{[%emt 0: 00:20]} 14... Rad8 {[%emt 0:00:08]} 15. Qg3 {[%emt 0:00:07]} 15... Bd6
{[%emt 0:00:11]} 16. Bd2 {[%emt 0:00:12]} 16... f6 {[%emt 0:00:00]} 17. Bh3
{[%emt 0:00:28]} 17... Rc8 {[%emt 0: 00:09]} 18. Rf2 {[%emt 0:00:11]} 18... Rce8
{[%emt 0:00:06]} 19. Kh1 {[%emt 0:01:41]} 19... Qd8 {[%emt 0:00:06]} 20. Rg1
{[%emt 0:00:06]} 20... g6 {[%emt 0:00:14]} 21. Rh2 {[%emt 0:00:58]} 21... Qa8
{[%emt 0:00:11]} 22. Bg2 {[%emt 0:00:11]} 22... e5 {[%emt 0:00: 04]} 23. f5
{[%emt 0:00:05]} 23... gxf5 {[%emt 0:00:05]} 24. gxf5+ {[%emt 0:00:05]} 24...
Kh8 {[%emt 0:00:04]} 25. Ng5 {[%emt 0:00:11]} 25... Re7 {[%emt 0:00:02]} 26. Qf3
{[%emt 0:00:09]} 26... fxg5 {[%emt 0:00:03]} 27. hxg5 {[%emt 0:00:01]} 27... c4
{[%emt 0:00: 06]} 28. bxc4 {[%emt 0:00:20]} 28... b3 {[%emt 0:00:00]} 29. cxb3
{[%emt 0:00:04]} 29... Nb4 {[%emt 0:00:04]} 30. Rh6 {[%emt 0:00:40]} 30... Nxd3
{[%emt 0:00:10]} 31. Qxd3 {[%emt 0:00:11]} 31... Nc5 {[%emt 0:00:00]} 32. Qh3
{[%emt 0:00:25]} 32... Nxe4 {[%emt 0:00: 00]} 33. Qh4 {[%emt 0:02:29]} 33...
Rxf5 {[%emt 0:00:00]} 34. g6 {[%emt 0:03:03]} 34... Nf2+ {[%emt 0:00:00]} 35.
Kh2 {[%emt 0:00:08]} 35... e4+ {[%emt 0:00:00]} 36. Bf4 {[%emt 0:00:30]} 1-0
[/pgn]

I will not theorise, as obviously that finds no fertile ground, but will simply illustrate my point with a couple of indicated positions.

[D]r4rk1/1pqbbp1p/p3p1p1/2ppP1Pn/P2P4/2PBP3/1P1N3P/R1BQ1RK1 w - - 0 14
f7 is a backward-fated pawn here: it is going to stay in its current form as a weakness for extremely long time (as, in distinction to a simple backward pawn, where piece control of the square in front could help to get rid of the weakness much easier and much earlier, a backward-fated one is not possible to advance with the help of whatever own pieces), or, in order for black to get rid of it, it will need an extremely significant material/activity/tactical potential, which is not always readily available. Maybe, precisely because of this long-termness of the pawn, it becomes even more real and its penalty should be further increased for having larger effect on future developments.

[D]r2b1rk1/1pqb1p1p/p3pPp1/2ppP3/P2P4/2PBP3/1P1N3P/R1BQ2K1 w - - 0 16
Now, the black backward-fated pawn on f7 is gone, but it has helped to create an even bigger asset for white: the peak/lead pawn of the b2-f6 chain on f6. Is not it obvious that this pawn, supported by another own pawn on e5 and the chain as a whole, is not the same asset as a lone f6 pawn that could otherwise white have? It is quite distinct for me. If not anything other, this lead/peak pawn is going to stay there for quite some time; it enjoys the privilege of long-termness and is probably due because of that, i.e., its larger influence on future developments, quite a nice additional bonus. Black would need an extremely big material/activity/tactical potential to get rid of it, and indeed Stock later sacrificed its queen for the pawn. So that this asset is not only real, but also very important.

[D]q4r1k/pb1nr2p/2nb4/2p1pPP1/Pp1pP3/1P1P1Q2/2PBN1BR/6RK b - - 0 27
Look at the black c5 pawn: it is backward-fated, and as thus due big penalty, and at the same time functioning as closing the only open file that could be available for black's counterplay on the queen side. Backward-fated pawns would be important at least because of their long-term effect, difficult to change, but when they close an entire side, they become even more important.

[D]q4r1k/pb1nr2p/2nb4/4pPP1/PpppP3/1P1P1Q2/2PBN1BR/6RK w - - 0 28
One move later, in the attempt to find counterplay because of the fully closed queen side, Stockfish sacrifices its backward-fated pawn. It gets rid of the weakness, but only at the cost of considerable material equivalent; otherwise, the weakness would stay there unimaginably long. The c4 pawn sacrifice is at the same time a good proof of the validity of the rule for closing entire sides when the enemy has advantage on the opposite side.

Other very important long-term factor would be space gained, space in terms of pawns, but also in terms of minors on outposts. Both elements suppose long-termness, and are therefore probably due an additional bonus. That is why space is so important. By definition, a pawn that has crossed the center line, will be a permanent feature of the position, it can not go back, and the opponent will need quite some material/activity/tactical energy available to get rid of it; the same goes true for minors on outposts into the enemy camp, as they are difficult to expel from those and start representing a permanent feature of the position.

What is your view on that: do you think it is reasonable to score some terms still higher because of their long-term effect?
Anyone tried to do that in her engine?

Best, Lyudmil

PS. Sorry for annoying you time and again, but there might still be a grain of truth in an occasional perverted idea.
Lyudmil Tsvetkov
Posts: 6052
Joined: Tue Jun 12, 2012 12:41 pm

Re: Time and again

Post by Lyudmil Tsvetkov »

And, of course, the bottom line behind the headline would be that such long-term factors appear time and again on the board: you see them at move 20, 10 moves later they are still there, and 20 moves on the feature will persist.
Lyudmil Tsvetkov
Posts: 6052
Joined: Tue Jun 12, 2012 12:41 pm

Re: The phantom of closure

Post by Lyudmil Tsvetkov »

[D]4r2r/1b1q1ppk/1p1p3p/p1p2P2/PnPpP1PP/1P1P1N2/3QB2R/6RK b - - 0 29

And another example on the applicability of fully closed sides.
White has the advantage here, probably decisive, as the queen side is fully closed (all 4 files), while white has the advantage on the opposite king side in terms of the f5 pawn, gaining space, as well as the attacking/storming pawns on g4 and h4. For me, you could automatically dispense because of that fact another 50cps at least to white, which could already change the picture.

On the other hand, black entirely lacks counterplay on the queen side, and thus the d4 pawn gaining space and the knight on b4 on otherwise excellent outpost are basically useless and do not take part immediately into the game. You can also catch a glimpse of the desperately bad black d6 backward-fated pawn.

White is almost certainly winning here, but again, how many engines would easily see that?

Overall, the rule for entirely closed sides and advantage for the player that has the initiative on the opposite side of the board in terms of space or attacking opportunities could fundamentally rest upon the key principle that in a specific moment in time only one of the players could have an advantage on one of the sides, but never both at the same time (there is simply not enough space on a single side for both sides to have advantage there, while it is possible to split the advantage on the whole board with one of the players dominating on one side, and the other on the opposite), which will automatically translate into advantage for the whole game, as on the opposite side there is basically nothing to do.

How is it possible to consider that statically, I do not know.
Lyudmil Tsvetkov
Posts: 6052
Joined: Tue Jun 12, 2012 12:41 pm

Re: Time and again

Post by Lyudmil Tsvetkov »

Again, the realistical proposal would be to seek out and score higher those eval factors that seem to be long-term. I.e., not try to blindly tune all terms, as this would be difficult, but to specifically look for the terms that seem to be long-term, and increase their scores accordingly.

But trying to increase the score for all positional terms as a single batch might very well fail, as not all of those could fall within the long-term category. The one by one approach, after proof that a term is really long-term, should be better.

And, if the engine does not have many long-term factors, why not introduce new ones that could be meaningful?

For example, if I were a Stockfish developer, the first thing I would have introduced would have been nice bonus for lead/peak pawns of chains. It is really simple, not much more difficult than introducing a protected passer after you have only a standard passer in the eval. And it is always possible to take a short cut, highlighting the respective feature, without going into much detail, would still be better than entirely lacking an important term.

For lead pawns, a simple short cut could run as follows:
- start considering lead pawn from the 4th rank, do not consider for the 3rd
- assign some 10cps bonus for such a pawn when the chain consists of 2 pawns in all (including the lead one)
- assign 12cps for the lead pawn when the chain consists of 3 pawns in all, 14cps if made up of 4 pawns, 16 if made up of 5 pawns
- increase those scores twice, when at least half of the pawns of the chain are fixed/blocked by enemy pawns (important, as they will last longer, here is where you take account of time, but a chain itself also suggests some persistence in time),

and you are done, the positioning of lead pawns on ranks might be covered by space, while closeness to the enemy king by some other relevant term

In the same way, one could look for and formulate other poisitonal terms with long-range effect, to boost performance.

Very simple indeed, but maybe we will have to wait for another 10 years for a subtler positional term with long-term effect to appear in some engine.
Lyudmil Tsvetkov
Posts: 6052
Joined: Tue Jun 12, 2012 12:41 pm

Re: Blocking of pawns galore

Post by Lyudmil Tsvetkov »

An idea not entirely devoid of interest might be blocking bonus for pieces blocking pawns of the enemy king shelter, but only when those pieces can not be attacked by enemy pawns, or, if there are such pawns, they would be blocked by own pawns or pieces.

The bonus is to be small, maybe some 5-10cps, but real, as blocking of pawns of the enemy king shelter would represent a physical obstruction of those pawns, that temporarily lose their mobility/capacity to advance, and thus the shelter would become less flexible/more prone to attack, as sometimes you need to advance a pawn of the shelter to defend from certain threat, and when you do not have such a option, your defending chances are minimised. In some cases, this could really have some implications.

It is a detail, but sometimes details make the difference.

[D]6k1/5p1p/5BpR/6N1/8/8/8/6K1 w - - 0 1
For example, on the above diagram, all white pieces block pawns of the enemy king shelter and could receive a small bonus.

[D]6k1/5p2/5Pp1/6N1/8/8/8/6K1 w - - 0 1
The knight on g5 could also receive a small bonus for blocking g6, as the only pawn that could attack it, f7, is blocked by f6.