Skip to content

Laboratory of Neuropsychology

Introduction to MonkeyLogic


MonkeyLogic  is a behavioral control and data acquisition system written in Matlab. It is used in many non-human primate laboratories and is rapidly being adopted as a replacement for NIMH Cortex. Although MonkeyLogic  is not a true real-time system like DOS Cortex, it is fast enough for most behavioral work and can integrate with real-time data acquisitions systems commonly used in behavioral neurophysiology (e.g., Plexon, TDT, Alpha-Omega).

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, touch-screen, button, lever, and / or keyboard input.

Monkey Logic program screenshot 1

Monkey Logic program screenshot 2

Monkey Logic program screenshot 3

Monkey Logic program screenshot 4

Monkey Logic program screenshot 5


  • Real-time experimental control with high-precision temporal replication across trials (millisecond time-scale).
  • Straightforward, MATLAB-based interface for flexible task design.
  • Able to 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, touch screens, 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.
  • A comprehensive behavioral data file is generated by each task run that 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.).