Adding uniform cost search.