     plans-by-output-set))
 
 (defn split-osp
-  "Return new-child-osps.  Currently splits children < min-reward when parent >= min-reward."
+  "Return new-child-osps.  Currently splits children >= min-reward when parent < min-reward."
   [osp min-reward excluded-child-set]
-  (when (> (max-reward (osp-plan-summary osp)) min-reward)
-    (filter #(<= (max-reward (full-osp-summary %)))
-            (remove excluded-child-set
-                    (osn-child-pointers @(:node-atom osp))))))
+  (when (< (max-reward (max-summary (osp-plan-summary osp) (osp-ancestor-summary osp))) min-reward)
+    (filter #(>= (max-reward (full-osp-summary %)) min-reward)
+            (remove excluded-child-set (osn-child-pointers @(:node-atom osp))))))
+
+(defn can-split-osp? [osp excluded-child-set]
+  (> (apply max is/neg-inf (map (comp max-reward #(osp-descendent-summary % #{}))
+                                (remove excluded-child-set (osn-child-pointers @(:node-atom osp)))))
+     (max-reward (max-summary (osp-plan-summary osp) (osp-ancestor-summary osp)))))
+
 
 
 

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Plans ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;


(defrecord PlanNode [sub-output-set-pointer excluded-child-set output-constraint
                     summary-bound output-set output-summary])

(defn make-blocked-summary [max-reward] (SimpleSummary. max-reward :blocked nil))
(defn make-solved-summary [max-reward opt-sol] (SimpleSummary. max-reward :solved opt-sol))

(defn blocked? [summary]
  (and (not (live? summary))
       (not (optimal-solution summary))))


;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Common Ops ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

