Lee's is basically a flood fill.
Code:
here = start = 1
while here is not the exit
for each open move
open move = here + 1
It looks something like this:
Code:
#A##########
#BCDEFGHIJK#
#C########L#
#D#LMNOPQ#M#
#E#K####R#N#
#F#J####S#O#
#GHI##VUT#P#
######W#UVQR
############
Here, the green path is the shortest to the exit (green-R). Assuming that both paths are being processed at the same time (it makes the two C marks at the same time, then the two D marks, etc), you can see that it would hit green-R (the exit in the lower right) long before the other path would have completed. Were you to let it keep running, red-V to green-Q would be red W, and instead of green-R, red-X would be the exit.
So, what you end up doing is backtracking by simply moving from the exit to whatever neighbor has the lowest value. R to Q, Q to P and so on. Whatever value the exit has (in this case R, is the length of the shortest path.
Do this for every sub block. Then store their values in a grid corresponding to the sub-block's location:
Code:
SEBGLP
DKWXIG
DSWGFX
RSVPOK
Move from the S in the upper left to the K in the lower right using the shortest sum possible. At least that sounds to me like what you're trying to do.
Quzah.