   [team-data]
   (->> team-data
        (remove (comp nil? :seed))
-       (map #(vector (:name %) (assoc % :weight 1 :avg-pts 0 :future-pts 0)))
+       (map #(vector (:name %) (assoc % :weight 1 :avg-pts 0 :expected-value 0)))
        (into {})))
 
 (defn ->tournament-bracket

    (partial compute-matchup pick-scoring upset-scoring)
    tournament-bracket))

(defn- update-child-future-pts
  "Update the future-pts of each team in the field using parent-team-map.  The future-pts for each team in the
  field is the team's average points plus the future-pts of the team in the parent-team-map."
  [parent-team-map [field children]]
  (vector
    (map
      #(update-in % [:future-pts] +
        (get-in parent-team-map [(:name %) :future-pts] 0)
        (:avg-pts %))
      field)
    children))

(defn- update-future-pts
  "For each child in children, update the future-pts of the teams in that child's field.  The future-pts for each team
  in a field is the team's average points plus the future-pts of the team in the parent field."
  [[field children]]
  (vector
    field

                            (map #((juxt :name identity) %))
                            (into {}))]
      (map
        (partial update-child-expected-value parent-team-map)
        children))))

(defn- compute-expected-value-helper
  "Recursively traverse the zipper, updating each node with the expected value computation."
  [loc]
  (if (zip/end? loc)
    loc
    (recur (zip/next (zip/edit loc update-expected-value)))))

(defn compute-expected-value
  "Compute the expected value for each node in the tournament probabilites tree."
  [tp]
  (->>
    (update-child-expected-value nil tp)
    (zip/zipper
      (fn [[_ cn]]
        (or (vector? cn) (seq? cn)))
