     [civs.logic.demographics :refer :all])
   (:import [civs.model.core Population Tribe]))
 
-(def migration-radius 3)
+(defn- migration-radius [group]
+  (cond
+    (nomadic? group) 2
+    (semi-sedentary? group) 2
+    (sedentary? group) 4
+    :default (throw (Exception. "Unexpected"))))
 
 (defn- discovery-population-factor [total-pop required-pop]
   (+ 1.0 (Math/log10 (/ (float total-pop) required-pop))))

      (let [ world (.world game)
             pos (.position tribe)
             sp (split-pop (.population tribe))
             possible-destinations (filter #(pos-free? game %) (land-cells-around world pos migration-radius))
             preferences (map (fn [pos] {
                                          :preference (perturbate-low (prosperity-in-pos game tribe pos))
                                          :pos pos

            pop (-> tribe .population total-persons)
            world (.world game)
            pos (.position tribe)
            possible-destinations (filter #(pos-free? game %) (land-cells-around world pos (migration-radius group)))]
        (if
          (and (> pop 35) (< c 0.9) (not (empty? possible-destinations)))
          (/ (opposite c) 2.7)
