On-board game path - search for several optimal paths

I have a very simple task of finding the way - a board game played on an 8x8 grid, with each square either passing or not. I am looking for an algorithm that will give me the best n ways to get from some square A to square B (if any).

I looked at A *, but as far as I can see, there is no clear way to expand it to find several ways.

So, it’s critical that the paths he gives are actually the shortest n paths that he doesn't skip. Efficiency is also very important. Can someone suggest an algorithm that would be appropriate, or point me in the right direction?

+3
source share
4 answers

Dijkstra - , , 8x8, , . BFS (Breadth First Search) .

+3

, . 8 x 8 64 , x8 ( 4, ), .

+1

, . , ... nth , . N1, N2, N3... Nx, N2 ' Nx-1'. , (N1, N2 ') (Nx-1, Nx). , .

+1
0

All Articles