title: bidirectional uniform cost search
body: <p>I need to get optimal paths using a bidirectional uniform cost search. </p>
  
  <p>I am really struggling with this, because neither an intersection of the frontier nor an intersection of the explored nodes suffices to guarantee an optimal result.  </p>
  
  <p>I think I might just run bidirectional until the explored regions intersect, and then limit one of the searches to the explored nodes of the other.</p>
  
  <p>Is there anything else that will guarantee optimal paths, because I'd like a better performance gain. </p>