Find All reachable squares for a knight on chessboard in K moves when opponent has another knight.

Revision en1, by purist, 2018-08-20 11:46:11

Given an NxM chessboard, you have a knight at some position and your opponent also has a knight, Find number of squares reachable to your knight in exactly K moves without being captured by opponent.There is no other piece other than 2 knights mentioned. You move first. Both players play optimally. Obvious solution would be to recursively try out each possibility for both knights but that would be too slow. Is there deterministic polynomial time solution ?

Tags chess, #algorithms

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English purist 2018-08-20 11:46:11 559 Initial revision (published)