PEBL is a free, open-source cross-platform system for designing and running psychological experiments, behavioral tests, and surveys. It provides a powerful programming language optimized for psychology research along with a large library of pre-built psychological tests.
- Cross-Platform: Runs natively on Linux, Windows, macOS, and in web browsers via WebAssembly
- 100+ Pre-Built Tests: Comprehensive battery of validated psychological assessments
- Easy to Learn: Custom programming language designed specifically for experimental psychology
- Multilingual: Built-in internationalization support with translations for major languages
- Data Collection: Export data to CSV, upload to servers, or collect via web deployment
- Graphics & Multimedia: Support for images, audio, video, and advanced visual stimuli
- Timing Precision: Millisecond-accurate timing for reaction time studies
Linux (Native):
# Build PEBL
make -j 10 main
# Install to /usr/local/pebl2/ (creates symlink at /usr/local/bin/pebl2)
sudo make install
# Or run directly from source (no installation needed)
./bin/pebl2 battery/stroop/stroop.pblSee doc/INSTALLING_ON_LINUX.md for detailed installation options including:
- User installations (no sudo required)
- Custom install locations
- AppImage portable builds
- Development/portable mode
WebAssembly (Browser):
make em# Run a simple reaction time test
bin/pebl2 battery/srt/SimpleRT.pbl
# Run with specific subject number
bin/pebl2 battery/flanker/flanker.pbl -s 101
# Launch the PEBL experiment launcher
bin/pebl2 bin/launcher.pblPEBL includes a comprehensive battery of over 100 psychological tests including:
- Attention & Executive Function: Flanker, Stroop, Go/No-Go, Trail Making, Wisconsin Card Sort
- Memory: Digit Span, Corsi Blocks, N-Back, Tower of London/Hanoi
- Decision Making: Iowa Gambling Task, Balloon Analog Risk Task, Weather Prediction
- Perception: Visual Search, Multiple Object Tracking, Motion Detection
- Surveys & Scales: TLX, SUS, Big Five Personality, NASA-TLX, Affect Grid
Browse the battery/ directory for the complete collection, or see doc/BATTERY_MIGRATION_GUIDE.md for detailed test descriptions.
- Installing on Linux - Comprehensive Linux installation guide
- Getting Started - Overview of PEBL architecture and development
- Dependencies - Required libraries and build dependencies
- Testing Guide - How to test PEBL and battery tasks
- Token Authentication - Web-based data collection setup
- Deployment Guide - Deploying PEBL experiments online
- Compiling on Windows - Windows build instructions
For AI assistants working with PEBL code, see Notes_for_Claude_on_Programming_PEBL.txt.
PEBL experiments are written in the PEBL language (.pbl files):
define Start(p)
{
gWin <- MakeWindow("black")
# Show instructions
inst <- EasyLabel("Press any key when you see the X",
gVideoWidth/2, gVideoHeight/2, gWin, 44)
Draw()
WaitForAnyKeyPress()
# Show stimulus and measure response time
Hide(inst)
Draw()
Wait(1000 + RandomUniform(1000))
stimulus <- EasyLabel("X", gVideoWidth/2, gVideoHeight/2, gWin, 100)
Draw()
time1 <- GetTime()
WaitForAnyKeyPress()
time2 <- GetTime()
rt <- time2 - time1
MessageBox("Your reaction time: " + rt + " ms", gWin)
}
See the battery/ directory for hundreds of complete examples.
PEBL can be compiled to WebAssembly for running experiments in web browsers:
# Build WebAssembly version
make em
# Deploy to web server
./deploy-to-online-platform.shSee doc/TOKEN_AUTHENTICATION.md for details on web-based data collection.
- Native Build: GCC/Clang, SDL2, SDL2_image, SDL2_ttf, SDL2_net, SDL2_gfx
- WebAssembly Build: Emscripten SDK (emsdk)
- Documentation: LaTeX (optional, for PDF manual generation)
See doc/DEPENDENCIES.md for detailed dependency information.
make -j 10 main # Build native Linux executable (parallel compilation)
make em # Build WebAssembly version
make doc # Build PDF manual from LaTeX
make install # Install to /usr/local/pebl2 (or custom PREFIX)
make appimage # Build portable AppImage
make clean # Remove build artifactsFor complete installation instructions and options, see doc/INSTALLING_ON_LINUX.md.
pebl/
├── src/ # C++ source code for PEBL interpreter
│ ├── apps/ # Main applications (PEBL.cpp)
│ ├── base/ # Parser, evaluator, core language
│ ├── libs/ # Built-in function libraries
│ ├── objects/ # Graphics objects (windows, shapes, etc.)
│ └── platforms/ # Platform-specific code (SDL, Emscripten)
├── battery/ # Pre-built psychological tests
├── pebl-lib/ # Standard library (.pbl files)
├── media/ # Fonts, images, sounds, word lists
├── doc/ # Documentation
└── bin/ # Compiled executables
PEBL is open source and welcomes contributions! Areas where help is especially appreciated:
- Adding new psychological tests to the battery
- Translations for internationalization
- Bug fixes and performance improvements
- Documentation improvements
- Platform-specific testing (Windows, macOS)
PEBL is released under the GNU General Public License v2.0. See COPYING for details.
The PEBL test battery includes tests from various researchers. Individual tests may have additional citation requirements - see the .about.txt files in each test directory.
If you use PEBL in your research, please cite:
Mueller, S. T. (2014). PEBL: The Psychology Experiment Building Language (Version 2.0) [Computer software]. Retrieved from http://pebl.sourceforge.net
- Website: http://pebl.sourceforge.net
- Documentation: http://pebl.sourceforge.net/doc.html
- Mailing List: pebl-list@lists.sourceforge.net
- Bug Reports: https://github.com/[your-username]/pebl/issues
- Email: pebl.exp@gmail.com
- Community: Join the PEBL mailing list for questions and discussion
- Bug Reports: Please use GitHub issues for bug reports and feature requests
PEBL - Making psychological research more accessible, one experiment at a time.