Allow the user of A* to define its own costs