If you’re a psychology or neuroscientist, part of your job likely involves conducting experiments for research or clinical purposes. Unfortunately, the most common software tools used to create experiments typically require restrictive and expensive licenses. Not PEBL, however. This seven-year-old special-purpose programming language lets psychologists and neuroscientists create, modify, run, and share computer-based experiments.
The Psychology Experiment Building Language is also useful in the Psychology classroom, because it lets instructors and professors distribute tests to students or set them up in a computer lab so that students can experience firsthand the research paradigms they read about in a textbook. It includes special-purpose functions that make it easy to create visual stimuli, collect responses, randomize and counterbalance experimental designs, and record data.
PEBL is available on Windows, Linux, and Mac OS X. It bundles a set of experiments and tests in the form of the PEBL Test Battery that provide free implementations of many classic studies from cognitive and clinical neuropsychology. PEBL and the PEBL Test Battery have been used by researchers around the world, ranging from clinicians in their own offices to laboratories at Ivy League universities to government labs, including NASA and NIH.
Shane Mueller, a cognitive scientist and research psychologist who works in Dayton, Ohio, created and maintains PEBL. It’s a full-fledged programming language, heavily influenced by LISP and R, and written in C++, using the Standard Template Library and, increasingly, PEBL itself. It uses a parser/lexer created with Bison and flex, which gives PEBL a lot of flexibility in experimental design.
PEBL compiles text files to a parsed tree of executable nodes, and then executes that tree to run the experiment. It heavily leverages the SDL gaming libraries (including SDL_ttf, SDL_image, SDL_gfx, and SDL_net) to help provide simple creation and manipulation of stimuli. It is designed to be forgiving for beginner users (who are often graduate students in psychology) and to avoid many subtleties that create problems in other programming languages.
One script in the package allows you to collect survey data without working with PEBL code at all. You specify the survey questions in a .csv file, and the software runs the questions and saves the results in data files for you. “This turns out to be much easier than paper-and-pencil surveys that researchers still use frequently,” Mueller says, “because you don’t have to hand-code your data after you are done.”
Why make the software open source when similar applications are making money as proprietary tools? “I felt the community was turning over the keys to the scientific kingdom to vendors whose best interest was in keeping the doors locked,” Mueller says. “This, to me, is anti-scientific, because it means that you can’t share your experiments easily, unless the person you are sharing with buys the license. And you can’t check others’ experiments for errors, which is especially true for boutique companies that sell special-purpose test batteries. Plus, if your license lapses for whatever reason, you don’t have access to your own past experiments. Data are not much good if you can’t reproduce the conditions under which they are collected.”
Mueller chose to host on SourceForge.net because “it provides a level of permanence that hosting on your own site cannot, and a level of independence that hosting at a university cannot. Plus, SourceForge offers a number of useful tools (mailing lists, wiki, CVS, web hosting, etc.) to help a grow a community around a piece of software.”
In the next version of PEBL, Mueller plans to work on support for various devices and trigger mechanisms that researchers use to link their experiment software with hardware such as eyetrackers, response buttons, and EEG systems. He makes new releases of the core software about once a year, with releases to the test battery coming about twice a year. He welcomes help with translations. “Many of the experiments I distribute can be localized into different languages, and researchers do this, but I don’t get many translations contributed back to the project.”
He’d also like help with validation studies. “One of the biggest obstacles researchers face when considering PEBL Battery tests is that there are currently only a few published studies showing performance distributions of typical research participants in these specific tasks. This is improving, with ongoing studies collecting norms for different tests, but it is really an ideal setting for open source collaboration, where researchers from multiple sites, world-wide, can contribute small studies to a large pool so that better norms can be developed.”