# HG changeset patch # User Robert McIntyre # Date 1396572489 14400 # Node ID 90b236381642d04eb38c8065f00a4106c687551a # Parent 1e51263afdc089070c251c2e4b48e34fb3b4c4f0 s. diff -r 1e51263afdc0 -r 90b236381642 thesis/dylan-cortex-diff.diff --- a/thesis/dylan-cortex-diff.diff Mon Mar 31 09:21:28 2014 -0400 +++ b/thesis/dylan-cortex-diff.diff Thu Apr 03 20:48:09 2014 -0400 @@ -285,12 +285,3 @@ The most important archetictural decision of all is the choice to use a computer-simulated environemnt in the first place! The world is a vast and rich place, and for now simulations are a very poor -@@ -436,7 +554,7 @@ - doing everything in software is far cheaper than building custom - real-time hardware. All you need is a laptop and some patience. - --** Because of Time, simulation is perferable to reality -+** Simulated time enables rapid prototyping and complex scenes - - I envision =CORTEX= being used to support rapid prototyping and - iteration of ideas. Even if I could put together a well constructed diff -r 1e51263afdc0 -r 90b236381642 thesis/garbage_cortex.org --- a/thesis/garbage_cortex.org Mon Mar 31 09:21:28 2014 -0400 +++ b/thesis/garbage_cortex.org Thu Apr 03 20:48:09 2014 -0400 @@ -97,4 +97,46 @@ \cite{Tappert77} lol -\cite{Tappert77} \ No newline at end of file +\cite{Tappert77} + + + + + #+caption: This sensory predicate detects when the worm is resting on the + #+caption: ground using the worm's sense of touch. + #+name: resting-intro + #+begin_listing clojure + #+begin_src clojure +(defn resting? + "Is the worm resting on the ground?" + [experiences] + (every? + (fn [touch-data] + (< 0.9 (contact worm-segment-bottom touch-data))) + (:touch (peek experiences)))) + #+end_src + #+end_listing + + #+caption: Even complicated actions such as ``wiggling'' are fairly simple + #+caption: to describe with a rich enough language. + #+name: wiggling-intro + #+begin_listing clojure + #+begin_src clojure +(defn wiggling? + "Is the worm wiggling?" + [experiences] + (let [analysis-interval 0x40] + (when (> (count experiences) analysis-interval) + (let [a-flex 3 + a-ex 2 + muscle-activity + (map :muscle (vector:last-n experiences analysis-interval)) + base-activity + (map #(- (% a-flex) (% a-ex)) muscle-activity)] + (= 2 + (first + (max-indexed + (map #(Math/abs %) + (take 20 (fft base-activity)))))))))) + #+end_src + #+end_listing