Mercurial > cortex
diff thesis/cortex.org @ 508:c11d3fc3e6f0
inspecting cortex section.
author | Robert McIntyre <rlm@mit.edu> |
---|---|
date | Sun, 30 Mar 2014 01:07:19 -0400 |
parents | f2f029e1a6a9 |
children | 81c845a91378 |
line wrap: on
line diff
1.1 --- a/thesis/cortex.org Sun Mar 30 00:53:14 2014 -0400 1.2 +++ b/thesis/cortex.org Sun Mar 30 01:07:19 2014 -0400 1.3 @@ -641,11 +641,11 @@ 1.4 #+ATTR_LaTeX: :width 10cm 1.5 [[./images/empty-sense-nodes.png]] 1.6 1.7 -** COMMENT Bodies are composed of segments connected by joints 1.8 +** Bodies are composed of segments connected by joints 1.9 1.10 Blender is a general purpose animation tool, which has been used in 1.11 the past to create high quality movies such as Sintel 1.12 - \cite{sintel}. Though Blender can model and render even complicated 1.13 + \cite{blender}. Though Blender can model and render even complicated 1.14 things like water, it is crucual to keep models that are meant to 1.15 be simulated as creatures simple. =Bullet=, which =CORTEX= uses 1.16 though jMonkeyEngine3, is a rigid-body physics system. This offers 1.17 @@ -957,7 +957,7 @@ 1.18 #+ATTR_LaTeX: :width 15cm 1.19 [[./images/physical-hand.png]] 1.20 1.21 -** COMMENT Eyes reuse standard video game components 1.22 +** Eyes reuse standard video game components 1.23 1.24 Vision is one of the most important senses for humans, so I need to 1.25 build a simulated sense of vision for my AI. I will do this with 1.26 @@ -991,9 +991,9 @@ 1.27 #+caption: =ViewPorts= are cameras in the world. During each frame, 1.28 #+caption: the =RenderManager= records a snapshot of what each view 1.29 #+caption: is currently seeing; these snapshots are =FrameBuffer= objects. 1.30 - #+name: name 1.31 + #+name: rendermanagers 1.32 #+ATTR_LaTeX: :width 10cm 1.33 - [[../images/diagram_rendermanager2.png]] 1.34 + [[./images/diagram_rendermanager2.png]] 1.35 1.36 Each =ViewPort= can have any number of attached =SceneProcessor= 1.37 objects, which are called every time a new frame is rendered. A 1.38 @@ -1165,6 +1165,7 @@ 1.39 #+caption: information from the simulation. 1.40 #+name: vision-kernel 1.41 #+begin_listing clojure 1.42 + #+BEGIN_SRC clojure 1.43 (defn vision-kernel 1.44 "Returns a list of functions, each of which will return a color 1.45 channel's worth of visual information when called inside a running 1.46 @@ -1205,6 +1206,7 @@ 1.47 (.getRGB @vision-image x y)))))) 1.48 register-eye!))) 1.49 retinal-map)))) 1.50 + #+END_SRC 1.51 #+end_listing 1.52 1.53 Note that since each of the functions generated by =vision-kernel= 1.54 @@ -1224,6 +1226,7 @@ 1.55 #+caption: eyes. 1.56 #+name: vision! 1.57 #+begin_listing clojure 1.58 + #+BEGIN_SRC clojure 1.59 (defn vision! 1.60 "Returns a list of functions, each of which returns visual sensory 1.61 data when called inside a running simulation." 1.62 @@ -1232,6 +1235,7 @@ 1.63 concat 1.64 (for [eye (eyes creature)] 1.65 (vision-kernel creature eye)))) 1.66 + #+END_SRC 1.67 #+end_listing 1.68 1.69 #+caption: Simulated vision with a test creature and the 1.70 @@ -1254,7 +1258,7 @@ 1.71 community and is now (in modified form) part of a system for 1.72 capturing in-game video to a file. 1.73 1.74 -** COMMENT Hearing is hard; =CORTEX= does it right 1.75 +** Hearing is hard; =CORTEX= does it right 1.76 1.77 At the end of this section I will have simulated ears that work the 1.78 same way as the simulated eyes in the last section. I will be able to 1.79 @@ -1375,6 +1379,7 @@ 1.80 #+caption: listeners via context copying/switching. 1.81 #+name: sync-openal-sources 1.82 #+begin_listing C 1.83 + #+BEGIN_SRC C 1.84 void syncSources(ALsource *masterSource, ALsource *slaveSource, 1.85 ALCcontext *masterCtx, ALCcontext *slaveCtx){ 1.86 ALuint master = masterSource->source; 1.87 @@ -1438,6 +1443,7 @@ 1.88 // Restore whatever context was previously active. 1.89 alcMakeContextCurrent(current); 1.90 } 1.91 + #+END_SRC 1.92 #+end_listing 1.93 1.94 With this special context-switching device, and some ugly JNI 1.95 @@ -1449,6 +1455,7 @@ 1.96 #+caption: all sensory data to a continuation function. 1.97 #+name: add-ear 1.98 #+begin_listing clojure 1.99 + #+BEGIN_SRC clojure 1.100 (defn add-ear! 1.101 "Create a Listener centered on the current position of 'ear 1.102 which follows the closest physical node in 'creature and 1.103 @@ -1464,8 +1471,8 @@ 1.104 (update-listener-velocity! target lis) 1.105 (.addListener audio-renderer lis) 1.106 (.registerSoundProcessor audio-renderer lis sp))) 1.107 + #+END_SRC 1.108 #+end_listing 1.109 - 1.110 1.111 The =Send= device, unlike most of the other devices in =OpenAL=, 1.112 does not render sound unless asked. This enables the system to 1.113 @@ -1478,6 +1485,7 @@ 1.114 #+caption: Program to enable arbitrary hearing in =CORTEX= 1.115 #+name: hearing 1.116 #+begin_listing clojure 1.117 +#+BEGIN_SRC clojure 1.118 (defn hearing-kernel 1.119 "Returns a function which returns auditory sensory data when called 1.120 inside a running simulation." 1.121 @@ -1504,6 +1512,7 @@ 1.122 [#^Node creature] 1.123 (for [ear (ears creature)] 1.124 (hearing-kernel creature ear))) 1.125 + #+END_SRC 1.126 #+end_listing 1.127 1.128 Armed with these functions, =CORTEX= is able to test possibly the 1.129 @@ -1515,6 +1524,7 @@ 1.130 #+caption: goes over a threshold. 1.131 #+name: sound-test 1.132 #+begin_listing java 1.133 + #+BEGIN_SRC java 1.134 /** 1.135 * Respond to sound! This is the brain of an AI entity that 1.136 * hears its surroundings and reacts to them. 1.137 @@ -1539,6 +1549,7 @@ 1.138 else { 1.139 entity.getMaterial().setColor("Color", ColorRGBA.Gray); 1.140 } 1.141 + #+END_SRC 1.142 #+end_listing 1.143 1.144 #+caption: First ever simulation of multiple listerners in =CORTEX=. 1.145 @@ -2358,7 +2369,7 @@ 1.146 #+ATTR_LaTeX: :width 16cm 1.147 [[./images/integration.png]] 1.148 1.149 -** COMMENT =CORTEX= enables many possiblities for further research 1.150 +** =CORTEX= enables many possiblities for further research 1.151 1.152 Often times, the hardest part of building a system involving 1.153 creatures is dealing with physics and graphics. =CORTEX= removes