http://chessprogramming.wikispaces.com/Pawn+chainPawn chain consists of pawns placed on the same diagonal, without interruption, so that only one of them is undefended. That pawn is called a base of pawn chain.
Passed Pawns (endgame)
Moderators: hgm, Rebel, chrisw
-
- Posts: 408
- Joined: Sat Mar 06, 2010 9:28 am
Re: Passed Pawns (endgame)
I also do not understand. Pe4 + Pd4 isn't a chain.
-
- Posts: 4576
- Joined: Sun Mar 12, 2006 2:40 am
- Full name:
Re: Passed Pawns (endgame)
It is for Stockfish though, if I understand it correctly, a pawn on rank_bb(r) is counted as a chained pawn, but the pawn that forms a base of a chain is not counted (for example e3 if there is also a pawn on d4 is a base pawn), you could defend that decision by stating a base pawn is a weak spot so not worth a bonus but it is also a very important pawn for the chain. So I consider that a weak spot in the code right now, the defence of a pawn base is non-existant in the code itself.Ralph Stoesser wrote:I also do not understand. Pe4 + Pd4 isn't a chain.
http://chessprogramming.wikispaces.com/Pawn+chainPawn chain consists of pawns placed on the same diagonal, without interruption, so that only one of them is undefended. That pawn is called a base of pawn chain.
Regards, Eelco
Code: Select all
// Member of a pawn chain (but not the backward one)? We could speed up
// the test a little by introducing an array of masks indexed by color
// and square for doing the test, but because everything is hashed,
// it probably won't make any noticeable difference.
chain = ourPawns
& neighboring_files_bb(f)
& (rank_bb(r) | rank_bb(r - (Us == WHITE ? 1 : -1)));
Debugging is twice as hard as writing the code in the first
place. Therefore, if you write the code as cleverly as possible, you
are, by definition, not smart enough to debug it.
-- Brian W. Kernighan
place. Therefore, if you write the code as cleverly as possible, you
are, by definition, not smart enough to debug it.
-- Brian W. Kernighan
-
- Posts: 1136
- Joined: Sun Feb 14, 2010 10:02 pm
Re: Passed Pawns (endgame)
Yes, in common sense.mcostalba wrote:Perhaps I have understood. Are you suggesting the following patch ?mcostalba wrote:
I am very sorry, I really don't understand what are you trying to say.
Code: Select all
chain = ourPawns & neighboring_files_bb(f) - & (rank_bb(r) | rank_bb(r - (Us == WHITE ? 1 : -1))); + & (rank_bb(r) | rank_bb(r + 1) | rank_bb(r - 1));
[d] 8/8/5p2/1p5p/1Pp5/2P2P2/6P1/8 w - - 0 1
the blocked pawns b5, c3 bonus =0
Pg2 – [!(theirPawns & file_bb(f))] - bonus /2 (?)
It was too absorbing work to improve the SF’s code, though an interesting new experience.
Good luck!
BTW: My last suggestion is: too high penalty for double isolated (x2) pawns [e.g. if (isolated & !doubled)].