I have a question how to solve the following problem.
First, we have a chess board and two pawns located at $a1$ and $a2$. Our goal is to move them to the location $h7$ and $h8$. The rules for a pawn movement are the following:
- We can move our pawn regularly just by moving it by one unit up, down, left, or right.
- The pawn can jump over another pawn. If there is some space before another pawn, it will jump symmetrically skipping the equal number of empty squares after it lands. For example, if the pawn are located at a1 and a4, then after the jump they will located at a4 and a7.
Question: What is the minimum number of moves we need to perform to move our pawns from the initial to the final destination ?
Easy to solve since there are less than 64x64 positions. Let A(n) be the set of positions that can be reached from the start position in n moves, and B(m) the set of positions that can reach the end position in m moves. Calculate A(1), B(1), A(2), B(2) etc. until you find A(n) and B(m) with a common element, then the solution is n+m.