Some embodiments provide a path-searching method. This method identifies two
sets of states in a multi-state space, where at least some of the states have at
least one dimension. The method performs a depth-first path search to identify
a path between the two sets of states. During the path search, the method propagates
a cost function that is defined over one state to another state.