let f be a priority of a nodelet g be a cost from the origin to the current nodelet h be an estimated cost from the current node to the targetlet n1 be the first nodelet n2 be the target nodeletF be a priority queue1. create queue F2. insert n1 into F3. until F is empty a)let q be a node of the lowest priority f b) take q fromF c)for each neighbour s of qif s = n2, finishlet new_cost be q.g+estimation(s, q)if(new_cost >= s.g) goto c) s.g= q.g+estimation(s, q) s.h=estimation(s, n2) s.f= s.g+ s.hif there is another node s in the queue F which is of a lower priority than s.f, goto c) put s into F, setting the priority to s.f goto c) end goto 3