passed pawn question

Discussion of chess software programming and technical issues.

Moderator: Ras

User avatar
Volker Annuss
Posts: 181
Joined: Mon Sep 03, 2007 9:15 am

Re: passed pawn question

Post by Volker Annuss »

bob wrote: First, who does pawn PUSHES in the q-search?
Me, but only to the 7th (2nd) rank in the first ply of qsearch, when the static eval is close to alfa.
bob
Posts: 20943
Joined: Mon Feb 27, 2006 7:30 pm
Location: Birmingham, AL

Re: passed pawn question

Post by bob »

BubbaTough wrote:
bob wrote: One 30K game match shows a -20 ELo change doing this. I am re-running to verify. All I did was what was mentioned. Normally one requires no pawns on either adjacent file one or more ranks in front of the passed pawn. I changed it to 2 or more ranks for those adjacent files. The eval in Crafty, for your position, changed by +1.something which is a big jump...
20 elo is an amazing difference! Thanks for the data. It looks like your intuition was right.

-Sam
I wasn't expecting that. But then I realized that this applies EVERYWHERE, not just to pawns on the 6th. That same configuration on the 3rd or 4th rank is probably more dangerous, and particularly in the middle game.

My intuition was, and generally always is, that speculative bonuses are dangerous. They can sometimes repair a problem. But often, they break things in ways that were not expected. Two passed pawns on the 6th are worth a rook is a well-known concept. In CC it is a well-known DANGEROUS concept. Because a human doesn't stop when it gets the two pawns there, his judgement/intuition factors in to make sure the pawns are not going to quickly fall since they are far advanced and harder to defend. Doing all of that in a 2p on 6th eval term becomes quite complicated, with the attendant bugs. So we generally don't write single eval terms that take a thousand lines of code, due to speed, complexity, bugginess, etc. And if you go simple...

One of the things I hate to see the most is for Crafty to enter some deep strategic line where we come out at +1.4 or so due to king safety. But over the next 20 moves, that drops steadily because it can't exploit the weaknesses that are certainly there. So I add constraints... No point in worrying about a weakness at h3/f3 (after playing g3) if there are no pieces that can take advantage of those weak squares. Or if there are, there is no way for them to get there. So I let the search see if they can get there, currently, and when they can't, the score slowly drops. I hate to see it sac a pawn to get that +1.4, and then slowly drop to -1.0 in the endgame...

Be interesting to see someone else try this same test. It was simple to do...
User avatar
Desperado
Posts: 879
Joined: Mon Dec 15, 2008 11:45 am

Re: passed pawn question

Post by Desperado »

asanjuan wrote:I've been working with the passed pawn detection in Rhetoric, and I found an interesting position.

[d]

The wiki says:
A passed pawn, also called free pawn or passer, is a pawn with no square on its way to queening controlled or occupied by opponent pawns. In case of doubled pawns, it is wrong to score the back twin as passed, even if it meets the above conditions. Therefor, the passer requires his front span disjoint from all other pawns as well from opponent pawn attacks.
So the question is: Is the pawn on a3 a passed pawn or not? Rhetoric says yes in his static eval. What do you think?

Regards.
Alberto.
I would say that is a typical "Candidate" Passed Pawn.

As long as this pawn isn't a passed pawn from a static point of view i would handle it in a seperate way.
Having a bonus for such a pawn is a good idea anyway.
bob
Posts: 20943
Joined: Mon Feb 27, 2006 7:30 pm
Location: Birmingham, AL

Re: passed pawn question

Post by bob »

Desperado wrote:
asanjuan wrote:I've been working with the passed pawn detection in Rhetoric, and I found an interesting position.

[d]

The wiki says:
A passed pawn, also called free pawn or passer, is a pawn with no square on its way to queening controlled or occupied by opponent pawns. In case of doubled pawns, it is wrong to score the back twin as passed, even if it meets the above conditions. Therefor, the passer requires his front span disjoint from all other pawns as well from opponent pawn attacks.
So the question is: Is the pawn on a3 a passed pawn or not? Rhetoric says yes in his static eval. What do you think?

Regards.
Alberto.
I would say that is a typical "Candidate" Passed Pawn.

As long as this pawn isn't a passed pawn from a static point of view i would handle it in a seperate way.
Having a bonus for such a pawn is a good idea anyway.
I think calling it a candidate is dangerous. For example, move the white rook to the b file. Now the black king has to move, and that "candidate passer" evaporates when white takes it. It is much better to have a pawn on a safe square, where the search has proven that it can't be taken, before awarding significant bonuses. I've already tested the idea and it lost 20 Elo in Crafty by calling that b pawn passed. In that position, it looks reasonable. But think about the other billions of possibilities that can arise. Many of them are not going to look reasonable for that eval term.
Gerd Isenberg
Posts: 2251
Joined: Wed Mar 08, 2006 8:47 pm
Location: Hattingen, Germany

Re: passed pawn question

Post by Gerd Isenberg »

asanjuan wrote:I've been working with the passed pawn detection in Rhetoric, and I found an interesting position.

[d]

The wiki says:
A passed pawn, also called free pawn or passer, is a pawn with no square on its way to queening controlled or occupied by opponent pawns. In case of doubled pawns, it is wrong to score the back twin as passed, even if it meets the above conditions. Therefor, the passer requires his front span disjoint from all other pawns as well from opponent pawn attacks.
So the question is: Is the pawn on a3 a passed pawn or not? Rhetoric says yes in his static eval. What do you think?

Regards.
Alberto.
Thanks, definition corrected, to exclude levers. So a3 is neither a passer nor a candidate.
a pawn with no opponent pawns in front on the same or adjacent files.
May be more precise from
https://chessprogramming.wikispaces.com ... tboards%29

Code: Select all

Passers are the pawns outside the union of all opponent frontspans and attack-frontspans.
Gerd
Tennison
Posts: 183
Joined: Sat Nov 26, 2011 2:02 pm

Re: passed pawn question

Post by Tennison »

Desperado wrote: I would say that is a typical "Candidate" Passed Pawn.

As long as this pawn isn't a passed pawn from a static point of view i would handle it in a seperate way.
Having a bonus for such a pawn is a good idea anyway.
For reference, take a look at the 2 books from Hans Kmoch (maybe the god in pawn play ?) :

1. In french (maybe there is a English version but I don't know) : "L'art de jouer les pions"

2. In English : "Pawn power in chess"

Here is a small excerpt from the second one :


I-§2: On the road to promotion

The promotion of a pawn depends basically only on the obstruction
by opposing pawns. There are two types of obstruction, mechanical
and dynamical.

Most hampering is the mechanical obstruction offered by the
pawn's counterpawn, e.g. Pd2 vs Pd7. Every pawn is pawn and
counterpawn at the same time; it depends on the observer's point of
view.

Originally every pawn is unfree owing to mechanical obstruction.
Removal of its counterpawn makes a pawn half- free.

The half-free pawn meets dynamical obstruction on the part of
its opposing neighbors whom we call sentries; normally an innerpawn
faces two of them, a rimpawn only one. The sentries both guard the
same square or two different squares. The sentries of White's d-pawn,
for instance, are Black's c-pawn and e-pawn; in case of Pd4 vs Pc6,
Pe6 they both guard against d4-d5, while in case of Pd4 vs Pc7, Pe6
one guards agamst d4-d5, the other against d5-d6.

Dynamical obstruction is not absolute; the half-free pawn may
march through, and is therefore called a candidate-a candidate for
full freedom and promotion.

The promotion of a candidate depends on assistance by its own
neighbors whom we call helpers. The helpers of White's d- pawn, for
instance, are White's c-pawn and e-pawn. In the position ofPc2, Pd2,
Pe2 vs Pc7, Pe7 the d-pawn's bypassing of its sentries is assured.

The operation of helping a candidate to cross the guarded
square or squares should start wIth the advance of the candidate itself.
"Candidate first" is the rule for such cases. Other initial pawn moves
are basically unreliable.

Helpers and sentries neutralize each other if there is a helper
for every sentry. A half-free pawn with inadequate help is no true
candidate but afaker. In the position ofPd4 vs Pe6, for instance, both
pawns are fakers, each one lacking the necessary helper. The same
with Pd4 in the formation of Pc2, Pd4, Pe2 vs Pc7, Pe7, Pf6 when Pe2
is paralyzed by f7 -f6; this helper needs a helper's helper, e.g. Pf2, which
assures the consecutive crossing of eS and d6.

In other words: the passing of a candidate depends on its
belonging to a majority of pawns (which mayor may not be just local).
Once a candidate faces no more obstruction on the part of
sentries, it is free, as are all pawns in the position of Pd4, Ph2 vs Pc4,
Pf6. A free pawn is called a passed pawn or, as we prefer to call it for
short, a passer.

A passer is basically superior to an unfree pawn or a candidate.
The shorter its frontspan is, the greater the value of a passer.
For instance Pf5 vs Pc6 favors White.

Image


Another factor of importance in the relative value of passers is
their horizontal distance from the bulk of the pawns; the greater this
distance is, the better. It constitutes the so-called advantage of the
outside passed pawn (Diagram 5). The outside passer counts particularly
in pawn endings, inasmuch as it forces the opposing King to
stray far away from its own pawns.

There is also distinction with regard to protection. A passer
protected by one or two pawns is a protected passer (Diagram 6) and
superior to an ordinary passer. But it is exclusively the protection by
pawns that counts.

An unfree pawn or a faker may suddenly become a passer of
decisive power by means of a a sacrificial combination. We call such
a pawn a sneaker. The sneaker's outstanding quality is almost invariably its short frontspan and outside location, e.g. PaS, Pb4, PdS
vs Pa6, Pc7, Pd6, when the unfree Pa5 sneaks through after 1 b5,
a6xb5; 2 a6.

Image

In the popular example of Diagram 7 White has two potential
sneakers, one of them marching through as follows: 1 d6, exd6 (or 1
... cxd6; 2 e6); 2 c6, dxc6; 3 e6 and wins (assuming that no piece can
interfere). Note the importance of the original span situation; if
Black has the move, he correctly starts with 1 ... d6 but must answer
2 exd6 with 2 ... exd6, as 2 ... c6 obviously makes no sense.


I think if somebody try to use all the ideas from Kmoch books about pawn play, this engine will be very very good ! But difficult to translate all these ideas in programming lines ...
Lyudmil Tsvetkov
Posts: 6052
Joined: Tue Jun 12, 2012 12:41 pm

Re: passed pawn question

Post by Lyudmil Tsvetkov »

asanjuan wrote:I've been working with the passed pawn detection in Rhetoric, and I found an interesting position.

[d]

The wiki says:
A passed pawn, also called free pawn or passer, is a pawn with no square on its way to queening controlled or occupied by opponent pawns. In case of doubled pawns, it is wrong to score the back twin as passed, even if it meets the above conditions. Therefor, the passer requires his front span disjoint from all other pawns as well from opponent pawn attacks.
So the question is: Is the pawn on a3 a passed pawn or not? Rhetoric says yes in his static eval. What do you think?

Regards.
Alberto.
Well, obviously this is not my place to post, but, strictly relying on chess wisdom, I think that existing levers my might still not deprive a pawn that otherwise could be considered as a passer of such a quality. The main thing would be the number of pawns attacking and defending such a pawn. When the number of pawns defending it is equal or bigger than the number of pawns attacking it, than the pawn could safely be considered as a passer.

[d]7k/1p2p3/P2P4/4P3/p1p3p1/1p3p2/P1P1P1P1/7K w - - 0 1

For example, in the above diagram, a6 would not be a passer, but d6 would; b3 would be a passer, while f3 would not.

I think this might make some practical sense, as similar constellations might remain on the board for quite some time without a visible change in the structure, and in this case having an opinion of the precise status of the pawn might be important.
mcostalba
Posts: 2684
Joined: Sat Jun 14, 2008 9:17 pm

Re: passed pawn question

Post by mcostalba »

Lyudmil Tsvetkov wrote: I think this might make some practical sense, as similar constellations might remain on the board for quite some time without a visible change in the structure, and in this case having an opinion of the precise status of the pawn might be important.
Yes, your definition is what most engines use, actually we prefer to call that pawns "candidate" and reserve the name "passed" for a pawn that is already passed.
Lyudmil Tsvetkov
Posts: 6052
Joined: Tue Jun 12, 2012 12:41 pm

Re: passed pawn question

Post by Lyudmil Tsvetkov »

mcostalba wrote:
Lyudmil Tsvetkov wrote: I think this might make some practical sense, as similar constellations might remain on the board for quite some time without a visible change in the structure, and in this case having an opinion of the precise status of the pawn might be important.
Yes, your definition is what most engines use, actually we prefer to call that pawns "candidate" and reserve the name "passed" for a pawn that is already passed.
Hi Marco.
I think there might be some distinction between a candidate as a general rule, and a candidate whose only enemy pawns in the forward direction consist of levers. While in the first case it is disputable if the candidate will be able to advance to the point of becoming a passer (depending, of course, on the piece control of both sides in front of this pawn), in the specific second case that pawn has already challenged the enemy pieces' restricting capacities and has advanced to the point where it could already be considered a full passer. The distinction could be that both pawns could be assigned different values.

[d]7k/4p3/8/3PP3/ppp1p1p1/5p2/P1P1P1P1/K7 w - - 0 1

For example, on the above diagram, b4 and d6 could be simply candidates, while f3 already a passer. There are no reasons why captures and recaptures would not reproduce the passer, while in the first case it is still problematic if the candidate would advance to a passer status.

That is just my general chess impression, but of course, you know a whole lot more on related subjects, and I hope very much that I am not standing in your way with my comments.

Best, Lyudmil
Lyudmil Tsvetkov
Posts: 6052
Joined: Tue Jun 12, 2012 12:41 pm

Re: passed pawn question

Post by Lyudmil Tsvetkov »

Hi Marco again.
I do not know if this is the right thread to ask you, maybe I should have written you a PM, but, once we started discussing the topic of passers and candidates, may I ask you another small thing concerning Stockfish implementation of candidates.

I remember you posting the following definition for candidate passer implemented in SF:

// A not passed pawn is a candidate to become passed if it is free to
// advance and if the number of friendly pawns beside or behind this
// pawn on adjacent files is higher or equal than the number of
// enemy pawns in the forward direction on the adjacent files.


[d]6k1/1p6/p4p2/2P1pP2/1P6/8/5P2/6K1 w - - 0 1

In this case, would c5 and e5 be considered as candidates?

[d]6k1/5p2/7p/8/8/7P/5PP1/6K1 w - - 0 1

Or would g2 in the second diagram not be considered a candidate, when one of the friendly pawns (h3) is not beside or behind it, but in front of it.

Many thanks in advance for a possible help. I know I am going to learn something :)

Best, Lyudmil