
Behav Res (2013) 45:1293–1312 DOI 10.3758/s13428-013-0322-5 PandaEPL: A library for programming spatial navigation experiments Alec Solway & Jonathan F. Miller & Michael J. Kahana Published online: 3 April 2013 # Psychonomic Society, Inc. 2013 Abstract Recent advances in neuroimaging and neural record- have engaged in a large and sustained effort to understand ing techniques have enabled researchers to make significant the neural mechanisms underlying spatial navigation. The progress in understanding the neural mechanisms underlying widespread availability of noninvasive recording techniques human spatial navigation. Because these techniques generally such as scalp electroencephalography (EEG) and functional require participants to remain stationary, computer-generated magnetic resonance imaging, combined with the rise in virtual environments are used. We introduce PandaEPL, a cognitive research involving neurosurgical patients with programming library for the Python language designed to sim- implanted electrodes, have made it possible to study these plify the creation of computer-controlled spatial-navigation mechanisms in humans (e.g., Alvarez, Biggs, Chen, Pine, & experiments. PandaEPL is built on top of Panda3D, a modern Grillon, 2008; Astur, Taylor, Mamelak, Philpott, & Sutherland, open-source game engine. It allows users to construct three- 2002; Cornwell, Johnson, Holroyd, Carver, & Grillon, 2008; dimensional environments that participants can navigate from a Doeller, Barry, & Burgess, 2010; Doeller, King, & Burgess, first-person perspective. Sound playback and recording and 2008; Ekstrom, Copara, Isham, Wang, & Yonelinas, 2011; also joystick support are provided through the use of additional Ekstrom et al., 2003; Gron, Wunderlich, Spitzer, Tomczak, & optional libraries. PandaEPL also handles many tasks common Riepe, 2000;Hassabisetal.,2009; Iaria, Chen, Guariglia, to all cognitive experiments, including managing configuration Ptito, & Petrides, 2007; Jacobs, Kahana, Ekstrom, Mollison, files, logging all internal and participant-generated events, and & Fried, 2010; Jacobs, Korolev, et al., 2010; Maguire et al., keeping track of the experiment state. We describe how 1998; Shipman & Astur, 2008; Suthana et al., 2012; van der PandaEPL compares with other software for building spatial- Ham et al., 2010; Watrous, Fried, & Ekstrom, 2011; navigation experiments and walk the reader through the process Weidemann, Mollison, & Kahana, 2009). Because these tech- of creating a fully functional experiment. niques require participants to remain stationary throughout the recording period, researchers often use computer-controlled Keywords Experiment creation . Programming library . virtual reality (VR) environments. Spatial navigation . Virtual reality . Stimulus presentation Many VR experiments, including those listed above, have the same basic structure and requirements. Participants navigate the environment from a first-person Since the discovery of place cells in the 1970s (O’Keefe & perspective, triggering events when they arrive at partic- Dostrovsky, 1971;O’Keefe & Nadel, 1978), researchers ular locations. Instructions between runs are presented using 2-D text and images superimposed on the 3-D environment. Input is processed using a computer key- A. Solway board or joystick, and every event, either experiment- or Princeton University, Princeton, NJ, USA participant-generated, is recorded in a text-based log. In J. F. Miller some cases, multiple computers are used: for example, Drexel University, Philadelphia, PA, USA one to run the experiment, and another to record neural data. Such setups require that the computers be synchro- * M. J. Kahana ( ) nized through the use of additional hardware. University of Pennsylvania, 3401 Walnut St. Suite 303C, Philadelphia, PA 19104, USA We have designed a programming library that automates e-mail: [email protected] these tasks and at the same time leaves users the flexibility 1294 Behav Res (2013) 45:1293–1312 necessary to implement novel experimental paradigms. Our of PyEPL for experiments using 2-D stimuli (here we will library, called PandaEPL, is built on top of the open-source not reenumerate PyEPL’s particular benefits; see Geller et Panda3D game engine. Panda3D is a fully fledged modern al., 2007); however, PyEPL’s VR module is now outdated. game engine with support for 3-D graphics; efficient ren- Users can build only simple 3-D environments by placing dering; basic physics; fog, lighting, and particle effects; different cubes on a grid and applying textures to them. shaders; flexible camera control; and mouse and keyboard Irregularly shaped objects can only be presented as 2-D input. Panda3D was developed by the Disney corporation sprites that appear the same from every angle. Missing from and subsequently released as open-source software. PyEPL is the ability to load and render true 3-D models With PandaEPL, researchers can design rich and complex created with modern graphic design packages. This makes environments using the 3-D modeling software of their the constructed environments both less attractive and more choice, and participants can then navigate these environ- cumbersome to create. Moreover, because rendering is con- ments from a first-person perspective. User-defined events trolled by a basic graphics engine built in-house, even can be triggered automatically when participants collide rudimentary environments can be slow to render. PyEPL is with objects in the environment, or more complex contin- officially supported on Mac OS X and Linux. gencies can be created by executing user-defined code be- Ayaz et al. (2008) reported on Maze Suite, a set of fore each frame is rendered. Helper functions display text standalone tools aimed at the construction of spatial- and images in 2-D, allowing users to display instructions navigation experiments. It consists of three programs: and construct custom heads-up displays (e.g., to display a MazeMaker, a point-and-click interface for constructing compass, the score, or the time). A number of other features new environments; MazeWalker, the graphics and game simplify tasks that are common to all cognitive experiments, engine; and MazeViewer, a tool that aids with data analysis. including configuration and log-file management and com- Maze Suite allows users to create and analyze basic exper- puter synchronization. The basic use of the software does iments without having to learn a programming language, not require knowledge of Panda3D or of any other library. and for simple environments, without having to learn how to However, a rudimentary knowledge of Python is required. use graphic design software. However, the range of exper- Our presentation here proceeds as follows. First, we iments that can be constructed and the analyses that can be describe how PandaEPL compares with existing software performed are limited by the built-in capabilities of the for creating spatial-navigation experiments. Next, we dis- point-and-click interface. Because Maze Suite is a set of cuss how PandaEPL handles precise timing, an important standalone programs rather than a programming library, its issue for all psychology experiments. We then demonstrate features cannot be extended or used in novel ways by being how PandaEPL can be used to build an experiment by invoked from a programming language. Maze Suite runs leading the reader through a fully functional example. The only on Microsoft Windows systems. example is a reduced version of Experiment 2 of Miller, The approach that we take is similar to that of PyEPL. Lazarus, Polyn, and Kahana (in press). Finally, additional PandaEPL makes available a set of Python-based classes details about the library are provided in the Appendix. and functions that encapsulate many common development tasks, but it is up to the experiment writer to decide how to best deploy these features to construct a particular experi- Comparison with existing approaches ment. There is not a single “pipeline” through which all new experiments are created. The advantages and disadvantages We know of only two existing general-purpose software of such an approach are obvious: It provides for a large packages aimed at the creation of spatial navigation exper- amount of flexibility in creating new experiments, but it has iments (Ayaz, Allen, Platek, & Onaral, 2008;Geller, a steeper learning curve than a specialized point-and-click Schleifer, Sederberg, Jacobs, & Kahana, 2007). interface such as the one provided by Maze Suite. Geller et al. (2007) reported on a general-purpose However, unlike PyEPL, which forces users to design all Python-based Experiment Programming Library, or aspects of their experiment programmatically, PandaEPL PyEPL. PyEPL streamlines many of the common develop- allows users to construct the most cumbersome part, the ment tasks shared by cognitive experiments by making 3-D environment itself, using the point-and-click interface available a set of Python-based classes and functions. This in the graphics package of their choice. The 3-D environ- allows researchers to quickly and easily create new experi- ment can then easily be loaded in, either as a single model or ments, while at the same time leaving them the flexibility by piecing together several separately constructed models. necessary to program novel features. As a whole, PyEPL is Moreover, whereas the only 3-D objects supported by aimed at general experiment development. Its “virtual real- PyEPL are cubes to which users apply different textures, ity
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages20 Page
-
File Size-