lech wrote:Last question regarding pawn endgames.
I can’t find separate evaluation for pawn endgames (KP../KP..). Stockfish use the same common function. In many cases it can give a very bad effect.
E.g.
Thanks to bonuses and penalties from code:
evaluate.cpp; evaluate_passed_pawns_of_color()
ebonus -= Value(square_distance(ourKingSq, blockSq) * 3 * tr);
ebonus -= Value(square_distance(ourKingSq, blockSq + pawn_push(Us)) * 1 * tr);
ebonus += Value(square_distance(theirKingSq, blockSq) * 6 * tr);
…………..
// Are any of the squares in the pawn's path attacked or occupied by the enemy?
if (b3 == EmptyBoardBB)
// No enemy attacks or pieces, huge bonus!
// Even bigger if we protect the pawn's path
ebonus += Value(tr * (b2 == b4 ? 17 : 15));
[d] 8/3k2p1/8/PK6/7p/7P/8/8 w - -
Stockfish’s score is ca. +2.5 for this lost position. The winning Pawn g7 has penalty too.
I don’t understand, how can Stockfish play any endgame, if can’t score possible pawn endgames correctly? Is there a protection I can’t see?
This position is a draw. Consider
[D] 8/8/8/8/7p/5kpP/8/6K1 w - -
with White or Black to move.
Now, I understood you.
position's score is +2.5
infinite analysis is -2.5 (depth 40 - maybe deeper)
in fact it is 0.00
Thank you and sorry for Stockfish and me too!
In the version 1.8, SF sees this position correctly :
[d]8/8/6p1/2bN3p/1pPkb3/1P2p1P1/4B2P/3K4 b - -
1 ... Bf8 2. Sf6 (not 2.Ke1 ??
I think that it would be good to do a split. It can help in decision-making: to go (exchange, long exchange > 2 ply) into pawn endgames and to check „unstoppable passed pawns”, additionally.
I guess that a possible problem can be "tree explosion".
If no (you probably know), why to test it?
It is not a tunning or "speculation". It has a sense or not.
I guess that a possible problem can be "tree explosion".
If no (you probably know), why to test it?
It is not a tunning or "speculation". It has a sense or not.
It has a sense if it works, has no sense if it doesn't
lech wrote:Last question regarding pawn endgames.
I can’t find separate evaluation for pawn endgames (KP../KP..). Stockfish use the same common function. In many cases it can give a very bad effect.
The Stockfish's great strength in endgame has always been a mystery for me. It doesn't use tablebases, it has very little hard-coded endgame knowledge. I think we could improve a lot by adding carefully designed endgame knowledge, but it's not an easy task.
I think the primary issue is how much damage is done when a more specialize rule is wrong. Programs generally tend to do the right thing ANYWAY if your general purpose evaluation function is done in a relatively balanced way like stockfish. Very often not knowing the position is a win is not so bad as long as it knows the position is very good - or as long it is likely to play correctly anyway.
Of course it's always better if it knows - but not if that knowledge is wrong too often.
I would rather have a first class general purpose evaluation function that a complex one with lots of rules and tricks and gimmicks.
You can usually spot those kinds of programs - they can play fantastic in some positions and horrible in others. But I think the playing ability of a chess program is all about the bad moves, not the good ones.
lech wrote:Last question regarding pawn endgames.
I can’t find separate evaluation for pawn endgames (KP../KP..). Stockfish use the same common function. In many cases it can give a very bad effect.
The Stockfish's great strength in endgame has always been a mystery for me. It doesn't use tablebases, it has very little hard-coded endgame knowledge. I think we could improve a lot by adding carefully designed endgame knowledge, but it's not an easy task.
I think the primary issue is how much damage is done when a more specialize rule is wrong. Programs generally tend to do the right thing ANYWAY if your general purpose evaluation function is done in a relatively balanced way like stockfish. Very often not knowing the position is a win is not so bad as long as it knows the position is very good - or as long it is likely to play correctly anyway.
Of course it's always better if it knows - but not if that knowledge is wrong too often.
I would rather have a first class general purpose evaluation function that a complex one with lots of rules and tricks and gimmicks.
You can usually spot those kinds of programs - they can play fantastic in some positions and horrible in others. But I think the playing ability of a chess program is all about the bad moves, not the good ones.
I am not sure if stockfish is so strong in endgame and maybe the problem is the opposite and other programs are simply weak in endgames.
There are many things that stockfish does not know about endgames
For example the fact that Rook and a pawn and c pawn is often a draw.
[D]r1k5/8/8/8/P1P5/R7/1K6/8 w - - 0 1
This position is drawn by tablebases but stockfish1.8 even does not reduce the score to suspect that it is a draw relative to a different case when the pawn is at d4 and not at c4.
I guess that simple rule of reducing scores that are less than +4 in KRPP vs KR endgame(a+c pawns) when you reduce the score more when the positional evaluation is worse may help stockfish.