I'm learning about knight's tour algorithm. I implemented using recursive fine but it take a long time and almost not a closed tour.
Now, I'm currently finding a fast algorithm for finding closed tour. Can someone recommend me some algorithm?
Update: I have read somewhere a heuristic for find a closed knight tour like this: Min[F(x, y)]
where F(x,y) is a set of f(x,y)=Min(x-1, n-x) + Min(y-1, n-y)
and (x, y)
is the position of next step and n
is the size of chess board. But how do I use that heuristic?