MonkeyLogic

Behavioral Control in MATLAB

 



Overview

Introduction
Features
Organization
Published Studies that used MonkeyLogic

Recent updates to MonkeyLogic

Download MonkeyLogic Version1.1



Introduction

MonkeyLogic is a MATLAB toolbox for the design and execution of psychophysical tasks with high temporal precision . It is structured to allow for the flexible construction of sensory, motor, or cognitive tasks that are based upon the interaction of a subject with visual stimuli through the use of eye-position, joystick, button, lever, and / or keyboard input.

control screen subject screen

 


Features

  • Real-time experimental control with high-precision temporal replication across trials (millisecond time-scale).
  • Straightforward, MATLAB-based interface for flexible task design.
  • Can present static images, movie stimuli, and translating images and movies, while simultaneously tracking behavior.
  • Works with widely-available data acquisition hardware for I/O functions, including eye-signal and joystick acquisition, reward delivery, digital eventmarker output, TTL and analog output.
  • Easy calibration of eye- and joystick-inputs and automatic, configurable, on-line eye-signal drift correction.
  • Graphical user interface for setting and saving a variety of task-related configuration parameters, such as video settings, I/O mappings & calibrations, and methods for condition & block selection.
  • Information-rich display of behavioral performance and within-trial events during task execution.
  • Data file includes complete descriptions of behavioral performance, event markers and their text labels, task structure, and the actual stimulus images used. Any trial can be re-played to inspect a subject's behavior and AVI movie files can be generated from any trial to demonstrate how a task was performed.
  • Behavior can be followed over the web, and commands can be submitted remotely to alter the execution of the task (e.g., pause, quit, resume, change blocks, etc).

 


Organization

An experiment is constructed using two main programming elements: A conditions file and a timing script. The conditions file is a tab-delimited text file which enumerates each possible sequence of stimulus presentations that can occur within any given trial of the experiment. The timing script is a a MATLAB program that determines when and under what conditions those stimuli are presented. The timing script can take full advantage of the resources of the MATLAB programming language to create straightforward tasks or to study complex, highly-contingent behaviors. Each stimulus is referred to as a “TaskObject” and can take the form of a visual object, a sound, or an analog or digital output (e.g., to drive a stimulator or injector).

This structure is derived from the CORTEX (“Computerized Real-Time EXperiments”) software developed originally by Thomas White in the lab of Robert Desimone (formerly at the NIH, now at MIT) and in wide use by many other labs as well. This organization has two main benefits: 1) The timing file(s) can be written efficiently, so as to operate independently of the actual stimulus being presented on any particular trial, and 2) The explicit enumeration of all conditions structures and greatly facilitates data analysis.

main menu

The independence of timing files from particular stimuli allows a timing file to present, for example, a sequence of pictures whose identity and position may vary from trial to trial. Timing files call up TaskObjects without regard to these specifics. For example, suppose one is constructing a delayed-match-to-sample task. TaskObjects 1-3 each might then refer to a picture object. The timing file can first present TaskObject1, then later present TaskObject2 and TaskObject3, and wait for target acquisition of TaskObject2 (for example, by saccade or joystick maneuver), regardless of which pictures the TaskObjects actually contain and where they are placed on the screen. The specific pictures and locations are specified by the conditions file. The conditions text file would specify which picture appears first by listing that picture under the TaskObject1 column. In the delayed-match-to-sample rule, for instance, the matching target picture can be re-specified as TaskObject2, and the timing script would simply assume that TaskObject2 is always the target of the correct response. A separate line determines the TaskObjects for each individual condition (i.e., each possible permutation of TaskObjects).

Because conditions are explicitly defined and each is associated with a unique condition number, an analysis can simply pull out those conditions which conform to any specific combination of stimuli or stimulus features (e.g., picture identity, picture location, distractor position, etc).

Despite running in a non-real-time operating environment (Windows), high performance can nevertheless be achieved in an appropriately configured system, and is possible on modern, multi-core machines and by the use of DirectX extensions (SVI Toolbox) to control a video display with sub-millisecond resolution.

MonkeyLogic will store a comprehensive record of behavioral data; However, it is assumed that a separate acquisition system (e.g., Plexon) is available to acquire neural data (LFPs, EEG, spike waveforms, etc). The two data files can then by synchronized for analysis by aligning event markers stored locally with those sent digitally by MonkeyLogic to the acquisition system.

Getting Started

Example DMS Task
(Conditions File & Timing Code)

Contact



Published Studies that used MonkeyLogic

If you use MonkeyLogic in your published work, citing it with a reference is greatly appreciated, as this will enable us to more easily continue funding to support and enhance it. Thank you.

Preferential Encoding of Visual Categories in Parietal Cortex Compared to Prefrontal Cortex
Sruthi Swaminathan & David J. Freedman
Nature Neuroscience, 2012, Vol. 15, No. 2, pp. 315-320

Specific Contributions of Ventromedial, Anterior Cingulate, and Lateral Prefrontal Cortex for Attentional Selection and Stimulus Valuation
Daniel Kaping, Martin Vinck, R. Matthew Hutchison, Stefan Everling & Thilo Womelsdorf
PLoS Biology, 2011, Vol. 9, No. 12, e1001224

Encoding of both Positive and Negative Reward Prediction Errors by Neurons of the Primate Lateral Prefrontal Cortex and Caudate Nucleus
Wael F. Asaad & Emad N. Eskandar
Journal of Neuroscience, 2011, Vol. 31, No. 49, pp. 17772-17787

Neural Substrates of Cognitive Capacity Limitations
Timothy J. Buschman, Markus Siegel, Jefferson E. Roy & Earl K. Miller
Proc. Natl. Acad. Sci., U.S.A., 2011, Vol. 108, No. 27, pp. 11252-11255

Range-Adapting Representation of Economic Value in the Orbitofrontal Cortex
Camillo Padoa-Schioppa
Journal of Neuroscience, 2009, Vol. 29, No. 44, pp. 14004-14014



This site last updated: February, 2012
© 2008-2012