jorose wrote: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.
Hi Jonathan.
Thanks for your feedback and encouragement. Also to Ferdinand, Roger and Evert.
I like your idea. It might go down in history as the Tsvetkov-Rosenthal space evaluation.
Seriously, not a bad one.
Counting only squares not controlled by enemy pawns might make sense. So above the white e4 pawns deprives black of 2 such squares - f5 and d5.
While this might be a minor adjustment, the really useful idea might be to specify different bonus across ranks, with 1st rank getting the biggest values, and 4th rank the lowest.
Although you might think it is the other way round, more empty squares on the first rank mean you do not have badly placed pieces there. It is better for those pieces to be on the 3rd, 4th ranks. The problem is that you could not be too specific here, as enemy outposts on your 3rd and 4th ranks are usually more harmful than on the 1st and second ranks. So this inverts the eval assessment.
The other good thing about giving different bonus to different ranks in your camp is that this will decrease possible redundancies with, for example, having bonus for own outposts and pawns into the enemy camp. The point is that, while you do know that pawns and pieces evacuated from your own camp land into the opponent's camp, you do not know precisely where such pawns and pieces tend to land, but there is certainly some kind of pattern unaccounted for by other terms.
A knight from the 2nd rank might usually land on the 5th rank, or 6th, a bishop from the 1st rank might usually land on the 5th rank, while a bishop from the 3rd rank might land on the 6th rank. There is certainly some kind of pattern, but difficult to follow.
So, if you have a standard uniform bonus of, say, 10cps for an empty square into your camp, I would give 15cps for empty on the 1st rank, 12cps for empty on the 2nd, and maybe 8 or 6 cps for empty squares on the 3rd and 4th rank, as those ranks are more frequently occupied by own pawns and pieces rather than enemy outposts, so having free squares there is less important, though not by a very clear margin.
Anyway, again my stupid thoughts.
I would be very interested to listen more to your specific suggestions regarding the implementation.