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.
It really doesn't matter what the wiki says. There are tons of things in the CPW that do not work, and are presented for historical reasons or because someone did them.
You should do what works for you. Simply play lots of fast games in parrallel, and do some statistics with or without a code patch and see which version is best.
DiscoCheck doesn't consider a3 a passed pawn though. But it does consider it a candidate passer, which is always scored half as much as a passed pawn.
Theory and practice sometimes clash. And when that happens, theory loses. Every single time.
bob wrote:There are many ways to create this exact same pawn configuration, where pushing is not an easy win. For example, an enemy bishop on b1. And put an enemy rook on a1 with your queen on a8 and you also can't play axb7 safely, it would depend on whether after axb2 Rxa8 the opponent still has b1 covered so you can't push. Too much dynamic stuff going on, IMHO...
All these cases are well handled by q-search: a2 --> push on 2nd rank extension, captures are handled by q-search, promotion are handled in q-search... (a word of warning on q-search explosion....) That's all very dynamic stuff, but they can be discovered by qsearch... The problem is that qsearch can go a lot deeper than search, and it's no easy for the engine to see if it is a real advantage or not, as q-search is an approximation...
bob wrote:Evals have lots of error, but I think it better to generally err on the conservative side to avoid a highly volatile eval that makes the tree search unstable with serious horizon effect issues.
I'm not so experienced to say what's right and what's wrong, but I do really trust other's people experience.
You're absolutly right. I don't even remember my own code
It's not a candidate either because it cannot be supported by own pawns. I think the idea of candidate is to remove all pieces on the board (including kings) and look only at pawns, and see which ones have sufficient force (in terms of pawns that can help them) to pass. Anyway that's how I designed it to be, and I found this idea in Fruit (although Fruit's definition is a bit different IIRC).
The way I score candidate is to give them half the bonus they would get if they were passed. That means I reuse all the complicated passed pawn code (actually only the part relative to kings + pawns, and the part relative to pieces is done separately because one part can be cached by K+P key and the other cannot). This gave me a nice elo gain when I switched from using candidate bonus = f(rank). The reason are: factor code + ensure eval continuity between candidate and passed + benefit from all further developpement to passed pawn stuff automatically (like relative king position, etc.)
You should give that a try in Stockfish. Since it worked for me, and my passed pawn scoring is heavily based on Stockfish, there's a chance it will work in SF too.
Theory and practice sometimes clash. And when that happens, theory loses. Every single time.
bob wrote:There are many ways to create this exact same pawn configuration, where pushing is not an easy win. For example, an enemy bishop on b1. And put an enemy rook on a1 with your queen on a8 and you also can't play axb7 safely, it would depend on whether after axb2 Rxa8 the opponent still has b1 covered so you can't push. Too much dynamic stuff going on, IMHO...
All these cases are well handled by q-search: a2 --> push on 2nd rank extension, captures are handled by q-search, promotion are handled in q-search... (a word of warning on q-search explosion....) That's all very dynamic stuff, but they can be discovered by qsearch... The problem is that qsearch can go a lot deeper than search, and it's no easy for the engine to see if it is a real advantage or not, as q-search is an approximation...
What are you arguing for? That the pawn on a3 should be evaluated as a passed pawn (as you said earlier)? Then you go terribly wrong if you rely on the qsearch to discover that a3-a2 and a3xb2 are bad. If they both are bad, the qsearch will simpy stand pat and take the passed pawn bonus for the doomed pawn on a3.
(I am ignoring here that most qsearches will not look at a3-a2.)
So yes, you should rely here on qsearch and search, but only for discovering that a3 is going to be a passed pawn in 1 ply. (If indeed the qsearch would look at a3-a2, then it will be correctly seen as a passed pawn once it safely reaches a2.)
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.
Is this a Rhetoric-al question?
Of course!
Still learning how to play chess...
knigths move in "L" shape ¿right?
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.
It really doesn't matter what the wiki says. There are tons of things in the CPW that do not work, and are presented for historical reasons or because someone did them.
You should do what works for you. Simply play lots of fast games in parrallel, and do some statistics with or without a code patch and see which version is best.
DiscoCheck doesn't consider a3 a passed pawn though. But it does consider it a candidate passer, which is always scored half as much as a passed pawn.
I've changed the conditions that detects passed pawns and added a test if the pawn is attacked by other pawn or not. Also, I detected and corrected another stupid bug.
The tournament is running, and after 1500 games, the change seems to be 15 elo better, (yes, I need more games, I know...I have limited resources)
Still learning how to play chess...
knigths move in "L" shape ¿right?
bob wrote:
I would say no. Can you safely take on b2? Hard for eval to figure that out. Can you safely push to a2? Ditto. If the b pawn was missing, I would say yes. But I don't currently score a3 as passed in my code.
The pawn is passed in the sense that no pawn is blocking its advance. Generally speaking, most people still count positional features even if the piece generating them is threatened. In this way they allow the qsearch to determine if the pawn capture is relevant. For example, if a rook is on the 7th but is attacked by a bishop, usually the evaluation still gives it the bonus for being on the 7th.
The only real way to test which definition of passed pawn is better is by playing a lot of games. I don't think an answer can be definitively arrived at by logic. After the test games have been played, then one can retroactively justify them to the heart's delight.
-Sam
I think a bit of reasoning can help.
For example, you have a pawn majority. Do you count that as a passed pawn or something less? I count it significantly less, because it is a potential passed pawn, and the placement of enemy pieces or king might make realizing that passed pawn impossible. So a bonus for the threat, but not the full passed bonus.
That logic might work here, but large bonuses that are highly volatile are pretty dangerous based on my tuning experience. If the pawn can't safely advance or capture for whatever reason, the next move black can capture it and the bonus evaporates. I'd like to have the search prove it can hold the pawn first, by either actually pushing or taking on b7 and hanging on to it where black can't trade it at any instant with the simple bxa6.
I could probably modify my passed pawn detection code to handle that easily enough and test, but pretty strong intuition says it is most likely going to be a bit worse. More after I complete the test...
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...
bob wrote:There are many ways to create this exact same pawn configuration, where pushing is not an easy win. For example, an enemy bishop on b1. And put an enemy rook on a1 with your queen on a8 and you also can't play axb7 safely, it would depend on whether after axb2 Rxa8 the opponent still has b1 covered so you can't push. Too much dynamic stuff going on, IMHO...
All these cases are well handled by q-search: a2 --> push on 2nd rank extension, captures are handled by q-search, promotion are handled in q-search... (a word of warning on q-search explosion....) That's all very dynamic stuff, but they can be discovered by qsearch... The problem is that qsearch can go a lot deeper than search, and it's no easy for the engine to see if it is a real advantage or not, as q-search is an approximation...
bob wrote:Evals have lots of error, but I think it better to generally err on the conservative side to avoid a highly volatile eval that makes the tree search unstable with serious horizon effect issues.
I'm not so experienced to say what's right and what's wrong, but I do really trust other's people experience.
First, who does pawn PUSHES in the q-search?
And second, I'd rather let the normal search push the pawn and see if it can hold it (in a passed state) before letting the static evaluation have a go at producing a score...
I've already run the test, and it was a -20 Elo change to do this...
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.