among other things
....................
.S..................
....................
..................G.
........................................
.S..................
.x..................
.xxxxxxxxxxxxxxxxxG.
....................For current node n:
f(n) = g(n) + h(n)
total cost = cost of path so far + n's estimated cost
.O..................
OSO.................
.O..................
..................G.
.....................OO.................
OSXO................
.OO.................
..................G.
....................Don't constrain yourself to this example:
....................
.S..................
....................
..................G.
....................Think of it more like this, in more general terms:
and so on
start
north
east
south
west