diff thesis/rlm-cortex-meng.tex @ 427:c670d23003de

rename.
author Robert McIntyre <rlm@mit.edu>
date Fri, 21 Mar 2014 15:36:37 -0400
parents
children d53a31969a51
line wrap: on
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/thesis/rlm-cortex-meng.tex	Fri Mar 21 15:36:37 2014 -0400
     1.3 @@ -0,0 +1,102 @@
     1.4 +
     1.5 +\section{Artificial Imagination}
     1.6 +\label{sec-1}
     1.7 +
     1.8 +Imagine watching a video of someone skateboarding. When you watch
     1.9 +the video, you can imagine yourself skateboarding, and your
    1.10 +knowledge of the human body and its dynamics guides your
    1.11 +interpretation of the scene. For example, even if the skateboarder
    1.12 +is partially occluded, you can infer the positions of his arms and
    1.13 +body from your own knowledge of how your body would be positioned if
    1.14 +you were skateboarding. If the skateboarder suffers an accident, you
    1.15 +wince in sympathy, imagining the pain your own body would experience
    1.16 +if it were in the same situation. This empathy with other people
    1.17 +guides our understanding of whatever they are doing because it is a
    1.18 +powerful constraint on what is probable and possible. In order to
    1.19 +make use of this powerful empathy constraint, I need a system that
    1.20 +can generate and make sense of sensory data from the many different
    1.21 +senses that humans possess. The two key proprieties of such a system
    1.22 +are \emph{embodiment} and \emph{imagination}.
    1.23 +
    1.24 +\subsection{What is imagination?}
    1.25 +\label{sec-1-1}
    1.26 +
    1.27 +One kind of imagination is \emph{sympathetic} imagination: you imagine
    1.28 +yourself in the position of something/someone you are
    1.29 +observing. This type of imagination comes into play when you follow
    1.30 +along visually when watching someone perform actions, or when you
    1.31 +sympathetically grimace when someone hurts themselves. This type of
    1.32 +imagination uses the constraints you have learned about your own
    1.33 +body to highly constrain the possibilities in whatever you are
    1.34 +seeing. It uses all your senses to including your senses of touch,
    1.35 +proprioception, etc. Humans are flexible when it comes to "putting
    1.36 +themselves in another's shoes," and can sympathetically understand
    1.37 +not only other humans, but entities ranging from animals to cartoon
    1.38 +characters to \href{http://www.youtube.com/watch?v=0jz4HcwTQmU}{single dots} on a screen!
    1.39 +
    1.40 +
    1.41 +\begin{figure}[htb]
    1.42 +\centering
    1.43 +\includegraphics[width=5cm]{./images/cat-drinking.jpg}
    1.44 +\caption{A cat drinking some water. Identifying this action is beyond the state of the art for computers.}
    1.45 +\end{figure}
    1.46 +
    1.47 +
    1.48 +This is a basic test for the vision system.  It only tests the
    1.49 +vision-pipeline and does not deal with loading eyes from a blender
    1.50 +file. The code creates two videos of the same rotating cube from
    1.51 +different angles. 
    1.52 +
    1.53 +
    1.54 +\begin{clojurecode}
    1.55 +(in-ns 'cortex.test.vision)
    1.56 +
    1.57 +(defn test-pipeline
    1.58 +  "Testing vision:
    1.59 +   Tests the vision system by creating two views of the same rotating
    1.60 +   object from different angles and displaying both of those views in
    1.61 +   JFrames.
    1.62 +
    1.63 +   You should see a rotating cube, and two windows,
    1.64 +   each displaying a different view of the cube."
    1.65 +  ([] (test-pipeline false))
    1.66 +  ([record?]
    1.67 +     (let [candy
    1.68 +           (box 1 1 1 :physical? false :color ColorRGBA/Blue)]
    1.69 +       (world
    1.70 +        (doto (Node.)
    1.71 +          (.attachChild candy))
    1.72 +        {}
    1.73 +        (fn [world]
    1.74 +          (let [cam (.clone (.getCamera world))
    1.75 +                width (.getWidth cam)
    1.76 +                height (.getHeight cam)]
    1.77 +            (add-camera! world cam 
    1.78 +                         (comp
    1.79 +                          (view-image
    1.80 +                           (if record?
    1.81 +                             (File. "/home/r/proj/cortex/render/vision/1")))
    1.82 +                          BufferedImage!))
    1.83 +            (add-camera! world
    1.84 +                         (doto (.clone cam)
    1.85 +                           (.setLocation (Vector3f. -10 0 0))
    1.86 +                           (.lookAt Vector3f/ZERO Vector3f/UNIT_Y))
    1.87 +                         (comp
    1.88 +                          (view-image
    1.89 +                           (if record?
    1.90 +                             (File. "/home/r/proj/cortex/render/vision/2")))
    1.91 +                          BufferedImage!))
    1.92 +            (let [timer (IsoTimer. 60)]
    1.93 +              (.setTimer world timer)
    1.94 +              (display-dilated-time world timer))
    1.95 +            ;; This is here to restore the main view
    1.96 +            ;; after the other views have completed processing
    1.97 +            (add-camera! world (.getCamera world) no-op)))
    1.98 +        (fn [world tpf]
    1.99 +          (.rotate candy (* tpf 0.2) 0 0))))))
   1.100 +\end{clojurecode}
   1.101 +
   1.102 +
   1.103 +\begin{itemize}
   1.104 +\item This is test1 \cite{Tappert77}.
   1.105 +\end{itemize}