# HG changeset patch # User Robert McIntyre # Date 1395818337 14400 # Node ID 432f2c4646cbe980c9e6d6d6babc961454f11b43 # Parent 09b7c8dd436562d5a817fec546b44e861353c3fe sleepig. diff -r 09b7c8dd4365 -r 432f2c4646cb thesis/Makefile --- a/thesis/Makefile Wed Mar 26 02:42:01 2014 -0400 +++ b/thesis/Makefile Wed Mar 26 03:18:57 2014 -0400 @@ -1,6 +1,7 @@ #INVOKE_LATEX = pdflatex -shell-escape thesis.tex; THESIS_NAME = rlm-cortex-meng INVOKE_LATEX = texi2dvi --shell-escape --pdf -V --batch $(THESIS_NAME).tex; +#INVOKE_LATEX = texi2dvi --shell-escape --pdf -V $(THESIS_NAME).tex; all: ./weave-thesis.sh cortex diff -r 09b7c8dd4365 -r 432f2c4646cb thesis/cortex.org --- a/thesis/cortex.org Wed Mar 26 02:42:01 2014 -0400 +++ b/thesis/cortex.org Wed Mar 26 03:18:57 2014 -0400 @@ -663,8 +663,41 @@ ** Empathy is the process of tracing though \Phi-space + Here is the core of a basic empathy algorithm, starting with an + experience vector: First, group the experiences into tiered + proprioceptive bins. I use powers of 10 and 3 bins, and the + smallest bin has and approximate size of 0.001 radians in all + proprioceptive dimensions. + + Then, given a sequence of proprioceptive input, generate a set of + matching experience records for each input. + Finally, to infer sensory data, select the longest consective chain + of experiences as determined by the indexes into the experience + vector. + This algorithm has three advantages: + + 1. It's simple + + 3. It's very fast -- both tracing through possibilites and + retrieving possible interpretations take essentially constant + time. + + 2. It protects from wrong interpretations of transient ambiguous + proprioceptive data : for example, if the worm is flat for just + an instant, this flattness will not be interpreted as implying + that the worm has its muscles relaxed, since the flattness is + part of a longer chain which includes a distinct pattern of + muscle activation. A memoryless statistical model such as a + markov model that operates on individual frames may very well + make this mistake. + + #+caption: Program to convert an experience vector into a + #+caption: proprioceptively binned lookup function. + #+name: bin + #+begin_listing clojure + #+begin_src clojure (defn bin [digits] (fn [angles] (->> angles @@ -674,11 +707,10 @@ (mapv #(Math/round (* % (Math/pow 10 (dec digits)))))))) (defn gen-phi-scan -"Nearest-neighbors with spatial binning. Only returns a result if - the propriceptive data is within 10% of a previously recorded - result in all dimensions." - -[phi-space] + "Nearest-neighbors with binning. Only returns a result if + the propriceptive data is within 10% of a previously recorded + result in all dimensions." + [phi-space] (let [bin-keys (map bin [3 2 1]) bin-maps (map (fn [bin-key] @@ -686,12 +718,20 @@ (comp bin-key :proprioception phi-space) (range (count phi-space)))) bin-keys) lookups (map (fn [bin-key bin-map] - (fn [proprio] (bin-map (bin-key proprio)))) - bin-keys bin-maps)] + (fn [proprio] (bin-map (bin-key proprio)))) + bin-keys bin-maps)] (fn lookup [proprio-data] (set (some #(% proprio-data) lookups))))) + #+end_src + #+end_listing + #+caption: Program to calculate empathy by tracing though \Phi-space + #+caption: and finding the longest (ie. most coherent) interpretation + #+caption: of the data. + #+name: longest-thread + #+begin_listing clojure + #+begin_src clojure (defn longest-thread "Find the longest thread from phi-index-sets. The index sets should be ordered from most recent to least recent." @@ -718,6 +758,9 @@ threads)] (recur (concat longest-thread result) (drop (count longest-thread) phi-index-sets)))))) + #+end_src + #+end_listing + There is one final piece, which is to replace missing sensory data with a best-guess estimate. While I could fill in missing data by @@ -747,12 +790,14 @@ #+end_src #+end_listing - - - ** Efficient action recognition with =EMPATH= + In my exploration with the worm, I can generally infer actions from + proprioceptive data exactly as well as when I have the complete + sensory data. To reach this level, I have to train the worm with + verious exercices for about 1 minute. + ** Digression: bootstrapping touch using free exploration * Contributions