It seems that I didn't define the problem very well. You can't use the same cell if you're searching for current path (for example red path), but you can use the same cell if you're searching for alternative path.

Thanks Joshy, but as I said, I need to find all paths, not just shortest path. @j_milton Number of impassible squares is irrelevant. It can vary from 0 to 36 (6*6). I was just using quick random placement with max 5 squares, just to show that they need to be taken into account. Yes - same route cann...

Hey, I'm working on a brand new grid based game, and I need some help. I'm searching for algorithm (or code) that can iterate through all possible paths between point A and point B on a 6x6 grid (taking into account to not walk through empty squares). So this isn't a shortest path pathfinding proble...