comparison thesis/garbage_cortex.org @ 523:90b236381642

s.
author Robert McIntyre <rlm@mit.edu>
date Thu, 03 Apr 2014 20:48:09 -0400
parents 1e5ea711857d
children
comparison
equal deleted inserted replaced
522:1e51263afdc0 523:90b236381642
96 - This is test1 \cite{Tappert77}. 96 - This is test1 \cite{Tappert77}.
97 97
98 \cite{Tappert77} 98 \cite{Tappert77}
99 lol 99 lol
100 \cite{Tappert77} 100 \cite{Tappert77}
101
102
103
104
105 #+caption: This sensory predicate detects when the worm is resting on the
106 #+caption: ground using the worm's sense of touch.
107 #+name: resting-intro
108 #+begin_listing clojure
109 #+begin_src clojure
110 (defn resting?
111 "Is the worm resting on the ground?"
112 [experiences]
113 (every?
114 (fn [touch-data]
115 (< 0.9 (contact worm-segment-bottom touch-data)))
116 (:touch (peek experiences))))
117 #+end_src
118 #+end_listing
119
120 #+caption: Even complicated actions such as ``wiggling'' are fairly simple
121 #+caption: to describe with a rich enough language.
122 #+name: wiggling-intro
123 #+begin_listing clojure
124 #+begin_src clojure
125 (defn wiggling?
126 "Is the worm wiggling?"
127 [experiences]
128 (let [analysis-interval 0x40]
129 (when (> (count experiences) analysis-interval)
130 (let [a-flex 3
131 a-ex 2
132 muscle-activity
133 (map :muscle (vector:last-n experiences analysis-interval))
134 base-activity
135 (map #(- (% a-flex) (% a-ex)) muscle-activity)]
136 (= 2
137 (first
138 (max-indexed
139 (map #(Math/abs %)
140 (take 20 (fft base-activity))))))))))
141 #+end_src
142 #+end_listing