Mercurial > cortex
diff org/worm_learn.clj @ 516:ced955c3c84f
resurrect old cortex to fix flow issues.
author | Robert McIntyre <rlm@mit.edu> |
---|---|
date | Sun, 30 Mar 2014 22:48:19 -0400 |
parents | 0a4362d1f138 |
children | 01934317b25b |
line wrap: on
line diff
1.1 --- a/org/worm_learn.clj Sun Mar 30 10:53:13 2014 -0400 1.2 +++ b/org/worm_learn.clj Sun Mar 30 22:48:19 2014 -0400 1.3 @@ -448,24 +448,6 @@ 1.4 (def phi-scan (gen-phi-scan phi-space)) 1.5 ) 1.6 1.7 -;; (defn infer-nils-dyl [s] 1.8 -;; (loop [closed () 1.9 -;; open s 1.10 -;; anchor 0] 1.11 -;; (if-not (empty? open) 1.12 -;; (recur (conj closed 1.13 -;; (or (peek open) 1.14 -;; anchor)) 1.15 -;; (pop open) 1.16 -;; (or (peek open) anchor)) 1.17 -;; closed))) 1.18 - 1.19 -;; (defn infer-nils [s] 1.20 -;; (for [i (range (count s))] 1.21 -;; (or (get s i) 1.22 -;; (some (comp not nil?) (vector:last-n (- (count s) i))) 1.23 -;; 0))) 1.24 - 1.25 1.26 (defn infer-nils 1.27 "Replace nils with the next available non-nil element in the 1.28 @@ -557,6 +539,13 @@ 1.29 1.30 1.31 1.32 +(defn dylan-collect-bolts [longest-threads index-sets] 1.33 + (fn 1.34 + [experiences text] 1.35 + (let [phi-indices (phi-scan (:proprioception (peek experiences))) 1.36 + long-thread (longest-thread (vector:last-n @index-sets 300))] 1.37 + (swap! index-sets #(conj % phi-indices)) 1.38 + (swap! longest-threads #(conj % long-thread))))) 1.39 1.40 1.41