# HG changeset patch # User Robert McIntyre # Date 1395384503 14400 # Node ID efba8526a6629c31131de93c3df461cb9f7b02a1 # Parent d55197a40b476c636ab93e8cda288322875afb6c happy with code formatting. diff -r d55197a40b47 -r efba8526a662 thesis/Makefile --- a/thesis/Makefile Fri Mar 21 01:52:50 2014 -0400 +++ b/thesis/Makefile Fri Mar 21 02:48:23 2014 -0400 @@ -1,7 +1,9 @@ +INVOKE_LATEX = pdflatex -shell-escape thesis.tex; + all: ./weave-thesis.sh rsync -avz --delete /home/r/proj/cortex/thesis "r@aurellem.org:~" - ssh r@aurellem.org "cd ~/thesis; pdflatex thesis.tex; pdflatex thesis.tex" + ssh r@aurellem.org cd "~/thesis; $(INVOKE_LATEX) $(INVOKE_LATEX)" scp "r@aurellem.org:/home/r/thesis/thesis.pdf" . diff -r d55197a40b47 -r efba8526a662 thesis/aux/images/cat-drinking.jpg Binary file thesis/aux/images/cat-drinking.jpg has changed diff -r d55197a40b47 -r efba8526a662 thesis/aux/images/finger-UV.png Binary file thesis/aux/images/finger-UV.png has changed diff -r d55197a40b47 -r efba8526a662 thesis/cortex.org --- a/thesis/cortex.org Fri Mar 21 01:52:50 2014 -0400 +++ b/thesis/cortex.org Fri Mar 21 02:48:23 2014 -0400 @@ -1,7 +1,99 @@ -d +#+title: =CORTEX= +#+author: Robert McIntyre +#+email: rlm@mit.edu +#+description: Using embodied AI to facilitate Artificial Imagination. +#+keywords: AI, clojure, embodiment +* Artificial Imagination -lol whatevar + Imagine watching a video of someone skateboarding. When you watch + the video, you can imagine yourself skateboarding, and your + knowledge of the human body and its dynamics guides your + interpretation of the scene. For example, even if the skateboarder + is partially occluded, you can infer the positions of his arms and + body from your own knowledge of how your body would be positioned if + you were skateboarding. If the skateboarder suffers an accident, you + wince in sympathy, imagining the pain your own body would experience + if it were in the same situation. This empathy with other people + guides our understanding of whatever they are doing because it is a + powerful constraint on what is probable and possible. In order to + make use of this powerful empathy constraint, I need a system that + can generate and make sense of sensory data from the many different + senses that humans possess. The two key proprieties of such a system + are /embodiment/ and /imagination/. -* lol +** What is imagination? + One kind of imagination is /sympathetic/ imagination: you imagine + yourself in the position of something/someone you are + observing. This type of imagination comes into play when you follow + along visually when watching someone perform actions, or when you + sympathetically grimace when someone hurts themselves. This type of + imagination uses the constraints you have learned about your own + body to highly constrain the possibilities in whatever you are + seeing. It uses all your senses to including your senses of touch, + proprioception, etc. Humans are flexible when it comes to "putting + themselves in another's shoes," and can sympathetically understand + not only other humans, but entities ranging from animals to cartoon + characters to [[http://www.youtube.com/watch?v=0jz4HcwTQmU][single dots]] on a screen! + + + #+caption: A cat drinking some water. Identifying this action is beyond the state of the art for computers. + #+ATTR_LaTeX: :width 5cm + [[./images/cat-drinking.jpg]] + + +This is a basic test for the vision system. It only tests the +vision-pipeline and does not deal with loading eyes from a blender +file. The code creates two videos of the same rotating cube from +different angles. + + +#+name: test-1 +#+begin_src clojure +(in-ns 'cortex.test.vision) + +(defn test-pipeline + "Testing vision: + Tests the vision system by creating two views of the same rotating + object from different angles and displaying both of those views in + JFrames. + + You should see a rotating cube, and two windows, + each displaying a different view of the cube." + ([] (test-pipeline false)) + ([record?] + (let [candy + (box 1 1 1 :physical? false :color ColorRGBA/Blue)] + (world + (doto (Node.) + (.attachChild candy)) + {} + (fn [world] + (let [cam (.clone (.getCamera world)) + width (.getWidth cam) + height (.getHeight cam)] + (add-camera! world cam + (comp + (view-image + (if record? + (File. "/home/r/proj/cortex/render/vision/1"))) + BufferedImage!)) + (add-camera! world + (doto (.clone cam) + (.setLocation (Vector3f. -10 0 0)) + (.lookAt Vector3f/ZERO Vector3f/UNIT_Y)) + (comp + (view-image + (if record? + (File. "/home/r/proj/cortex/render/vision/2"))) + BufferedImage!)) + (let [timer (IsoTimer. 60)] + (.setTimer world timer) + (display-dilated-time world timer)) + ;; This is here to restore the main view + ;; after the other views have completed processing + (add-camera! world (.getCamera world) no-op))) + (fn [world tpf] + (.rotate candy (* tpf 0.2) 0 0)))))) +#+end_src diff -r d55197a40b47 -r efba8526a662 thesis/cortex.tex --- a/thesis/cortex.tex Fri Mar 21 01:52:50 2014 -0400 +++ b/thesis/cortex.tex Fri Mar 21 02:48:23 2014 -0400 @@ -1,7 +1,97 @@ -d +\section{Artificial Imagination} +\label{sec-1} -lol whatevar +Imagine watching a video of someone skateboarding. When you watch +the video, you can imagine yourself skateboarding, and your +knowledge of the human body and its dynamics guides your +interpretation of the scene. For example, even if the skateboarder +is partially occluded, you can infer the positions of his arms and +body from your own knowledge of how your body would be positioned if +you were skateboarding. If the skateboarder suffers an accident, you +wince in sympathy, imagining the pain your own body would experience +if it were in the same situation. This empathy with other people +guides our understanding of whatever they are doing because it is a +powerful constraint on what is probable and possible. In order to +make use of this powerful empathy constraint, I need a system that +can generate and make sense of sensory data from the many different +senses that humans possess. The two key proprieties of such a system +are \emph{embodiment} and \emph{imagination}. -\section{lol} -\label{sec-1} +\subsection{What is imagination?} +\label{sec-1-1} + +One kind of imagination is \emph{sympathetic} imagination: you imagine +yourself in the position of something/someone you are +observing. This type of imagination comes into play when you follow +along visually when watching someone perform actions, or when you +sympathetically grimace when someone hurts themselves. This type of +imagination uses the constraints you have learned about your own +body to highly constrain the possibilities in whatever you are +seeing. It uses all your senses to including your senses of touch, +proprioception, etc. Humans are flexible when it comes to "putting +themselves in another's shoes," and can sympathetically understand +not only other humans, but entities ranging from animals to cartoon +characters to \href{http://www.youtube.com/watch?v=0jz4HcwTQmU}{single dots} on a screen! + + +\begin{figure}[htb] +\centering +\includegraphics[width=5cm]{./images/cat-drinking.jpg} +\caption{A cat drinking some water. Identifying this action is beyond the state of the art for computers.} +\end{figure} + + +This is a basic test for the vision system. It only tests the +vision-pipeline and does not deal with loading eyes from a blender +file. The code creates two videos of the same rotating cube from +different angles. + + +\begin{clojurecode} +(in-ns 'cortex.test.vision) + +(defn test-pipeline + "Testing vision: + Tests the vision system by creating two views of the same rotating + object from different angles and displaying both of those views in + JFrames. + + You should see a rotating cube, and two windows, + each displaying a different view of the cube." + ([] (test-pipeline false)) + ([record?] + (let [candy + (box 1 1 1 :physical? false :color ColorRGBA/Blue)] + (world + (doto (Node.) + (.attachChild candy)) + {} + (fn [world] + (let [cam (.clone (.getCamera world)) + width (.getWidth cam) + height (.getHeight cam)] + (add-camera! world cam + (comp + (view-image + (if record? + (File. "/home/r/proj/cortex/render/vision/1"))) + BufferedImage!)) + (add-camera! world + (doto (.clone cam) + (.setLocation (Vector3f. -10 0 0)) + (.lookAt Vector3f/ZERO Vector3f/UNIT_Y)) + (comp + (view-image + (if record? + (File. "/home/r/proj/cortex/render/vision/2"))) + BufferedImage!)) + (let [timer (IsoTimer. 60)] + (.setTimer world timer) + (display-dilated-time world timer)) + ;; This is here to restore the main view + ;; after the other views have completed processing + (add-camera! world (.getCamera world) no-op))) + (fn [world tpf] + (.rotate candy (* tpf 0.2) 0 0)))))) +\end{clojurecode} diff -r d55197a40b47 -r efba8526a662 thesis/images/cat-drinking.jpg Binary file thesis/images/cat-drinking.jpg has changed diff -r d55197a40b47 -r efba8526a662 thesis/images/finger-UV.png Binary file thesis/images/finger-UV.png has changed diff -r d55197a40b47 -r efba8526a662 thesis/thesis.tex --- a/thesis/thesis.tex Fri Mar 21 01:52:50 2014 -0400 +++ b/thesis/thesis.tex Fri Mar 21 02:48:23 2014 -0400 @@ -41,6 +41,20 @@ \usepackage{wasysym} \usepackage{amssymb} \usepackage{hyperref} + +%%%%% better source code display +\usepackage{minted} + +% \usemintedstyle{friendly} +% \usemintedstyle{perldoc} +%\definecolor{bg}{rgb}{0.95,0.95,0.95} +\definecolor{bg}{rgb}{0.95,0.95,0.95} +\usemintedstyle{default} + + +%\newminted{clojure}{fontsize=\scriptsize,bgcolor=bg} +\newminted{clojure}{fontsize=\scriptsize} + %\usepackage{lgrind} \pagestyle{plain}