Creating a Starcraft AI – Part 22: Caveat Implementor
Then I need to go to the first endpoint, start the search again from there, and if I can’t find a path, go one area back, and find another path. Taking care to not overwrite any -1 values, of course, which will also be added during the method, signifying dead ends in the search tree. For the algorithm itself, the core of it is quite simple: If I find a path to some position in the next chokepoint, I increase the level variable, otherwise decrease, and mark the starting position (which was the end position one level up) as a dead end.
Source: makingcomputerdothings.com