Skip to content

Laboratory of Neuropsychology

MonkeyLogic Frequently Asked Questions

General Questions & Answers

What is MonkeyLogic?

MonkeyLogic is a behavioral control and data acquisition system designed for creating and running Psychophysical experiments 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. MonkeyLogic 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). It is composed of software written in Matlab and a hardware interface built for use with National Instruments data acquistion devices.

Where does MonkeyLogic come from?

MonkeyLogic was originally designed and written by Wael Asaad MD, PhD. To learn more about the development history, please visit the History of Monkey Logic page.

How many users are there?

There are about 20 to 30 self-reporting labs who currently use MonkeyLogic, with many more expected to convert from NIMH-Cortex. There are also ~300 registered users on the discussion forum. Current statistics are available on the MonkeyLogic discussion forum.

What are its strengths and weaknesses?


  • Completely open source, allowing you to modify or create new features entirely on your own.
  • Developed in Matlab, leveraging all the easy to use programming and toolbox features.


  • You must have a licensed version of Matlab installed, otherwise Monkey Logic can not run on its own.
  • Only MS Windows systems are supported (not Mac or Linux).

How do I report a problem or bug?

See the support page.
How do I request a new feature? See the support page.

Data files

What data files can Monkey Logic read?

Monkey Logic can read files created by itself in a format called BHV.

Does it have NeuroShare data file support?

No, MonkeyLogic neuroshare support is currently not in development.

What is the internal format of MonkeyLogic data files?

The file format is documented along with other Monkey Logic commands, found in the menu to the left, click here to go there now.

To read in a BHV file :

data = bhv_read([dataFileName]).

How do I obtain MonkeyLogic?

Look for the Download Information link in the menu to the left. Since there may be multiple versions and branches of Monkey Logic available on the internet, we can only recommend and support the one distributed by the NIH on this website.

There is no charge for private or commercial use. The source code and schematics for the hardware interface are included in the distribution.

Do I need Matlab to install and/or run MonkeyLogic

Yes. You will need Version R11.1 or later.

Is it a big program?

MonkeyLogic is remarkably small program consisting of a few dozen matlab scripts and mex files. There are additional 3rd party drivers required, such as DirectX and National Instruments. You will need to install these separately by yourself.

Where do I start?

The documentation has a Getting Started page. That is the best place to start learning. Once you download and start up MonkeyLogic, there are many example tasks included. Since you do not need any advanced hardware to run Monkey Logic, you can try it out with just basic features enabled and collect then analyze some data.