       (reduce
         (fn [col item]
           (assoc col item (item :heuristic-result)))
-        (clojure.data.priority-map/priority-map)
+        (clojure.data.priority-map/priority-map-by >)
         possible-states)))
 
 

                                            (dec max-depth)
                                            grid-width
                                            grid-height)
                  v (- v-temp)]
              (if (> v best)
                (let [new-best v
                      new-best-move (successor-state :last-move)]

(defn gen-heuristic-dictionary
  "Generate the dictionnary of heuristics values"
  [depth]
  (apply merge (for [x '(:min :max :wall :empty)];
                 (if (= depth 0)
                   {x 0}
                   {x (gen-heuristic-dictionary (dec depth))}))))
