I started out by copying the grid onto paper, then drawing a quick reference to the search order.
Then, stepwise:
(q) = queued
- = explored
-
I Queued A, which returned B and G
(q)A *B *G -
I Queued B (following the FIFO or first in, first out principle), returning C
A (q)B G *C -
Queued G, which returned H
A B (q)G C *H -
Queued C, which returned E then D
A B G (q)C H *E *D -
Queued H, which returned L
A B G C (q)H E D *L -
Queued E, which returned F
A B G C H (q)E D L *F -
Queued D which returned M
A B G C H E (q)D L F *M -
Queued L, returning nothing
A B G C H E D (q)L F M -
Queued F, returning I
A B G C H E D L (q)F M *I -
Queued M, returning K
A B G C H E D L F (q)M I *K -
Queued I, returning Z
A B G C H E D L F M (q)I K *Z
Then I got the shortest path by following the directions and moving stepwise (i.e. in the given order) through the queue path.
Hope this is helpful to someone! Really excited to implement this.