Empty!

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

Moderators: hgm, Rebel, chrisw

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

Re: Empty!

Post by Evert »

Ferdy wrote: Keep it coming Lyudmil, I really don't care even if you evaluate positions on a board outside the 64 squres :D, right try gothic chess on 8x10 board.
+1
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.
My understanding is that this sort of thing is difficult to arrange. I would suggest in addition/as an alternative that these ideas should be added to the wiki (including a note indicating whether they were found to be effective or not, which is sometimes lacking there).
Roger Brown
Posts: 782
Joined: Wed Mar 08, 2006 9:22 pm

Re: Empty!

Post by Roger Brown »

jorose wrote: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 :P 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.

Hello Jonathan,

This is a message for yourself and any other member so inclined:

Please post as you will.

The posts are on-topic by every definition.

There is a separate sub-forum for posting your suggestions about creating a separate sub-forum.

So please, let us read your ideas.

Later.
Ferdy
Posts: 4833
Joined: Sun Aug 10, 2008 3:15 pm
Location: Philippines

Re: Empty!

Post by Ferdy »

Lyudmil Tsvetkov wrote: 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.
I have that idea in 8x10 boards where 2 additional pieces one is Chancellor (R+N) and the other Archbishop (B+N) are added on both sides. Controlling empty squares are very important as you might not know that the 2 new pieces will just jump from nowhere into your camp and then get out in a different direction without being noticed :).
User avatar
Evert
Posts: 2929
Joined: Sat Jan 22, 2011 12:42 am
Location: NL

Re: Empty!

Post by Evert »

Ferdy wrote: I have that idea in 8x10 boards where 2 additional pieces one is Chancellor (R+N) and the other Archbishop (B+N) are added on both sides. Controlling empty squares are very important as you might not know that the 2 new pieces will just jump from nowhere into your camp and then get out in a different direction without being noticed :).
Some evaluation terms really scale very differently in different variants. I think hanging/loose pieces was one where I never noticed much difference in regular chess (the term seems to be sound in other programs, so there are probably things missing in the search that would make it worthwhile) but that turned out to be a big gain in 10x8 chess, at least on shorter time controls.

It's too soon to tell, but so far this particular evaluation term looks like it could be worth something in regular chess, in Sjaakii. I'll probably run it across different variants to get an idea for how it does there. I could imagine drop variants like Shogi having a different scaling with respect to this term.
petero2
Posts: 687
Joined: Mon Apr 19, 2010 7:07 pm
Location: Sweden
Full name: Peter Osterlund

Re: Empty!

Post by petero2 »

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.
If your engine already has separate piece square tables for middle game and end game, I think this idea can be implemented without any runtime cost. For all middle game piece square tables, just add a constant value to all squares on the opponent half of the board and subtract the same value from all squares on your half of the board.
Lyudmil Tsvetkov
Posts: 6052
Joined: Tue Jun 12, 2012 12:41 pm

Re: Empty!

Post by Lyudmil Tsvetkov »

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.
User avatar
Evert
Posts: 2929
Joined: Sat Jan 22, 2011 12:42 am
Location: NL

Re: Empty!

Post by Evert »

Lyudmil Tsvetkov wrote: 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.
Here one needs to be careful to not double count something because typically pawn attacks (particularly on the enemy side of the board) could already be scored as part of mobility.
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.
I think this equivalent to having an "advance" bonus in the piece square tables (basically just a term that increases with the rank). I currently use that to encourage pawn advancement in the end game and to discourage moving the king forward in the middle game.
Lyudmil Tsvetkov
Posts: 6052
Joined: Tue Jun 12, 2012 12:41 pm

A plea to Joona

Post by Lyudmil Tsvetkov »

I apologise very much for creating a subthread, it is just that I forgot my password for the SF framework, so, apologising again, I would very much like to ask, if Joona, or someone else with more free time at the moment (as Joona is busy with the SMP patch), could possibly try to improve on Joona's space patch by specifying different bonus points for empty squares on ranks 1-4, just for the middlegame, as follows:

empty square on rank 1 - 15cps SF values
empty square on rank 2 - 10cps SF values
empty square on rank 3 - 8cps
empty on rank 4 - 6cps

Sorry again for this unusual kind of communication, but I also do not have pasword for fishcooking forum.
Lyudmil Tsvetkov
Posts: 6052
Joined: Tue Jun 12, 2012 12:41 pm

Re: Empty!

Post by Lyudmil Tsvetkov »

Evert wrote:I think this equivalent to having an "advance" bonus in the piece square tables (basically just a term that increases with the rank). I currently use that to encourage pawn advancement in the end game and to discourage moving the king forward in the middle game.
Not quite, as you know that a pawn or piece evacuating your own camp lands on the enemy camp of the board, but do not know where exactly it lands, and there certainly is some pattern.

A knight evacuating the 4th rank might land on the 5th or 6th ranks into the opponent's camp, and while you give the bonus in psqt for the specific advanced square, you do not give a bonus for the square evacuated. Some squares should tend to be more valuable/harmful than others. We do not know precisely which, but there must be some pattern.

Idem for bishops, not to mention that in many engines rooks and queen do not get bonus for being placed on advanced squares into the enemy camp, while they certainly evacuate a square into the own camp by doing this.

For example, a rook moving from d1 to d6 is more valuable move than a rook moving from d2 to d6, as it evacuates a square on the 1st rank. Which can be occupied for the good by another own piece, better than occupying the d1 square on the 1st rank.

A queen leaving d2 and landing on a5 is a more welcome move than a queen leaving c3 and landing on a5, as d2-a5 move improves queen psqt more than c3-a5 move, and...

Oh, I start getting confused, to many parameters here.
In any case, it makes no doubt that the empty square bonus should be rank-specific.

Which ranks and specific squares are preferable to be left empty is not entirely clear, at least to me, but there certainly is some pattern.
Arpad Rusz
Posts: 273
Joined: Sat Apr 17, 2010 2:34 pm
Location: Budapest

Re: Empty!

Post by Arpad Rusz »

jorose wrote: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.
Just a side note about that Sicilian pawn structure: Maybe black's d6-e6 central pawn duo facing only a single central white pawn also deserves some extra bonus.