hgm wrote:I still think 8x64 would be enough. It can tabulate the maximum number of steps a Pawn can have to the promotion square to still be unstoppable. My point was more that safeDistance[d8][b6] = 0, (white to move) rather than 2.
Of course, a nice reformulation of the problem.
And I am not sure the presence of the board edge could spoil it. Perhaps it can be tabulated as a function of the Knight location relative to the promotion square safeDistance[knightSqr-promoSqr].
This looks even better I cannot imagine a case where this wouldn't work because the knight can always jump the opposite direction of the edge to achieve the same goal. I hope I'm not missing something here.
Another pitfal is that the fastest Knight trajectory might expose you to capture by the Pawn...
Yes, it's just a heuristics. Still if the knight is too far away to stop the passer, the passer still gets the bonus.
Last question (and perhaps the most important) is if this idea wouble be viable in practice...
PK wrote:I have always assumed that it is safe to return 0 as a positional evaluation, when the stronger side has just one minor piece and no pawns. Yesterday, however, my program, playing at 5 minutes + 2 seconds per move voluntarily entered lost ending, betting on KN ve KP being a draw, while the pawn was in fact unstoppable. The problem was further aggravated by hashing in the quiescence search, as the wrong draw score spread through the transposition table, when parents of a "drawn positions" were also wrongly labelled as draws.
It took me a while to understand what is going on, and I was afraid of a program-ruining bug, since not seeing a win for White after Kb5 was outlandish: