diff thesis/cortex.org @ 425:efba8526a662

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