             (make-recursive-expander 
              (delay (make-exhaustive-search 
                      (make-abstracted-incremental-dijkstra-sa-search state reward f))) r)))
-     (GoalNode state))
+     (make-goal-node state))
    reward])
 
 

                (let [next-min-reward (max min-reward (queue-best-reward queue))]
                  (queues/pq-replace! partial-queue best (make-queue-priority best-reward))
                  (let [{:keys [result-pairs max-reward]} (expand-fn best next-min-reward)]
                    (queues/pq-replace! partial-queue best (make-queue-priority max-reward))
                    (doseq [[ni nr] result-pairs] 
 ;                    (println "NEW" max-reward (class ni) nr (:name ni))
                      (assert (not (= :re-added (queues/pq-add! new-queue ni (make-queue-priority nr))))))

  (hierarchical-search henv (if-cycle-fn :transparent :recursive-exhaustive) 
    (comp make-exhaustive-search make-incremental-dijkstra-sa-search)))


(defn sahucs-flat [henv]
  (hierarchical-search henv (constantly :transparent)
    make-incremental-dijkstra-sa-search))
