Duplicate States

The OccursOnPath check in Expand only checks for duplicate states along a single branch in the state space search tree.

However, the A* algorithm might re-create states that have already been encountered in other parts of the search tree, wasting time and space.

Consider the state space below on the left, and its generated search tree (with A as the start state) on the right: