The phalanx concept

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

Moderators: bob, hgm, Harvey Williamson

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

The phalanx concept

Post by Lyudmil Tsvetkov » Wed May 21, 2014 6:34 am

I am sorry to post among much more important topics my unread little threads, but I like the idea I will post about very much, and there is a big chance that if I do not post now, I will forget all about it. Maybe Carl will have something to say about this.

I really think this is a splendid idea. I have all the time dreamt about finding a way to evaluate larger pawn groups/structures, as bigger chains for example. I racked my mind all over to seek out a reasonable approach to do it, and never succeeded. Something always went wrong. And now, suddenly, I read on the SF history page that Ralph Stoesser did a single attempt to introduce phalanx pawns into SF eval back in November 2013. I opened the code on github and did not fully understand it, but this helped me see, even if subconsciously, how the concept should be done. It is possible that Ralph does it in exactly the same way, so nothing new, but I think I have a couple of clarifications that will make the approach working. (or at least I am thinking so :D) In any case, all credit for the name and the way to do it go to Ralph.

OK then, how do we evaluate the additional strength larger groups of pawns, larger chains give? Isolated does not help here, as we want to give bonus to a group or chain of 6 pawns over a group or chain of 5, to a group or chain of 5 pawns over a group or chain of 4, etc. What shall we do? Well, of course, use the concept of a phalanx pawn, introduced by Ralph. A phalanx pawn will be a pawn that has 2 friendly pawns on adjacent files and adjacent squares, either on the same rank, in front or behind. (sorry Ralph, if this does not match your definition perfectly, this is just my vision, hope no property rights involved) :)

This helps us resolve many things. The only obligatory additional condition to mention so that the concept becomes working is that the phalanx pawn can not be a base pawn of a chain. So we exclude those pawns from the concept.

I would give phalanx pawns, connecting larger groups of pawns, some 5 cps uniform bonus (3-8cps). And I would not consider them in terms of files or ranks, as this could also add redundancies. Our only aim with phalanx pawns is to assess the influence of larger groups, their togetherness in advancing and influencing events on the board. So we would not like to give further bonus points apart from that.

[d]6k1/1ppppp1p/p5p1/3PP3/1PP2P2/P5P1/7P/6K1 w - - 0 1
Above, according to the forementioned definition, white has 5 phalanx pawns and black 4 phalanx pawns.

For white, such pawns are: g3 (h2 and f4 adjacent), f4 (g3 and e5 adjacent), e5 (f4 and d5 adjacent), d5 (c4 and e5 adjacent), b4 (a3 and c4 adjacent). c4 is not a phalanx pawn, as it is a base pawn of the c4-d5 chain. It does not make sense to consider base pawns, as they are weak and do not help much in connecting. We would like to consider only flexible pawns.

For black, such pawns are: g6 (h7 and f7 adjacent), e7 (f7 and d 7 adjacent), d7 (e7 and c7 adjacent), and c7 (d7 and b7 adjacent). f7 and b7 are not phalanx pawns as they are base pawns of the f7-g6 and b7-a6 chains respectively. So white is better in terms of phalanx pawns.

[d]6k1/pp5p/2pp1pp1/8/2PPPP2/1P4P1/P6P/6K1 w - - 0 1
Above, white has 6 phalanx pawns, g3,f4,e4,d4,c4,b3, and black only 2, g6 and c6. You see the distinction?

[d]6k1/1pp1pp2/p5p1/3P4/PPP1PP2/8/8/6K1 w - - 0 1
Equal number of pawns. White has 2 phalanx pawns, b4 and d5, black has none. So that again, there is some difference to note.

I would call phalanx pawns meaningful connectors. Why are they important? Well, because they help us see and evaluate too many good things that would otherwise go unnoticed. For example: the benefit of so called apex pawns (a pawn defended by 2 own pawns, so a stronger and more flexible variation of the chain pawns), even if you do not consider them in eval separately; the benefit of longer, long and very long chains of pawns, consisting of 4,5 and more members, a chain of 5 is stronger than 2 chains of 3 and 2 pawns respectively, this could not be captured without the phalanx concept; the benefit of flexible pawn structures, for example couple of pawns on the same rank, that could easily become chain pawns, etc.

[d]6k1/2p2pp1/p2p3p/1p6/1P6/P1PP2P1/5P1P/6K1 w - - 0 1
g3 and b4 are apex and phalanx pawns at the same time. Those pawns are stronger and more flexible than the black b5 and d6 chain pawns. If c3 advances, b4 is still protected, while if c7 advances, d6 remains undefended.

[d]6k1/4p3/3pP3/3P2p1/2P2p2/1P2p3/P7/6K1 w - - 0 1
This is not a position, just an illustration for the general case. How is a chain of 5 stronger than 2 separate chains of 3 and 2, although they have the same rank placements? Well, it simply is. The phalanx pawn concept neatly helps ut to see the difference. White has 3 connecting/phalanx pawns, b3,c4 and d5, while black only 1 phalanx pawn, f4. So that, with the same number of chain members, 2 more phalanx pawns are added for white and the longer chain. I am very happy with this indeed.

[d]6k1/3pp3/2p2p2/8/2PPP3/5P2/8/6K1 w - - 0 1
Pawns on the same rank are important, as they are flexible. Above, white has 2 phalanx pawns that nicely capture the flexibility concept, e4 and d4, black has none. White can play c5,d5 or e5, creating an advanced chain pawn. So that phalanx pawns are useful here too.

Overall, I would conclude the following:

- phalanx pawns as described are an extremely useful concept; actually, I have never seen a more valid concept among refined pawn terms, except possibly chain pawns
- in order for the concept to succeed, you should necessarily specify that phalanx pawns acn not be base pawns of a chain, i.e. you must exclude base pawns from the bonus, otherwise you get it very much imprecise
- the bonus should be small, 3-8cps, and uniform, i.e. you should not give any other bonus for cetral files or advanced ranks apart from the uniform one, as this would make things redundant and we like only to incentivise togetherness of pawns.
- most importantly, all the credit goes to Ralph

What do you think of the phalanx concept? Do you think it is feasible?
Anyone doing something like that?

carldaman
Posts: 1733
Joined: Sat Jun 02, 2012 12:13 am

Re: The phalanx concept

Post by carldaman » Wed May 21, 2014 7:10 am

Lyudmil Tsvetkov wrote: Overall, I would conclude the following:

- phalanx pawns as described are an extremely useful concept; actually, I have never seen a more valid concept among refined pawn terms, except possibly chain pawns
- in order for the concept to succeed, you should necessarily specify that phalanx pawns acn not be base pawns of a chain, i.e. you must exclude base pawns from the bonus, otherwise you get it very much imprecise
- the bonus should be small, 3-8cps, and uniform, i.e. you should not give any other bonus for cetral files or advanced ranks apart from the uniform one, as this would make things redundant and we like only to incentivise togetherness of pawns.
- most importantly, all the credit goes to Ralph

What do you think of the phalanx concept? Do you think it is feasible?
Anyone doing something like that?
Hi Lyudmil,

Very little time to post, so only limited comments:

I think phalanx pawns make for a wonderful concept, and maybe much more can be said. I'm sure glad you brought it up. Some of the qualitative differences between the White and Black pawn masses are striking in your diagrams, all based on the phalanx concept.

[d]6k1/1pp1pp2/p5p1/3P4/PPP1PP2/8/8/6K1 w - - 0 1

I'm not a 100% sure about the c4 pawn in the above diagram. It is very mobile and can move to c5 where it would be fully "phalanxed", but also supports the phalanx d5 pawn from c4. Now, what I think may also be important is the presence and placement of the White b pawn. If it were on b5, and there was a Black pawn on b6 or d6, then c4 should clearly not be counted as part of the phalanx. Also, if White had no b-pawn at all in the diagram, then the c4 pawn would lose some its phalanx potential.

Perhaps the definition needs to be more flexible or inclusive not to leave out the c4 pawn. I would like it even better if this 'phalanx potential' also can be accounted for in the scheme of the things.

Anyway, these thoughts are based on a superficial overview of your post. Keep up the good work, Lyudmil. :)

Cheers,
CL

PK
Posts: 832
Joined: Mon Jan 15, 2007 10:23 am
Location: Warsza
Contact:

Re: The phalanx concept

Post by PK » Wed May 21, 2014 7:26 am

Lyudmil, Your phalanx looks a little Macedonian :)

I mean, classical definition seems to be that "pawn phalanx" consists of pawns on the same rank, whereas pawns placed diagonally are "chains".

In the ancient warfare, however, there was an important instance of a phalanx positioned diagonally in relation to enemy lines - this is how Philip of Macedonia, father of Alexander the Great, won the battle of Cheronea.

Anyhow, I agree that it is a good measure of compactness of pawn mass. Beside that, a pawn lever by definition contains a 'classical' phalanx (+ enemy pawn chain).

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

Re: The phalanx concept

Post by Lyudmil Tsvetkov » Wed May 21, 2014 9:34 am

carldaman wrote:
Lyudmil Tsvetkov wrote: Overall, I would conclude the following:

- phalanx pawns as described are an extremely useful concept; actually, I have never seen a more valid concept among refined pawn terms, except possibly chain pawns
- in order for the concept to succeed, you should necessarily specify that phalanx pawns acn not be base pawns of a chain, i.e. you must exclude base pawns from the bonus, otherwise you get it very much imprecise
- the bonus should be small, 3-8cps, and uniform, i.e. you should not give any other bonus for cetral files or advanced ranks apart from the uniform one, as this would make things redundant and we like only to incentivise togetherness of pawns.
- most importantly, all the credit goes to Ralph

What do you think of the phalanx concept? Do you think it is feasible?
Anyone doing something like that?
Hi Lyudmil,

Very little time to post, so only limited comments:

I think phalanx pawns make for a wonderful concept, and maybe much more can be said. I'm sure glad you brought it up. Some of the qualitative differences between the White and Black pawn masses are striking in your diagrams, all based on the phalanx concept.

[d]6k1/1pp1pp2/p5p1/3P4/PPP1PP2/8/8/6K1 w - - 0 1

I'm not a 100% sure about the c4 pawn in the above diagram. It is very mobile and can move to c5 where it would be fully "phalanxed", but also supports the phalanx d5 pawn from c4. Now, what I think may also be important is the presence and placement of the White b pawn. If it were on b5, and there was a Black pawn on b6 or d6, then c4 should clearly not be counted as part of the phalanx. Also, if White had no b-pawn at all in the diagram, then the c4 pawn would lose some its phalanx potential.

Perhaps the definition needs to be more flexible or inclusive not to leave out the c4 pawn. I would like it even better if this 'phalanx potential' also can be accounted for in the scheme of the things.

Anyway, these thoughts are based on a superficial overview of your post. Keep up the good work, Lyudmil. :)

Cheers,
CL
Thanks, Carl, for cheering me up! I know that even if no one else does so, you will still want to encourage me.

Regarding the c4 pawn, if you give it the bonus too, you should also do so with black f7 and b7 pawns, and we would not like to do that. I was looking at a sufficiently big sample of games and observed that in most cases base chain pawns only hurt the phalanx rule. For example, we would not like to give bonus for such pawns, when a base pawn defends 2 friendly pawns simultaneously, for example white pawns on g2,f3,h3. Etc., I just observed that in most cases not excluding the base chain pawn hurts, but of course, things could be finetuned with computer help, to see what actually works and what not.

I hope you are not the only one that appreciates the value of the concept, maybe 1 or 2 engine programmers will also want to look at it. The bonus values are low, it is true, but such phalanx pawns happen quite frequently and besides explain in a meaningful way a difficult positional concept.

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

Re: The phalanx concept

Post by Lyudmil Tsvetkov » Wed May 21, 2014 9:53 am

PK wrote:Lyudmil, Your phalanx looks a little Macedonian :)

I mean, classical definition seems to be that "pawn phalanx" consists of pawns on the same rank, whereas pawns placed diagonally are "chains".

In the ancient warfare, however, there was an important instance of a phalanx positioned diagonally in relation to enemy lines - this is how Philip of Macedonia, father of Alexander the Great, won the battle of Cheronea.

Anyhow, I agree that it is a good measure of compactness of pawn mass. Beside that, a pawn lever by definition contains a 'classical' phalanx (+ enemy pawn chain).
Thanks for taking part in the discussion, Pawel.

Macedonian or not, it is important that the concept works. :D

As I have not read wise books, I now possibly understand why trying to implement the book concept could fail. Pawns on the same rank are due some bonus, undoubtedly, but very small, couple of centipawns again. Chain pawns are due much more.

However, if we apply the book phalanx concept to only 2 friendly pawns on adjacent files and on the same rank, this does not help us a lot with assessing the potential for forming bigger, big and very big, connected pawn structures. You give some bonus for 2 pawns on the same rank, that is true, but how do you approach the bigger pawn structure concept? That is why, necessarily, you must have at least a group of 3 pawns for a phalanx pawn to exist. And the concept is even better applied with larger pawn groups of 4,5, etc. pawns, regardless of whether they are chained or not. That is the advantage of it: you apply it to both chained and not chained pawns, i.e. to all pawns that are flexible. This makes it a sufficiently wide concept worth implementation.

And engines, you might be sure, do not understand larger groups of pawns.

carldaman
Posts: 1733
Joined: Sat Jun 02, 2012 12:13 am

Re: The phalanx concept

Post by carldaman » Thu May 22, 2014 3:25 am

Lyudmil Tsvetkov wrote:
carldaman wrote:
Lyudmil Tsvetkov wrote: Overall, I would conclude the following:

- phalanx pawns as described are an extremely useful concept; actually, I have never seen a more valid concept among refined pawn terms, except possibly chain pawns
- in order for the concept to succeed, you should necessarily specify that phalanx pawns acn not be base pawns of a chain, i.e. you must exclude base pawns from the bonus, otherwise you get it very much imprecise
- the bonus should be small, 3-8cps, and uniform, i.e. you should not give any other bonus for cetral files or advanced ranks apart from the uniform one, as this would make things redundant and we like only to incentivise togetherness of pawns.
- most importantly, all the credit goes to Ralph

What do you think of the phalanx concept? Do you think it is feasible?
Anyone doing something like that?
Hi Lyudmil,

Very little time to post, so only limited comments:

I think phalanx pawns make for a wonderful concept, and maybe much more can be said. I'm sure glad you brought it up. Some of the qualitative differences between the White and Black pawn masses are striking in your diagrams, all based on the phalanx concept.

[d]6k1/1pp1pp2/p5p1/3P4/PPP1PP2/8/8/6K1 w - - 0 1

I'm not a 100% sure about the c4 pawn in the above diagram. It is very mobile and can move to c5 where it would be fully "phalanxed", but also supports the phalanx d5 pawn from c4. Now, what I think may also be important is the presence and placement of the White b pawn. If it were on b5, and there was a Black pawn on b6 or d6, then c4 should clearly not be counted as part of the phalanx. Also, if White had no b-pawn at all in the diagram, then the c4 pawn would lose some its phalanx potential.

Perhaps the definition needs to be more flexible or inclusive not to leave out the c4 pawn. I would like it even better if this 'phalanx potential' also can be accounted for in the scheme of the things.

Anyway, these thoughts are based on a superficial overview of your post. Keep up the good work, Lyudmil. :)

Cheers,
CL
Thanks, Carl, for cheering me up! I know that even if no one else does so, you will still want to encourage me.

Regarding the c4 pawn, if you give it the bonus too, you should also do so with black f7 and b7 pawns, and we would not like to do that. I was looking at a sufficiently big sample of games and observed that in most cases base chain pawns only hurt the phalanx rule. For example, we would not like to give bonus for such pawns, when a base pawn defends 2 friendly pawns simultaneously, for example white pawns on g2,f3,h3. Etc., I just observed that in most cases not excluding the base chain pawn hurts, but of course, things could be finetuned with computer help, to see what actually works and what not.

I hope you are not the only one that appreciates the value of the concept, maybe 1 or 2 engine programmers will also want to look at it. The bonus values are low, it is true, but such phalanx pawns happen quite frequently and besides explain in a meaningful way a difficult positional concept.
Yes, by all means exclude base pawns (that defend 2 other pawns) from the 'phalanx'. However, while I also agree about the f7 and b7 pawns, it is only because they're still on their original squares. Perhaps pawns that are at least on their own 4th ranks, such as the c4 pawn can be counted as being as part of the phalanx due to their more active posture.

I see Pawel also replied. I have him pegged as an imaginative and open-minded guy. I think that he's probably very interested in developing a strong engine that plays creative human-like chess. Perhaps someone like him may be more receptive to suggestions than the SF team. It would likely be easier, more rewarding and more hassle-free to improve a strong but lower rated engine such as Rodent (still 2700+, not too shabby, eh?) that's not in a ratings race for the #1 spot.

CL

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

Re: The phalanx concept

Post by Lyudmil Tsvetkov » Thu May 22, 2014 11:25 am

carldaman wrote:
Lyudmil Tsvetkov wrote:
carldaman wrote:
Lyudmil Tsvetkov wrote: Overall, I would conclude the following:

- phalanx pawns as described are an extremely useful concept; actually, I have never seen a more valid concept among refined pawn terms, except possibly chain pawns
- in order for the concept to succeed, you should necessarily specify that phalanx pawns acn not be base pawns of a chain, i.e. you must exclude base pawns from the bonus, otherwise you get it very much imprecise
- the bonus should be small, 3-8cps, and uniform, i.e. you should not give any other bonus for cetral files or advanced ranks apart from the uniform one, as this would make things redundant and we like only to incentivise togetherness of pawns.
- most importantly, all the credit goes to Ralph

What do you think of the phalanx concept? Do you think it is feasible?
Anyone doing something like that?
Hi Lyudmil,

Very little time to post, so only limited comments:

I think phalanx pawns make for a wonderful concept, and maybe much more can be said. I'm sure glad you brought it up. Some of the qualitative differences between the White and Black pawn masses are striking in your diagrams, all based on the phalanx concept.

[d]6k1/1pp1pp2/p5p1/3P4/PPP1PP2/8/8/6K1 w - - 0 1

I'm not a 100% sure about the c4 pawn in the above diagram. It is very mobile and can move to c5 where it would be fully "phalanxed", but also supports the phalanx d5 pawn from c4. Now, what I think may also be important is the presence and placement of the White b pawn. If it were on b5, and there was a Black pawn on b6 or d6, then c4 should clearly not be counted as part of the phalanx. Also, if White had no b-pawn at all in the diagram, then the c4 pawn would lose some its phalanx potential.

Perhaps the definition needs to be more flexible or inclusive not to leave out the c4 pawn. I would like it even better if this 'phalanx potential' also can be accounted for in the scheme of the things.

Anyway, these thoughts are based on a superficial overview of your post. Keep up the good work, Lyudmil. :)

Cheers,
CL
Thanks, Carl, for cheering me up! I know that even if no one else does so, you will still want to encourage me.

Regarding the c4 pawn, if you give it the bonus too, you should also do so with black f7 and b7 pawns, and we would not like to do that. I was looking at a sufficiently big sample of games and observed that in most cases base chain pawns only hurt the phalanx rule. For example, we would not like to give bonus for such pawns, when a base pawn defends 2 friendly pawns simultaneously, for example white pawns on g2,f3,h3. Etc., I just observed that in most cases not excluding the base chain pawn hurts, but of course, things could be finetuned with computer help, to see what actually works and what not.

I hope you are not the only one that appreciates the value of the concept, maybe 1 or 2 engine programmers will also want to look at it. The bonus values are low, it is true, but such phalanx pawns happen quite frequently and besides explain in a meaningful way a difficult positional concept.
Yes, by all means exclude base pawns (that defend 2 other pawns) from the 'phalanx'. However, while I also agree about the f7 and b7 pawns, it is only because they're still on their original squares. Perhaps pawns that are at least on their own 4th ranks, such as the c4 pawn can be counted as being as part of the phalanx due to their more active posture.

I see Pawel also replied. I have him pegged as an imaginative and open-minded guy. I think that he's probably very interested in developing a strong engine that plays creative human-like chess. Perhaps someone like him may be more receptive to suggestions than the SF team. It would likely be easier, more rewarding and more hassle-free to improve a strong but lower rated engine such as Rodent (still 2700+, not too shabby, eh?) that's not in a ratings race for the #1 spot.

CL
SF actually are very receptive, it is just from time to time that they close the doors.

[d]6k1/ppp2p2/3p2p1/8/2PP4/1P2PP2/P7/6K1 w - - 0 1
Above you see again why the phalanx concept is useful: with the help of meaningful connecting phalanx pawns for white on b3,c4,d4, and possibly e3 according to Carl's definition, versus only 1 or 2 for black, b7, and possibly c7, we are able to see that white enjoys a considerable advantage in terms of pawn structure in the usual case with pieces on the board. It is difficult to see that otherwise.

[d]6k1/pp3p2/3p3p/8/2PP4/1P2PP2/8/6K1 w - - 0 1
What is wrong with the island concept? Well, I am not sure it is wrong and bad in assessing weaknesses, however, above one case when it might easily fail, when you have too many isolated pawns that are counted as islands at the same time. If you penalise 3 black isolated pawns, and apart from that 4 islands, that already becomes too much. Besides, what penalty are you going to apply for an island?

Interesting if someone has achieved good results by applying islands? I would still prefer a phalanx pawn bonus instead of that, as it captures not only the state of separation of the pawn structure, but also very well its extent of cohesiveness. Engines usually do not have problems with seeing the extent of separation, but they do have, even the top ones, problems with seeing the extent of cohesiveness.

skoony
Posts: 165
Joined: Thu Mar 09, 2006 1:36 am
Location: saint paul,minnesota

Re: The phalanx concept

Post by skoony » Thu May 22, 2014 11:59 am

look up the research behind the chess program phalanx.
the author had some interesting idea's.
regards
mike
by the time i get there,i'll be there.

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

Re: The phalanx concept

Post by Lyudmil Tsvetkov » Thu May 22, 2014 3:32 pm

On islands and phalanx pawns again.

[d]6k1/ppp2p2/6pp/8/8/1PPP1P2/P5P1/6K1 w - - 0 1
Neither concept is able to explain why in the middlegame it is better to have a group of 4 and a group of 2 pawns vs 2 enemy groups of 3 pawns each respectively. Islands would give 2 island penalties for 2 groups of both sides, and phalanx pawns would give 2 bonus points each side for b3,c3 and b7,g6 respectively. So both fail to see the impact a larger group of pawns has.

However, when we come to larger groups of pawns, it is already not like that. Here an island penalty would frequently fail, while a phalanx pawn bonus most likely succeed.

[d]6k1/ppp5/3p2pp/8/3P4/1PP1P3/P5P1/6K1 w - - 0 1
Above, white has an isolated pawn, and black has a candidate passer on the king side, however, what we want to capture is how a group of 5 pawns is stronger than a group of 4 pawns in rich piece middlegames. The island concept would not be able to explain that, as there are 2 islands each side, same penalty. The phalanx concept, on the other hand, explains the phenomenon very well, because white has 2 or 3 phalanx pawns in the group of 5, depending on how you count them, and black one phalanx pawn less. So already in terms of stronger groups white gets a bonus here.

[d]6k1/ppp2p2/6p1/8/2PP4/1P2P3/P7/6K1 w - - 0 1
Even more evident here. Islands would give only one more penalty to black, while considering phalanx pawns would give white bonus for 3 such pawns on b3,c3,d4 and black only one bonus for b7. So again, phalanx pawns here clearly favour white.

This would be even more evident with larger pawn groups. So that the phalanx concept is extremely useful for correctly evaluating larger pawn groups of 5,6 and more connected pawns. Of course, one should make the observation that phalanx pawns are meaningful mainly in rich positions with pieces involved, as the role of larger pawn groups is, apparently, as with chains, to restrict the activity of the enemy pieces while supporting own piece activity. One of the reasons for engines' misunderstanding of larger pawn groups is maybe that they tend to emphasize isolation more than own group cohesiveness.

Post Reply