CS212: improved shortest path algorithm

* Prevents to expand frontier back to start state.