## Empty!

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

Moderators: hgm, Harvey Williamson, bob

Forum rules
This textbox is used to restore diagrams posted with the [d] tag before the upgrade.
Lyudmil Tsvetkov
Posts: 6037
Joined: Tue Jun 12, 2012 10:41 am

### Empty!

I feel so empty, that I decided to post an empty topic about empty squares.

As said, square control, a very important eval feature, is almost inexistent, even in current top engines.

Here how you can utilise for the good the concept of an empty square.

Give bonus, some 5-8cps normal values, to each empty square into the own half of the board.

That will mean, that you will give the bonus for squares unoccupied by either own pawns and pieces, or enemy pawns and pieces, for ranks 1-4.

What does this rule achieve?

You will not believe it, this is a magical rule. Actually, I do not know of a truer chess rule.

The bigger number of empty squares into the own half of the board, ranks 1-4, means basically 2 things:

- that you have more pawns and pieces into the enemy half of the board, and
- that the opponent possibly has penetrated less of his own pawns and pieces into your half of the board

And the 2 above facts simply denote that you enjoy space advantage.

Of course, this might be somewhat redundant with outposts, or advanced pawns, for example, but, believe me, space advantage is so important, that doing it in many different ways could never bring you harm, even if the terms are somewhat redundant.

I know that some engines do space advantage in terms of minors attacking certain squares on the board. How more meaningful is this rule than simply counting empty squares?

Of course, counting empty squares is much more meaningful.

For the time being I leave it like that.

Lyudmil Tsvetkov
Posts: 6037
Joined: Tue Jun 12, 2012 10:41 am

### Re: Empty!

Just to say, that the bonus should be due just for the middlegame, as in the endgame own and enemy pieces mutually penetrate both halves of the board, so the concept becomes meaningless.

PaulieD
Posts: 205
Joined: Tue Jun 25, 2013 6:19 pm

### Re: Empty!

I could have more empty space than you because you are 2 pieces up on me. All else being equal I see this as a viable option.

Ferdy
Posts: 3816
Joined: Sun Aug 10, 2008 1:15 pm
Location: Philippines

### Re: Empty!

Lyudmil Tsvetkov wrote:I feel so empty, that I decided to post an empty topic about empty squares.
Keep it coming Lyudmil, I really don't care even if you evaluate positions on a board outside the 64 squres , right try gothic chess on 8x10 board.

Year 2015, once again I appeal the board and the admin to consider a forum section called Computer Chess Club: Static Evaluation. That way all these stuff dump by Lyudmil and others will be organized properly.

Another option is to sub-divide the General Topics into.
1. Static Evaluation
2. Others

Lyudmil Tsvetkov
Posts: 6037
Joined: Tue Jun 12, 2012 10:41 am

### Re: Empty!

PaulieD wrote:I could have more empty space than you because you are 2 pieces up on me. All else being equal I see this as a viable option.
Fully, right, but:

- if one side is already 2 pieces ahead, probability is high that a smaller term like space will not matter; besides, if a piece is captured, that might frequently arise by a capture of an enemy piece into the enemy camp, meaning the opposite side will place one more piece into the enemy camp and one less into the own, freeing more squares there
- in case a piece is traded for 3 enemy pawns, in the endgame the bonus will not apply, while in the middlegame the side with the pawns will have them probably on squares of the own camp, so the opposite side will have more empty squares; when a piece is sacrificed in an attack for pawns, then usually search shall see if the sacrifice is good or bad, with empty squares being a minor factor
- this could foresee also cases of rooks and queen penetrating the enemy camp, that are usually not factored sufficiently into eval

But I agree, that you need tuning of this, there is some potential, but you need a lot of tuning.

Lyudmil Tsvetkov
Posts: 6037
Joined: Tue Jun 12, 2012 10:41 am

### Re: Empty!

Ferdy wrote:
Lyudmil Tsvetkov wrote:I feel so empty, that I decided to post an empty topic about empty squares.
Keep it coming Lyudmil, I really don't care even if you evaluate positions on a board outside the 64 squres , right try gothic chess on 8x10 board.

Year 2015, once again I appeal the board and the admin to consider a forum section called Computer Chess Club: Static Evaluation. That way all these stuff dump by Lyudmil and others will be organized properly.

Another option is to sub-divide the General Topics into.
1. Static Evaluation
2. Others
I felt big compunctions and a pronounced sense of guilt for posting a larger amount of threads in a shorter while, I thought shall I do it or not, but then I simply decided my humble messages, consisting of 10 or 15 posts at most, will hardly do more harm than the next thread, featuring hundreds of repeated posts on a topic that might be more imaginable than real.

So, yes, I feel guilt, but not as unovercomable as one might think.

Lyudmil Tsvetkov
Posts: 6037
Joined: Tue Jun 12, 2012 10:41 am

### Re: Empty!

Just to mention, that I readily extend a bet to anyone interested to post even a single position when the side having more empty squares into the own half of the board, meaning having space advantage, will not also lead in score.

If such a position is shown to me, that might be my last message on this forum.

Anyway, if you process a larger set of 100 random middlegame positions, I bet in at least 80 of them the rule will hold true.

So, I think the approach should work in general, but you need to tune a lot, maybe the size of the bonus, maybe the precise game phase threshold where it is applied, maybe the precise area where it is applicable, etc.

However Ferdinand may want to make a laughing stockk of me, empty squares are really useful, another useful idea might be to count the empty squares in the king shelter, giving some small bonus for each such square, as more empty squares in the shelter usually mean a more comfortable life for the king.

jorose
Posts: 204
Joined: Thu Jan 22, 2015 2:21 pm
Location: Zurich, Switzerland
Full name: Jonathan Rosenthal

### Re: Empty!

Brilliant! I love it! It's something very easy to calculate (eg if you are incrementally keeping track of piece counts all you need is a single popcount of your half of the board as well as one or two additions/subtractions) and a very independent evaluation term.

While having breakfast I thought about some more things and was curious what you think of the following extensions to your idea. Specifically I had kind of a Sicilian pawn structure in mind like so
[d]rnbqkb1r/pp3ppp/3ppn2/8/3NP3/2N5/PPP2PPP/R1BQKB1R w KQkq - 0 6
I feel white has a space advantage in such positions (not necessarily something to write home about, black still has space for his pieces) however it is not addressed by the vanilla version of your heuristic. My suggestion would be to only count empty squares which are not under attack by an enemy pawn. I assume many engines calculate which squares are under attack by a pawn anyhow, so the extra cost should be negligible. Maybe you have some other ideas how to describe such semi-closed variations?
Another approach which is much more heavy but also directly follows from your idea is to weight empty squares differently, an empty square on the first two ranks is more important than on the third which in turn is more important than on the fourth rank. Unfortunately the computational cost here seems much greater than the vanilla form of your heuristic. (Could be wrong, but I've always assumed a population count must be a very expensive operation even assuming CPU specific operations)

Anyhow, just wanted to mention I'm a fan of your idea here.

jorose
Posts: 204
Joined: Thu Jan 22, 2015 2:21 pm
Location: Zurich, Switzerland
Full name: Jonathan Rosenthal

### Re: Empty!

I find your ideas much more interesting than those huge threads like "What's Vasik Rajlich doing today?" I wouldn't be too worried about posting your ideas. I like the idea of having a separate sub-forum however. Though there aren't too many people posting evaluation terms, your ideas could easily fill a subforum on their own On top of that perhaps more people would feel like posting if they saw there was a subforum for these types of ideas. I have an idea or two I might post myself.

Lyudmil Tsvetkov
Posts: 6037
Joined: Tue Jun 12, 2012 10:41 am

### Re: Empty!

A quick check if the rule applies in a random middlegame position.

[d]b2r3r/k4p1p/p2q1np1/NppP4/3p1Q2/P4PPB/1PP4P/1K1RR3 w - - 1 24

Kasparov-Topalov from Wijk aan Zee, 1999, the famous Kasparov Immortal, just before Kasparov sacrificed the rook on the following 24th move on d4.
As known, computers show that black could have saved himself or resist longer in the course of the 20-move long combination, but still the advantage rests with white.

Is it true that the side leading in score also enjoys space advantage?

Well, counting empty squares, white has 20 empty squares on ranks 1-4, while black only 18. d5 and d5 advanced pawns cancel each other into the enemy camp, but the strong white knight on a5 has no pair. (When you think that some engines even do not consider Na5 an outpost)

So white is better here in terms of space advantage, while simultaneously leading in score.

Of course, one might prefer to count and give the bonus for own objects, pawns and pieces into the enemy camp, on ranks 5-8, the way Larry Evans suggested it, but in that case you should at least double the bonus, as one own piece into the enemy camp equals 2 more empty squares into the own camp.

Btw., I see SF testing some kind of this idea, many thanks to Joona, my only worry is that, as I understand it, he gives the bonus both for the middlegame and the endgame, but the bonus is useless in the endgame, and that might distort things a lot.

I also think a bit higher values than 5;5 SF values might be due.