changeset 425:efba8526a662

happy with code formatting.
author Robert McIntyre <rlm@mit.edu>
date Fri, 21 Mar 2014 02:48:23 -0400
parents d55197a40b47
children 435b5e22d72a
files thesis/Makefile thesis/aux/images/cat-drinking.jpg thesis/aux/images/finger-UV.png thesis/cortex.org thesis/cortex.tex thesis/images/cat-drinking.jpg thesis/images/finger-UV.png thesis/thesis.tex
diffstat 8 files changed, 206 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
     1.1 --- a/thesis/Makefile	Fri Mar 21 01:52:50 2014 -0400
     1.2 +++ b/thesis/Makefile	Fri Mar 21 02:48:23 2014 -0400
     1.3 @@ -1,7 +1,9 @@
     1.4 +INVOKE_LATEX = pdflatex -shell-escape thesis.tex;
     1.5 +
     1.6  all:
     1.7  	./weave-thesis.sh
     1.8  	rsync -avz --delete /home/r/proj/cortex/thesis "r@aurellem.org:~"
     1.9 -	ssh r@aurellem.org "cd ~/thesis; pdflatex thesis.tex; pdflatex thesis.tex"
    1.10 +	ssh r@aurellem.org cd "~/thesis; $(INVOKE_LATEX) $(INVOKE_LATEX)"
    1.11  	scp "r@aurellem.org:/home/r/thesis/thesis.pdf" .
    1.12  
    1.13  
     2.1 Binary file thesis/aux/images/cat-drinking.jpg has changed
     3.1 Binary file thesis/aux/images/finger-UV.png has changed
     4.1 --- a/thesis/cortex.org	Fri Mar 21 01:52:50 2014 -0400
     4.2 +++ b/thesis/cortex.org	Fri Mar 21 02:48:23 2014 -0400
     4.3 @@ -1,7 +1,99 @@
     4.4 -d
     4.5 +#+title: =CORTEX=
     4.6 +#+author: Robert McIntyre
     4.7 +#+email: rlm@mit.edu
     4.8 +#+description: Using embodied AI to facilitate Artificial Imagination.
     4.9 +#+keywords: AI, clojure, embodiment
    4.10  
    4.11 +* Artificial Imagination
    4.12  
    4.13 -lol whatevar
    4.14 +  Imagine watching a video of someone skateboarding. When you watch
    4.15 +  the video, you can imagine yourself skateboarding, and your
    4.16 +  knowledge of the human body and its dynamics guides your
    4.17 +  interpretation of the scene. For example, even if the skateboarder
    4.18 +  is partially occluded, you can infer the positions of his arms and
    4.19 +  body from your own knowledge of how your body would be positioned if
    4.20 +  you were skateboarding. If the skateboarder suffers an accident, you
    4.21 +  wince in sympathy, imagining the pain your own body would experience
    4.22 +  if it were in the same situation. This empathy with other people
    4.23 +  guides our understanding of whatever they are doing because it is a
    4.24 +  powerful constraint on what is probable and possible. In order to
    4.25 +  make use of this powerful empathy constraint, I need a system that
    4.26 +  can generate and make sense of sensory data from the many different
    4.27 +  senses that humans possess. The two key proprieties of such a system
    4.28 +  are /embodiment/ and /imagination/.
    4.29  
    4.30 -* lol
    4.31 +** What is imagination?
    4.32  
    4.33 +   One kind of imagination is /sympathetic/ imagination: you imagine
    4.34 +   yourself in the position of something/someone you are
    4.35 +   observing. This type of imagination comes into play when you follow
    4.36 +   along visually when watching someone perform actions, or when you
    4.37 +   sympathetically grimace when someone hurts themselves. This type of
    4.38 +   imagination uses the constraints you have learned about your own
    4.39 +   body to highly constrain the possibilities in whatever you are
    4.40 +   seeing. It uses all your senses to including your senses of touch,
    4.41 +   proprioception, etc. Humans are flexible when it comes to "putting
    4.42 +   themselves in another's shoes," and can sympathetically understand
    4.43 +   not only other humans, but entities ranging from animals to cartoon
    4.44 +   characters to [[http://www.youtube.com/watch?v=0jz4HcwTQmU][single dots]] on a screen!
    4.45 +
    4.46 +
    4.47 +   #+caption: A cat drinking some water. Identifying this action is beyond the state of the art for computers.
    4.48 +   #+ATTR_LaTeX: :width 5cm
    4.49 +   [[./images/cat-drinking.jpg]]
    4.50 +
    4.51 +
    4.52 +This is a basic test for the vision system.  It only tests the
    4.53 +vision-pipeline and does not deal with loading eyes from a blender
    4.54 +file. The code creates two videos of the same rotating cube from
    4.55 +different angles. 
    4.56 +
    4.57 +
    4.58 +#+name: test-1
    4.59 +#+begin_src clojure
    4.60 +(in-ns 'cortex.test.vision)
    4.61 +
    4.62 +(defn test-pipeline
    4.63 +  "Testing vision:
    4.64 +   Tests the vision system by creating two views of the same rotating
    4.65 +   object from different angles and displaying both of those views in
    4.66 +   JFrames.
    4.67 +
    4.68 +   You should see a rotating cube, and two windows,
    4.69 +   each displaying a different view of the cube."
    4.70 +  ([] (test-pipeline false))
    4.71 +  ([record?]
    4.72 +     (let [candy
    4.73 +           (box 1 1 1 :physical? false :color ColorRGBA/Blue)]
    4.74 +       (world
    4.75 +        (doto (Node.)
    4.76 +          (.attachChild candy))
    4.77 +        {}
    4.78 +        (fn [world]
    4.79 +          (let [cam (.clone (.getCamera world))
    4.80 +                width (.getWidth cam)
    4.81 +                height (.getHeight cam)]
    4.82 +            (add-camera! world cam 
    4.83 +                         (comp
    4.84 +                          (view-image
    4.85 +                           (if record?
    4.86 +                             (File. "/home/r/proj/cortex/render/vision/1")))
    4.87 +                          BufferedImage!))
    4.88 +            (add-camera! world
    4.89 +                         (doto (.clone cam)
    4.90 +                           (.setLocation (Vector3f. -10 0 0))
    4.91 +                           (.lookAt Vector3f/ZERO Vector3f/UNIT_Y))
    4.92 +                         (comp
    4.93 +                          (view-image
    4.94 +                           (if record?
    4.95 +                             (File. "/home/r/proj/cortex/render/vision/2")))
    4.96 +                          BufferedImage!))
    4.97 +            (let [timer (IsoTimer. 60)]
    4.98 +              (.setTimer world timer)
    4.99 +              (display-dilated-time world timer))
   4.100 +            ;; This is here to restore the main view
   4.101 +            ;; after the other views have completed processing
   4.102 +            (add-camera! world (.getCamera world) no-op)))
   4.103 +        (fn [world tpf]
   4.104 +          (.rotate candy (* tpf 0.2) 0 0))))))
   4.105 +#+end_src
     5.1 --- a/thesis/cortex.tex	Fri Mar 21 01:52:50 2014 -0400
     5.2 +++ b/thesis/cortex.tex	Fri Mar 21 02:48:23 2014 -0400
     5.3 @@ -1,7 +1,97 @@
     5.4 -d
     5.5  
     5.6 +\section{Artificial Imagination}
     5.7 +\label{sec-1}
     5.8  
     5.9 -lol whatevar
    5.10 +Imagine watching a video of someone skateboarding. When you watch
    5.11 +the video, you can imagine yourself skateboarding, and your
    5.12 +knowledge of the human body and its dynamics guides your
    5.13 +interpretation of the scene. For example, even if the skateboarder
    5.14 +is partially occluded, you can infer the positions of his arms and
    5.15 +body from your own knowledge of how your body would be positioned if
    5.16 +you were skateboarding. If the skateboarder suffers an accident, you
    5.17 +wince in sympathy, imagining the pain your own body would experience
    5.18 +if it were in the same situation. This empathy with other people
    5.19 +guides our understanding of whatever they are doing because it is a
    5.20 +powerful constraint on what is probable and possible. In order to
    5.21 +make use of this powerful empathy constraint, I need a system that
    5.22 +can generate and make sense of sensory data from the many different
    5.23 +senses that humans possess. The two key proprieties of such a system
    5.24 +are \emph{embodiment} and \emph{imagination}.
    5.25  
    5.26 -\section{lol}
    5.27 -\label{sec-1}
    5.28 +\subsection{What is imagination?}
    5.29 +\label{sec-1-1}
    5.30 +
    5.31 +One kind of imagination is \emph{sympathetic} imagination: you imagine
    5.32 +yourself in the position of something/someone you are
    5.33 +observing. This type of imagination comes into play when you follow
    5.34 +along visually when watching someone perform actions, or when you
    5.35 +sympathetically grimace when someone hurts themselves. This type of
    5.36 +imagination uses the constraints you have learned about your own
    5.37 +body to highly constrain the possibilities in whatever you are
    5.38 +seeing. It uses all your senses to including your senses of touch,
    5.39 +proprioception, etc. Humans are flexible when it comes to "putting
    5.40 +themselves in another's shoes," and can sympathetically understand
    5.41 +not only other humans, but entities ranging from animals to cartoon
    5.42 +characters to \href{http://www.youtube.com/watch?v=0jz4HcwTQmU}{single dots} on a screen!
    5.43 +
    5.44 +
    5.45 +\begin{figure}[htb]
    5.46 +\centering
    5.47 +\includegraphics[width=5cm]{./images/cat-drinking.jpg}
    5.48 +\caption{A cat drinking some water. Identifying this action is beyond the state of the art for computers.}
    5.49 +\end{figure}
    5.50 +
    5.51 +
    5.52 +This is a basic test for the vision system.  It only tests the
    5.53 +vision-pipeline and does not deal with loading eyes from a blender
    5.54 +file. The code creates two videos of the same rotating cube from
    5.55 +different angles. 
    5.56 +
    5.57 +
    5.58 +\begin{clojurecode}
    5.59 +(in-ns 'cortex.test.vision)
    5.60 +
    5.61 +(defn test-pipeline
    5.62 +  "Testing vision:
    5.63 +   Tests the vision system by creating two views of the same rotating
    5.64 +   object from different angles and displaying both of those views in
    5.65 +   JFrames.
    5.66 +
    5.67 +   You should see a rotating cube, and two windows,
    5.68 +   each displaying a different view of the cube."
    5.69 +  ([] (test-pipeline false))
    5.70 +  ([record?]
    5.71 +     (let [candy
    5.72 +           (box 1 1 1 :physical? false :color ColorRGBA/Blue)]
    5.73 +       (world
    5.74 +        (doto (Node.)
    5.75 +          (.attachChild candy))
    5.76 +        {}
    5.77 +        (fn [world]
    5.78 +          (let [cam (.clone (.getCamera world))
    5.79 +                width (.getWidth cam)
    5.80 +                height (.getHeight cam)]
    5.81 +            (add-camera! world cam 
    5.82 +                         (comp
    5.83 +                          (view-image
    5.84 +                           (if record?
    5.85 +                             (File. "/home/r/proj/cortex/render/vision/1")))
    5.86 +                          BufferedImage!))
    5.87 +            (add-camera! world
    5.88 +                         (doto (.clone cam)
    5.89 +                           (.setLocation (Vector3f. -10 0 0))
    5.90 +                           (.lookAt Vector3f/ZERO Vector3f/UNIT_Y))
    5.91 +                         (comp
    5.92 +                          (view-image
    5.93 +                           (if record?
    5.94 +                             (File. "/home/r/proj/cortex/render/vision/2")))
    5.95 +                          BufferedImage!))
    5.96 +            (let [timer (IsoTimer. 60)]
    5.97 +              (.setTimer world timer)
    5.98 +              (display-dilated-time world timer))
    5.99 +            ;; This is here to restore the main view
   5.100 +            ;; after the other views have completed processing
   5.101 +            (add-camera! world (.getCamera world) no-op)))
   5.102 +        (fn [world tpf]
   5.103 +          (.rotate candy (* tpf 0.2) 0 0))))))
   5.104 +\end{clojurecode}
     6.1 Binary file thesis/images/cat-drinking.jpg has changed
     7.1 Binary file thesis/images/finger-UV.png has changed
     8.1 --- a/thesis/thesis.tex	Fri Mar 21 01:52:50 2014 -0400
     8.2 +++ b/thesis/thesis.tex	Fri Mar 21 02:48:23 2014 -0400
     8.3 @@ -41,6 +41,20 @@
     8.4  \usepackage{wasysym}
     8.5  \usepackage{amssymb}
     8.6  \usepackage{hyperref}
     8.7 +
     8.8 +%%%%% better source code display
     8.9 +\usepackage{minted}
    8.10 +
    8.11 +% \usemintedstyle{friendly}
    8.12 +% \usemintedstyle{perldoc}
    8.13 +%\definecolor{bg}{rgb}{0.95,0.95,0.95}
    8.14 +\definecolor{bg}{rgb}{0.95,0.95,0.95}
    8.15 +\usemintedstyle{default}
    8.16 +
    8.17 +
    8.18 +%\newminted{clojure}{fontsize=\scriptsize,bgcolor=bg}
    8.19 +\newminted{clojure}{fontsize=\scriptsize}
    8.20 +
    8.21  %\usepackage{lgrind}
    8.22  \pagestyle{plain}
    8.23