5 underestimated evaluation rules

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

5 underestimated evaluation rules

Post by Lyudmil Tsvetkov »

I wondered if it is better to post a stupid topic, or not post anything at all, and I opted for the first choice. Obviously no interest here to strictly theoretical evaluation discussions, but I still have not abandoned hope some stray person may answer with an informative feedback.

Anyway, below are 5 simple and, I think, efficient evaluation rules that are probably widely underestimated, at least this is my impression from seeing different games:

1. Opposition of rook and enemy king. Valid for the middlegame mostly. I think many engines underestimate this feature. My experience is that even engines like Stockfish do not quite understand it, and in many positions such a feature might make the difference. It does not matter at that how many own/enemy pawns and pieces are there in between the rook and the enemy king, the opposition is always effective as it could frequently produce unexpected tactical shots. I would assign maybe some 15-20cps bonus for such a rook.


[d]6k1/6p1/8/6B1/8/8/6P1/6RK w - - 0 1
Opposition of Rg1 and Kg8

2. Zero king mobility in the middlegame. Could be valid also for the endgame, but less so. Usually a king will have at least one free square at its disposal where to move if it is checked, for example king on g1 would usually be able to go to h1, etc., not having even a single free square often means such a king is exposed to additional tactical shots. Sometimes this might help find mates that otherwise would not be found. I would assign a penalty of some 15cps for such a king.

[d]6kb/5p1p/6pB/8/8/6P1/5P1P/5RK1 w - - 0 1
Kg1 feels quite comfortable in the middlegame, as it has some free squares at its disposal where to move in case of need, Kg8 is not comfortable at all, as it has no free squares/no mobility at all. Attacking such a king is much more promising.

3. Minor on an open file defended by a pawn. Valid mostly for the middlegame, but also some endgames where heavy pieces are present. I think this is a very efficient feature not fully understood by engines. Such a minor actually takes away control of the open file from an enemy rook that might be placed on such a file. This is a very efficient way of restricting the activity of enemy rooks at a low cost. I would assign some 15cps for such a minor, or maybe 1/3 the value of a rook on an open file.

[d]3r2k1/8/8/8/3N4/2P5/8/6K1 w - - 0 1
The knight on d4, defended by the c3 pawn, takes away the d open file from the black rook. Very efficient way indeed of indirect control over the open file.

4. Bishop attacking an enemy chain pawn. Such a bishop is retricted in its activity and is not very useful on such a diagonal. Some engines might not fully understand this. I would assign some 5-10cps penalty for such a bishop.

[d]6k1/1b6/8/8/4P3/5P2/6P1/6K1 w - - 0 1
Bb7 is due some penalty in the middlegame at least.

5. Rook on an open file adjacent to the enemy king in the endgame. I think some engines might not be fully aware of the consequences of such a feature, but it is very important in the endgame, as in this way the activity of the enemy king is restricted, which is often of vital importance in this stage of the game. I would assign some 20cps for such a rook, or maybe 2/3 the value of a rook on an open file.

[d]8/8/2k5/r7/8/8/6P1/3R2K1 w - - 0 1
Rd1 on an open file adjacent to the enemy king on c6. The c6 king can not cross the d file because of that feature. This is true for both simple mating situations, for simple technical endgames, as well as a general rule in more complex endings.


Probably no one will have any comments as there is nothing to comment on, but I would still be happy of the occasional feedback. How many of those rules does your engine implement?

Best, Lyudmil
bob
Posts: 20943
Joined: Mon Feb 27, 2006 7:30 pm
Location: Birmingham, AL

Re: 5 underestimated evaluation rules

Post by bob »

The first one I fail to understand. The rook, IMHO is on about the worst square on the board. It has a friendly and enemy pawn between it and the opposing king. It is not going to be contributing to any sort of tactical activity until at least one of the pawns goes away.

For king mobility, I believe most have this in some form or another, it is a basic threat on the king.

blocking an open file with a minor is handled by some, not all. It is a pretty obvious idea.

The bishop issue is one of mobility. Those pawns greatly reduce its mobility and most programs would move off of that blocked diagonal and get on one that has no pawns to restrict it.

I don't particularly like your last one. It is evaluating the thing "backward." The goal is to keep the enemy king away from the friendly pawn. In your position, the rook on the B file would not help at all. I suspect most programs grasp this pretty well, as everyone knows that the king wants to get as close to that last pawn as possible, and keeping it away is the key. Add a black bishop that can block that rook attack and the rook does nothing to restrain the king. But by making the issue keeping the king away from the pawn, other pieces can pitch in to achieve that goal...
jdart
Posts: 4366
Joined: Fri Mar 10, 2006 5:23 am
Location: http://www.arasanchess.org

Re: 5 underestimated evaluation rules

Post by jdart »

I think #4 is taken care of by the mobility bonus most programs have.

--Jon
pilgrimdan
Posts: 405
Joined: Sat Jul 02, 2011 10:49 pm

Re: 5 underestimated evaluation rules

Post by pilgrimdan »

I'm probably not the right person to comment on this... but here's my 2 cents...

when engines back when were doing only 7-8 ply searches, what you say, would be valid...

unfortunately... as programs got to 12-13 ply searches, and beyond, having knowledge is not that important anymore...

the ideas you present are washed out by monster searches... up to 30-40 ply now-a-days...

as we approach brute force... knowledge goes away... not needed... there's nothing to think about anymore... the search will find it...
Lyudmil Tsvetkov
Posts: 6052
Joined: Tue Jun 12, 2012 12:41 pm

Re: 5 underestimated evaluation rules

Post by Lyudmil Tsvetkov »

pilgrimdan wrote:I'm probably not the right person to comment on this... but here's my 2 cents...

when engines back when were doing only 7-8 ply searches, what you say, would be valid...

unfortunately... as programs got to 12-13 ply searches, and beyond, having knowledge is not that important anymore...

the ideas you present are washed out by monster searches... up to 30-40 ply now-a-days...

as we approach brute force... knowledge goes away... not needed... there's nothing to think about anymore... the search will find it...
Hi Dan.

Of course, you are fully wrong. :?

Refined search goes hand in hand with refined evaluation. At least that is the experience of most modern engines. Engines that did 8 ply search had much inferior evaluation than engines nowadays doing 30 ply search.

There are positions where search can help you, but also there are many positions where you need something more than brute force.
Lyudmil Tsvetkov
Posts: 6052
Joined: Tue Jun 12, 2012 12:41 pm

Re: 5 underestimated evaluation rules

Post by Lyudmil Tsvetkov »

jdart wrote:I think #4 is taken care of by the mobility bonus most programs have.

--Jon
[d]6k1/1b6/8/8/4P3/5P2/6P1/6K1 w - - 0 1

[d]6k1/1b6/8/8/4P3/8/3N4/6K1 w - - 0 1

Hi Jon, 2 diagrams, on both the black bishop on b7 enjoys the same mobility, but while in the first one the bishop obviously has nothing to do on b7, it is relatively well placed attacking e4 in the second. Actually, the attack in the first case can not be considered as a real attack at all.

A program that has just mobility eval might think in this case Bb7 is well placed, while a program that has also an eval term specifying a penalty for bishop attacking a chain pawn would already know b7 is not an optimal square for the bishop and look for an alternative square.

Of course, this might slow down the program a bit.
Lyudmil Tsvetkov
Posts: 6052
Joined: Tue Jun 12, 2012 12:41 pm

Re: 5 underestimated evaluation rules

Post by Lyudmil Tsvetkov »

bob wrote:The first one I fail to understand. The rook, IMHO is on about the worst square on the board. It has a friendly and enemy pawn between it and the opposing king. It is not going to be contributing to any sort of tactical activity until at least one of the pawns goes away.

For king mobility, I believe most have this in some form or another, it is a basic threat on the king.

blocking an open file with a minor is handled by some, not all. It is a pretty obvious idea.

The bishop issue is one of mobility. Those pawns greatly reduce its mobility and most programs would move off of that blocked diagonal and get on one that has no pawns to restrict it.

I don't particularly like your last one. It is evaluating the thing "backward." The goal is to keep the enemy king away from the friendly pawn. In your position, the rook on the B file would not help at all. I suspect most programs grasp this pretty well, as everyone knows that the king wants to get as close to that last pawn as possible, and keeping it away is the key. Add a black bishop that can block that rook attack and the rook does nothing to restrain the king. But by making the issue keeping the king away from the pawn, other pieces can pitch in to achieve that goal...
It is not quite like that.

I picked up on purpose cheap and easy to implement eval terms, as I know engines are usually afraid of more elaborate terms that could slow down the program and are not technically very straightforward to do.

Regarding bishop attacking an enemy chain pawn, I already answered to Jon. In many cases mobility fails to do sufficiently well.

Regarding opposition of rook and enemy king, you might want to take a look at the below diagram:

[d]4r1k1/4bppp/8/6P1/6NP/8/5P2/6RK w - - 0 1

There are 3 objects between the rook on g1 and the enemy king on the g file, but still the presence of the rook opposing the king is strongly felt. For example, black can not now play f6, but the move would have been possible if the white rook was not on g1, but on f1 or d1, etc. So that the opposition is what restricts the black option of moves. In some cases that might not be that important, but in many others it will. That is what we are talking about, having an eval that optimizes your position and the choice of moves you have while restricting the opponent's choice of moves.

Also, if it is white's turn to move, Nf6 becomes possible, a move that would be unrealistic if the white rook was not on the g file. So that the opposition of rook and enemy king is a very important and efficient term with wide application. Actually, if an opposition of rook and enemy queen gives some elo boost to some engines, it makes much more sense that an opposition of rook and enemy king would be even more weighty in terms of elo. Of course, in many situations the search will help resolve the position successfully even without such a term, however, in many others it will fail, while the opposition as a factor influencing the game would still be significant. that is what we are talking about, the missed chances.

Regarding penalty for zero mobility of king in the middlegame, I think here much depends on how the idea of king mobility in the middlegame is implemented. For example, for me it would be wrong to assign bonus, let's say some 10cps for a free square, to the king in the middlegame, as this could suggest that having 2 mobile squares for the king is better than having just one, however I think it is exactly the opposite way: a king in the middlegame having just one free mobile square is optimally placed, so that additional squares do not give any real value. Putting the question in such a way would simply be wrong. On the other hand, while having at least 1 mobile square is natural for the king, not having even a single one is already very bad.

So that, for me, the right approach would be to assign penalty for zero mobility of king in the middlegame, rather than bonus for available mobile squares. It makes a difference, and a substantial one.

Thanks again, Mr. Hyatt, for taking part in the discussion. I thought you hated eval... :)
tpetzke
Posts: 686
Joined: Thu Mar 03, 2011 4:57 pm
Location: Germany

Re: 5 underestimated evaluation rules

Post by tpetzke »

Hi,

until recently I had a those rook attacking king file terms in my engine. Both the file and also the adjacent files with a difference whether they are adjacent towards the edge or towards the center.

In an effort to simplify my eval I tested them for removal and the engine with those terms could not benefit from them against a version that does not have them.

I dropped them.

Thomas...
Thomas...

=======
http://macechess.blogspot.com - iCE Chess Engine
carldaman
Posts: 2283
Joined: Sat Jun 02, 2012 2:13 am

Re: 5 underestimated evaluation rules

Post by carldaman »

Lyudmil Tsvetkov wrote:
jdart wrote:I think #4 is taken care of by the mobility bonus most programs have.

--Jon
[d]6k1/1b6/8/8/4P3/5P2/6P1/6K1 w - - 0 1

[d]6k1/1b6/8/8/4P3/8/3N4/6K1 w - - 0 1

Hi Jon, 2 diagrams, on both the black bishop on b7 enjoys the same mobility, but while in the first one the bishop obviously has nothing to do on b7, it is relatively well placed attacking e4 in the second. Actually, the attack in the first case can not be considered as a real attack at all.

A program that has just mobility eval might think in this case Bb7 is well placed, while a program that has also an eval term specifying a penalty for bishop attacking a chain pawn would already know b7 is not an optimal square for the bishop and look for an alternative square.

Of course, this might slow down the program a bit.

Around these parts, we refer to the bishop in diagram #1 as "biting on granite". It is clearly inferior to the bishop in diagram #2, despite mobility being roughly the same, so a penalty should be in order. How much is adequate is hard to say...

CL
User avatar
Evert
Posts: 2929
Joined: Sat Jan 22, 2011 12:42 am
Location: NL

Re: 5 underestimated evaluation rules

Post by Evert »

Lyudmil Tsvetkov wrote:4. Bishop attacking an enemy chain pawn. Such a bishop is retricted in its activity and is not very useful on such a diagonal. Some engines might not fully understand this. I would assign some 5-10cps penalty for such a bishop.

[d]6k1/1b6/8/8/4P3/5P2/6P1/6K1 w - - 0 1
Bb7 is due some penalty in the middlegame at least.
Jazz penalises bishops on "blocked diagonals" by 10-15 cp, depending on whether the pawns are mobile and how the diagonal is blocked. A "blocked diagonal" is a diagonal along a pawn chain, or a diagonal containing a rammed pawn.

It's one of the evaluation terms I need to get back to and tune properly.