pointy chains redux (part 1)

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

Moderators: hgm, Rebel, chrisw

carldaman
Posts: 2283
Joined: Sat Jun 02, 2012 2:13 am

Re: pointy chains redux (part 1)

Post by carldaman »

Lyudmil Tsvetkov wrote:
carldaman wrote:Hi again Lyudmil,
I like pointy more actually, as pointed, although perfectly synonymous, is perhaps too stilted. Maybe it's only because I've grown fond of pointy, and it stands out better to me. I'm not even sure if I was the first one to come up with the term - but my memory is not what it used to be, anyway. ;)

I have to say that I am a big stickler when it comes to the King's position relative to the chain. I could be wrong, but I believe the road to a successful implementation is to have definitions that are as specific as possible, without letting things become too 'granular'.

I agree we have to be somewhat careful about overlapping with storming pawns -- would you say that any spearhead that's on the 6th rank does that?
I think this is a serious issue, and we have to resort to Graham to decide if pointy or pointed is the right term.

I bet Graham will support me. :D

Could you please explain what a stickler is?

Yes, any spearhead on the 6th rank does that, but also f5/f4 spearheads on the 5th rank. Not so an e5 spearhead.
Anything Graham says is fine by me. HE is the linguist here. :lol:

By the way, a stickler is someone who always insists on, or sticks to, his way of doing things, to a fault... :P

Cheers,
CL
User avatar
Graham Banks
Posts: 41473
Joined: Sun Feb 26, 2006 10:52 am
Location: Auckland, NZ

Re: pointy chains redux (part 1)

Post by Graham Banks »

carldaman wrote:
Lyudmil Tsvetkov wrote:
carldaman wrote:Hi again Lyudmil,
I like pointy more actually, as pointed, although perfectly synonymous, is perhaps too stilted. Maybe it's only because I've grown fond of pointy, and it stands out better to me. I'm not even sure if I was the first one to come up with the term - but my memory is not what it used to be, anyway. ;)

I have to say that I am a big stickler when it comes to the King's position relative to the chain. I could be wrong, but I believe the road to a successful implementation is to have definitions that are as specific as possible, without letting things become too 'granular'.

I agree we have to be somewhat careful about overlapping with storming pawns -- would you say that any spearhead that's on the 6th rank does that?
I think this is a serious issue, and we have to resort to Graham to decide if pointy or pointed is the right term.

I bet Graham will support me. :D

Could you please explain what a stickler is?

Yes, any spearhead on the 6th rank does that, but also f5/f4 spearheads on the 5th rank. Not so an e5 spearhead.
Anything Graham says is fine by me. HE is the linguist here. :lol:

By the way, a stickler is someone who always insists on, or sticks to, his way of doing things, to a fault... :P

Cheers,
CL
:lol:
Pointy or Pointed - earth shattering decision. Either seems fine, along with either directed or directional.
gbanksnz at gmail.com
carldaman
Posts: 2283
Joined: Sat Jun 02, 2012 2:13 am

Re: pointy chains redux (part 1)

Post by carldaman »

Lyudmil Tsvetkov wrote:
carldaman wrote:
Lyudmil Tsvetkov wrote:Another meaningful suggestion, if engines already have some kind of chain pawns eval that might interfere with a further pointed chain bonus, why not try giving a very small bonus at first, 5-8cps or so, or even 2cps, just to check if there is any added value to this particular placement of pawns?

Maybe some value will work after all?
Probably the above was mainly addressed to others, but for those who have not implemented pointy chains at all, I think 30-40 cps can't be too far off. Most engines, including top ones, give ridiculously lopsided evaluation scores in the KID, not favoring the attacking chains at all, so a significant correction is in order. That will likely not happen if the bonuses are too low.

In part 2, I'd also like to address incremental bonuses/penalties. Coming up a bit later... I'm not exactly a fast mover 'n shaker. :)
Its the search, Carl.

All engine searches are tuned and finetuned to specifically yield good results in open positions, and, as good move candidates in open and closed positions significantly differ, that means that, even if you implement a good positional eval term like pointed chain bonus, for example, all tests will still fail, as the engine will not know how to make use of the bonus, and what moves to search first.

Tune the search simultaneously while introducing new positional terms, so that moves searched first are appropriate for more closed and more open positions at the same time, and, as Pawel says, the pointed chain bonus, even in its simplest form of bonussing 4 or 5 main pointed triades without caring about the position of the king, will work like a charm.
The search being trained to pick the most relevant moves first is a very intriguing subject. Has anybody made real sustained progress in this area? I agree it would be ideal to improve the eval and search in harmony with each other, but it can't hurt to work on the eval, regardless, especially tackling weak, long neglected areas.

Here's what I wish to see from a better pointy chains evaluation -

a) a more realistic eval score (although this alone does not guarantee better moves will always be played)

b) actual moves that reflect the improved eval (even if no Elo gain) and result in more high-level human-like play

c) eventually seeing the better play becoming a reality, coupled with fine-tuned eval, leading to superior engine play from the earliest moves, effectively steering the game towards these positions it will then understand better, and not just always aiming for 'open play'

Now, the third level (c) is probably the holy grail of computer chess, and too much to expect so soon, but you have to believe it is achievable.

I see great steps forward from certain 'weaker' engines. Yes, it's much easier to gain Elo when you're at 2600 than at 3000+, but to see the new Andscacs play so well in the Stonewall (when compared to other similar-strength engines) was very refreshing indeed. It's quite awesome to see an engine play purposefully on every move, not shuffling aimlessly (unless the position is totally dry). Check it out if you can, Lyudmil - I'm sure you'll find plenty of faults. :P
Lyudmil Tsvetkov
Posts: 6052
Joined: Tue Jun 12, 2012 12:41 pm

Re: pointy chains redux (part 1)

Post by Lyudmil Tsvetkov »

carldaman wrote:
Lyudmil Tsvetkov wrote:
carldaman wrote:
Lyudmil Tsvetkov wrote:Another meaningful suggestion, if engines already have some kind of chain pawns eval that might interfere with a further pointed chain bonus, why not try giving a very small bonus at first, 5-8cps or so, or even 2cps, just to check if there is any added value to this particular placement of pawns?

Maybe some value will work after all?
Probably the above was mainly addressed to others, but for those who have not implemented pointy chains at all, I think 30-40 cps can't be too far off. Most engines, including top ones, give ridiculously lopsided evaluation scores in the KID, not favoring the attacking chains at all, so a significant correction is in order. That will likely not happen if the bonuses are too low.

In part 2, I'd also like to address incremental bonuses/penalties. Coming up a bit later... I'm not exactly a fast mover 'n shaker. :)
Its the search, Carl.

All engine searches are tuned and finetuned to specifically yield good results in open positions, and, as good move candidates in open and closed positions significantly differ, that means that, even if you implement a good positional eval term like pointed chain bonus, for example, all tests will still fail, as the engine will not know how to make use of the bonus, and what moves to search first.

Tune the search simultaneously while introducing new positional terms, so that moves searched first are appropriate for more closed and more open positions at the same time, and, as Pawel says, the pointed chain bonus, even in its simplest form of bonussing 4 or 5 main pointed triades without caring about the position of the king, will work like a charm.
The search being trained to pick the most relevant moves first is a very intriguing subject. Has anybody made real sustained progress in this area? I agree it would be ideal to improve the eval and search in harmony with each other, but it can't hurt to work on the eval, regardless, especially tackling weak, long neglected areas.

Here's what I wish to see from a better pointy chains evaluation -

a) a more realistic eval score (although this alone does not guarantee better moves will always be played)

b) actual moves that reflect the improved eval (even if no Elo gain) and result in more high-level human-like play

c) eventually seeing the better play becoming a reality, coupled with fine-tuned eval, leading to superior engine play from the earliest moves, effectively steering the game towards these positions it will then understand better, and not just always aiming for 'open play'

Now, the third level (c) is probably the holy grail of computer chess, and too much to expect so soon, but you have to believe it is achievable.

I see great steps forward from certain 'weaker' engines. Yes, it's much easier to gain Elo when you're at 2600 than at 3000+, but to see the new Andscacs play so well in the Stonewall (when compared to other similar-strength engines) was very refreshing indeed. It's quite awesome to see an engine play purposefully on every move, not shuffling aimlessly (unless the position is totally dry). Check it out if you can, Lyudmil - I'm sure you'll find plenty of faults. :P
Nobody has made progress, since they even do not have a definition for a closed position in their engines, i.e. they do not know what a closed position is.

Eval and search are strictly related. The one can not do well without the other. Same in humans and engines.
Fischer had tens of thousands of refined eval terms, but also tens of thousands of specific search rules, both tuned to work in harmony. So his eval was better than that of most players, but he also knew much better what moves to look at and what to discard straight away.

So yes, you should start with something, but the point is that, having good eval, while the engine lacks good search routines responsible for such kind of eval, is meaningless. The engine will simply look at the wrong portions of the tree/move choices first, and by the time it gets to the moves that are relevant and should be searched first in closed positions, its time will have elapsed.

Because, as mentioned, moves to consider first/best moves in closed and open positions differ widely.

There are plenty of faults, I am sure Daniel knows it. :)
Lyudmil Tsvetkov
Posts: 6052
Joined: Tue Jun 12, 2012 12:41 pm

Re: pointy chains redux (part 1)

Post by Lyudmil Tsvetkov »

carldaman wrote:
Lyudmil Tsvetkov wrote:
carldaman wrote:Hi again Lyudmil,
I like pointy more actually, as pointed, although perfectly synonymous, is perhaps too stilted. Maybe it's only because I've grown fond of pointy, and it stands out better to me. I'm not even sure if I was the first one to come up with the term - but my memory is not what it used to be, anyway. ;)

I have to say that I am a big stickler when it comes to the King's position relative to the chain. I could be wrong, but I believe the road to a successful implementation is to have definitions that are as specific as possible, without letting things become too 'granular'.

I agree we have to be somewhat careful about overlapping with storming pawns -- would you say that any spearhead that's on the 6th rank does that?
I think this is a serious issue, and we have to resort to Graham to decide if pointy or pointed is the right term.

I bet Graham will support me. :D

Could you please explain what a stickler is?

Yes, any spearhead on the 6th rank does that, but also f5/f4 spearheads on the 5th rank. Not so an e5 spearhead.
Anything Graham says is fine by me. HE is the linguist here. :lol:

By the way, a stickler is someone who always insists on, or sticks to, his way of doing things, to a fault... :P

Cheers,
CL
You, stickler! :)
Lyudmil Tsvetkov
Posts: 6052
Joined: Tue Jun 12, 2012 12:41 pm

Re: pointy chains redux (part 1)

Post by Lyudmil Tsvetkov »

Graham Banks wrote:
carldaman wrote:
Lyudmil Tsvetkov wrote:
carldaman wrote:Hi again Lyudmil,
I like pointy more actually, as pointed, although perfectly synonymous, is perhaps too stilted. Maybe it's only because I've grown fond of pointy, and it stands out better to me. I'm not even sure if I was the first one to come up with the term - but my memory is not what it used to be, anyway. ;)

I have to say that I am a big stickler when it comes to the King's position relative to the chain. I could be wrong, but I believe the road to a successful implementation is to have definitions that are as specific as possible, without letting things become too 'granular'.

I agree we have to be somewhat careful about overlapping with storming pawns -- would you say that any spearhead that's on the 6th rank does that?
I think this is a serious issue, and we have to resort to Graham to decide if pointy or pointed is the right term.

I bet Graham will support me. :D

Could you please explain what a stickler is?

Yes, any spearhead on the 6th rank does that, but also f5/f4 spearheads on the 5th rank. Not so an e5 spearhead.
Anything Graham says is fine by me. HE is the linguist here. :lol:

By the way, a stickler is someone who always insists on, or sticks to, his way of doing things, to a fault... :P

Cheers,
CL
:lol:
Pointy or Pointed - earth shattering decision. Either seems fine, along with either directed or directional.
Just when I thought you will support me...:(

The way you directed us, I might even go for a directional chain...
Lyudmil Tsvetkov
Posts: 6052
Joined: Tue Jun 12, 2012 12:41 pm

Re: extending the chain (part 2)

Post by Lyudmil Tsvetkov »

carldaman wrote:
carldaman wrote:I'd like to go over the pointy chains issue again, this time attempting to break it down into finer details, which will hopefully assist others in their understanding, and (why not?) perhaps clear the path for improved coding implementations down the line.

This is not aimed at any particular engine or programmer, but an open-ended discussion that others should chime into with further on-topic comments or observations.

<snip>


In part 2, later on, I'd like to go over pointy chains directed at the Queenside, and further elaborate on congestion points.

(End of part 1 here)

Regards,
CL

Alright, now I would like to take a look at the world of pawn chains facing towards the Queenside (more precisely - towards the side of the board where the opposing King is not located).


I'll actually show a couple of notable examples from recent engine games.

[D]r1b2rk1/ppq1bpp1/2n1pn1p/3pN3/2pP1P2/2PBPQ2/PP1N2PP/R1B2RK1 w - - 0 11

In the above diagram, Fizbo 1.31, playing black, has just extended its chain (with tempo, no less) by playing c5-c4. This sort of move is probably as old as computer chess, and is typically seen in Stonewall and French formations. [I remember witnessing old forum discussions from long ago that touched on the need of keeping the engines from making such moves.] Not much has changed in this regard over the years.

Most engines, even very strong ones will routinely play like this when it comes to extending a pawn chain on the Queenside, but will balk at (correctly) doing the same thing on the Kingside! Obviously, something is really wrong, but the solution to this problem is by no means obvious.

Before a solution can be tackled in earnest, a better understanding of the elements of such positions can be very useful. So what do we have here?

Black has just extended his chain, but once the Bishop retreats to c2, it has not achieved anything except maybe gaining some space, away from the opposing King, however. What about the White pawn chain (b2-c3-d4)? It does not look all that impressive, but it can still be extended forward if e3-e4-e5 can be played. Even without the White e-pawn advance, the Black chain (f7-e6-d5-c4) is acting as a barrier that restricts most of his pieces to the Queenside, while White has more freedom to act and better chances on the Kingside, which should count for more.

So, a penalty for extending the pawn chain in the wrong direction is owed to Black, even though there is no White "pointy" chain spearheaded on Black's side of the board! I purposely picked a Stonewall position because it illustrates this very fact. I would suggest a 20 cps penalty to Black for playing c5-c4, which could be increased to 30 cps if White succeeds in getting a pawn to e5, AND thereby extending his chain, aimed at the Kingside.

Now, let's take a look at the next position, arrived at just a few moves later:

[D]r1b2rk1/p3bpp1/2q1pn1p/3pP3/1ppP1P2/2P2Q2/PPBN2PP/R1B2RK1 b - - 0 14

Lo and behold, White (represented by the wonderfully improved engine Andscacs 0.72) has gotten his e-pawn to e5, extending his chain in the right direction. We reward him with an additional bonus, bringing it to at least 30 cps. [Earlier we'd already given a penalty to Black for c5-c4 of about 20 cps, which translated into an equal bonus to White. Now we increase this bonus based on the e-pawn advancing to e5.] Andscacs went on to win a nice game from this position.


Next, I'd like to discuss congestion points from the perspective of a pawn chain pointed at the Queenside. We'll again use a game played by Andscacs, this time with Black.

[D]r1b2rk1/1pq1b1pp/2n1p3/p1ppPp2/P4P2/2PBP2P/1PQN2P1/R1B2RK1 b - - 0 13

In the above diagram, a piece exchange has taken place on e5, and Black still has the option to extend his chain by playing c5-c4 (and again, with tempo). Would such a move incur a similar penalty as before? If not, why not?

Some significant differences are present. There is no longer a congestion point on d4, where it would normally be after c5-c4, since White has already recaptured dxe5. Moreover, White will need help from Black if he is ever going to build a meaningful (of 3 pawns or more) chain directed at Kingside, by being able to somehow make an exd4 capture. This is not likely to happen here; instead, the a7-g1 diagonal will be used by Black to create counterplay.

Under the circumstances, I propose that no penalty be given to c5-c4, for the reasons specified, in particular because of the lack of a congestion point on d4.


[D]r1b2rk1/1p4pp/1qn1p3/p1bpPp2/P1pN1P2/2P1P2P/1PQ1B1P1/R1B2RK1 b - - 0 16

Now, let's take a look at the position a few moves later. Black (Andscacs) has indeed developed counterplay on the a7-g1 diagonal and despite the Knight on d4, White will see his central pawn structure totally shattered after Black's g7-g5!

Andscacs again won convincingly over Fizbo (time control was 25 min + 15 sec inc on an i3.)


To conclude this second part, I'll reiterate the importance of congestion points to directional pawn chains. If a congestion point is not present, both the positive and negative effects of pointy (or pointed) pawn chains are reduced or outright eliminated. In the case of Kingside-aiming chains, I will partially agree with Lyudmil and still award half the normal bonus (half of 30-40 cps), because of the practical attacking chances offered by the pointy chain even under less optimal circumstances.

I've changed the title of the thread a little bit [basically reverting to the original title I had in mind], to reflect the action of extending the pawn chain as these chains don't appear out of thin air, and a real choice has to be made whether to extend a chain or not, and since I'm a believer in concepts more so than the names we actually come up with to describe them, which are highly subjective anyhow. Pointy or pointed, who cares? :P

(end of part 2, more to follow when I have time)

Regards,
CL
Completely agree with the diagrams and conclusions from the first Andscacs game, where the pointed chain (I am a stickler too :)) plays big role and wins the game for white.

However, I fully disagree with what you conclude from the second game.

[d]r1b2rk1/1p4pp/1qn1p3/p1bpPp2/P1pN1P2/2P1P2P/1PQ1B1P1/R1B2RK1 b - - 0 16

White is still better here, much better I would say, even having winning chances.

The reason is the same: the pointed white c3-d4-e5 chain. Now, there is a knight on d4, not a pawn, but that knight is defended twice by pawns and not attackable by enemy pawns, e6 is blocked, so the knight kind of acts like a linking point between c3 and e5 pawns. The best black can do to neutralise the powerful white d4 knight blocking the position and preventing black counterplay, is to capture that knight, when the c3,d4,e5 chain will be recreated.

So when you have such a blocking knight, unattackable by enemy pawns, and linking 2 pawns that would otherwise as a triade constitute a pointed chain, I would still give the pointed chain bonus.

On g5, supposed black's best move, white simply replies g3, followed by Kh2, retaining a fair share of advantage.

Eagerly waiting for your next contributions, Carl.

There is no doubt you are the best engine knower of our times. :)
Lyudmil Tsvetkov
Posts: 6052
Joined: Tue Jun 12, 2012 12:41 pm

Triades

Post by Lyudmil Tsvetkov »

Carl will excuse me for cloning his thread, I am sure he will, just to draw your attention once more to a very simple pointed chain implementation.

Award some 30cps bonus or so to ant of the following triades of own pawns:

- c3,d4,e5
- d4,e5,f6
- d3,e4,f5
- e4,f5,g6

That is all, you do not care about the position of the kings, as in 95% of cases they will be found on the king side, and do not care if some of the pawns of the triades are blocked or not.

You simply award the abovementioned bonus for any existing triade of the 4.

Of course, you will first have to tune also your search, as current engine searches are tuned to perform well mainly with eval terms characteristic of open positions, but search in more open and more closed positions differs widely.
Lyudmil Tsvetkov
Posts: 6052
Joined: Tue Jun 12, 2012 12:41 pm

Re: Triades

Post by Lyudmil Tsvetkov »

Just to mention that, a pointed chain/triades bonus would be due only for the middlegame, of course.
Lyudmil Tsvetkov
Posts: 6052
Joined: Tue Jun 12, 2012 12:41 pm

Re: Triades

Post by Lyudmil Tsvetkov »

Carl will hate me that I am indulging too much in his thread, but I will explain him in the evening.

[d]rnbqnrk1/pp3ppp/4p3/3pP3/2pP4/2P5/PP3PPP/RNBQNRK1 w - - 0 1

That is meant to address the disbelievers.
All pawns and pieces on the board, just the kings castled kingside, so that the pointed chain bonus makes sense.

Everything else being equal, or almost equal, one would suppose this position to be drawn, or very close to drawn.

However, white has substantial advantage above, maybe even winning. (well, 30cps are not to sneeze at)

Yoy might check this with your engines, but if they do not understand how to play this, they might well not give convincing scores in white's favour, as they will be considering non-optimal moves.

So that the single presence of the c3,d4,e5 white triade gives white significant advantage.

[d]rnbqnrk1/ppp1b1pp/5p2/4pP2/3pP3/3P4/PPP1B1PP/RNBQNRK1 w - - 0 1
d3,e4,f5 white triade

Everything else being equal, one might suppose the game is very close to a draw.
However, white has substantial advantage above, probably close to winning.

So that a single eval term changes the score drastically, and this single term is the white d3,e4,f5 triade, unmatched by black.

Check the position with your engines, but, if they do not know how to play it...

[d]r2q1rk1/4nppp/p3b3/1p1nP3/2pP4/2P2N2/1B1N1PPP/R2Q1RK1 w - - 0 1
Another similar position, with random piece placements and supposedly more or less even in score.

Even though most of the pawns of the c3,d4,e5 triade this time are not blocked by enemy pawns, the triade still exerts noticeable pressure and should give white some advantage.

It might be claimed that when all pawns of the triade are blocked, the bonus should be bigger, but definitely both cases deserve a bonus, and it might be a bit costly computationally to make such a distinction.

[d]r2q1rk1/3nbppp/1p1p4/p1p1pP2/3nP3/1P1P2P1/P1PN1NBP/R2Q1RK1 w - - 0 1
Supposedly equal position again.

This time again just a single pawn of the white d3,e4,f5 triade, e4, is blocked by an enemy pawn, but the triade still exerts noticeable influence.

White has clear advantage above, not matter what your engines might think, and the advantage is due mainly to the white d3,e4,f5 triade.

So that, I would simply give the bonus for any of the 4 basic triades (you might try them separately), irrespective of whether the pawns are blocked or not, and where the kings are.