    "##^##^#"
    "####^##"])
 
+(def expensive-cave2
+  ["##############################"
+   "#^^^^^^^^^^^^^^^^^^#^^^^^^^^^#"
+   "##############################"])
+
 #_
 (let [cave expensive-cave]
-  (doseq [x (annotate-path cave (find-path cave [0 0] [4 4]))]
+  (doseq [x (annotate-path cave (find-path cave [0 15] [2 15]))]
     (println x)))
 
 #_

      (fn [{:keys [goal score] :as m} neighbor]
        (let [new-score (+ (score node) (cost (get-in cave node)))]
          (cond-> m
            (< new-score (or (score neighbor) infinity))
            (-> (update :open assoc neighbor (+ new-score (manhattan neighbor goal)))
                (update :paths assoc neighbor node)
                (update :score assoc neighbor new-score)))))
      (-> state (update :open dissoc node) (update :closed conj node))
      (filter (comp not closed) (neighbors node)))))

(defn find-path [cave start goal]
  (letfn [(path [node paths] (take-while identity (iterate paths node)))]
    (->> {:cave cave
          :goal goal
          :open (priority-map start (manhattan start goal))

         (drop-while (comp seq :open))
         first
         :paths
         (path goal))))

(defn annotate-path [cave path]
  (let [dot \u00b7]
