Path-aware optimistic optimization for a mobile robot