Some refinements to uniform cost search, including keeping track of route