Of course, a nice reformulation of the problem.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.
This looks even betterAnd 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].
Yes, it's just a heuristics. Still if the knight is too far away to stop the passer, the passer still gets the bonus.Another pitfal is that the fastest Knight trajectory might expose you to capture by the Pawn...
Last question (and perhaps the most important) is if this idea wouble be viable in practice...