Goxpyriment: A Go Framework for Behavioral and Cognitive Experiments
summary
The gist
Goxpyriment introduces goxpyriment, a new open-source software framework for programming behavioral and cognitive experiments using the Go programming language.<ref:2604.15245#pg1…
In short
Goxpyriment is an open-source Go framework for running behavioral and cognitive experiments, designed to fix limitations in Python tools like runtime complexity and deployment issues. It uses Go for single-binary deployment with zero external dependencies, ensuring simplicity across different laboratory computers.
Key concepts
- Experiment Object
- This central object manages all aspects of an experiment, including the window display, how visuals are rendered, and audio subsystems. It acts as the main container for setting up and running a single experimental setup.
- Single-Binary Deployment
- Go compiles the entire program into one executable file that has no external runtime dependencies. The necessary SDL3 libraries are embedded directly into this file, meaning users only need to copy one file to run experiments on any lab computer without managing virtual environments.
- High-Precision Streams
- For fast stimulus sequences like retinotopic stimulation, specialized functions ensure accurate timing. These functions disable garbage collection and busy-wait at the sub-frame level to guarantee that every stimulus starts exactly when scheduled.
- OS-Level Response Timestamps
- The framework uses SDL3 OS events to capture response times with high accuracy. By comparing the response time against screen flip timestamps, researchers can measure reaction times with minimal jitter and no overhead.
Terminology used across episodes
This episode discusses
The paper
Goxpyriment: A Go Framework for Behavioral and Cognitive Experiments · Read on arXiv
Cognitive Neuroimaging Unit CNRS INSERM CEA
We introduce `Goxpyriment', a new open-source software framework for programming behavioral and cognitive experiments using the Go programming language. The library is designed to address some limitations of existing Python-based experiment tools, particularly the runtime environment complexity that frequently complicates deployment across laboratories. Because Go is a compiled language that can natively embed assets (e.g., graphics, audio files, and stimulus lists), Goxpyriment compiles entire experiments into single, self-contained executable binaries with zero runtime dependencies. This drastically simplifies distribution to collaborators and testing computers. The programming interface, inspired by Expyriment (Krause & Lindemann, 2014), was designed to be human friendly. The library includes an array of visual stimuli (text, shapes, images, Gabor patches, motion clouds,...) and audio capabilities (WAV playback and tone generation). While developing Goxpyriment, we focused on timing reliability. Input events are timestamped by the operating system at hardware-interrupt time, so reaction times are computed by subtracting two OS-level timestamps rather than relying on continuous polling. Go's garbage collector can be disabled, greatly reducing the probability of unpredictable pauses that could corrupt stimulus timing. Finally, a set of over forty psychology experiments implemented in Goxpyriment are provided that promote not only learning by humans but also improve the ability of modern AI-assisted coding tools to help program experiments. The framework is released under the GNU General Public License v3 and is freely available at https://github.com/chrplr/goxpyriment.
Transcript
Introduction to the show: ident: Genomics Radio. Generated commentary on the latest computational biology and genomics papers.
Ines: I'm Ines.
Marcus: And I'm Marcus, here with Yuki.
Ines: We're looking at the paper: "Goxpyriment: A Go Framework for Behavioral and Cognitive Experiments".
Paper summary: Ines: So, we're looking at the paper today about Goxpyriment: A Go Framework for Behavioral and Cognitive Experiments. We’re talking about what they claim this framework is designed to do.
Marcus: Basically, the thesis is that they are introducing a new open-source software framework built with the Go programming language specifically for programming behavioral and cognitive experiments.
Ines: They claim this framework addresses limitations of existing Python-based experiment tools, particularly around the complexity of runtime environment when you try to deploy them across different laboratories.
Yuki: It seems like they are focusing on making deployment simpler, which is a major pain point for researchers who need to run the same experiments consistently in various settings.
Ines: Right, and because Go is a compiled language, it can natively embed assets like graphics, audio files, and stimulus lists directly into the executable. This means the framework compiles entire experiments into single, self-contained binaries with zero runtime dependencies.
Marcus: That’s a big deal for distribution; instead of managing virtual environments or interpreter installations on each machine, you just copy one file to get it running anywhere.
Yuki: So it makes sharing materials and testing across different computers much more straightforward than what you might experience with Python setups.
Ines: Also, they claim the programming interface is designed to be human friendly, drawing inspiration from an existing framework called Expyriment.
Marcus: And on the technical side, they focused heavily on timing reliability during development because they wanted to address issues like unpredictable pause times that can corrupt the timing of stimulus presentation and response recording during a critical trial loop.
Yuki: They are tackling those timing issues directly, which is crucial for any experiment involving high-speed sequences or precise reaction time measurements.
Ines: And they also mention specific techniques to control memory management tasks, such as exposing a runtime API to suspend the garbage collector during timing-critical loops to ensure stimulus onsets and offsets are not delayed by memory management tasks.
Marcus: So they’ve put effort into making sure that the stimulus presentation timing is as accurate as possible, especially when dealing with dense sequences.
Yuki: And they also use specialized stream functions for those fast sequences, which disable garbage collection and busy-wait at the sub-frame level to make sure each stimulus onset is scheduled accurately.
Ines: So in short, the paper introduces a framework that emphasizes zero runtime dependencies through static linking and embedding assets directly into the binary.
Marcus: It’s about simplifying distribution so that researchers can focus more on the experiment design rather than infrastructure management when collaborating with others.
Conclusion: Ines: So, wrapping up our look at Goxpyriment: A Go Framework for Behavioral and Cognitive Experiments. The authors are Christophe Pallier, Julie Bonnaire, and Marie-France Fourcade from the Cognitive Neuroimaging Unit CNRS INSERM CEA.
Marcus: They essentially propose this Go framework as a way to make programming these kinds of experiments much more straightforward by solving the deployment headaches that come with current Python tools.
Yuki: In simple terms, it’s a tool designed to be self-contained so you don't have to worry about installing a whole environment every time you want to run an experiment.
Ines: Exactly. It’s about making the process of taking an experiment from design to running it on multiple machines much more accessible by removing that environmental complexity for collaborators.
Marcus: The implications are that researchers can focus more on the actual
More episodes
- The day in conversation for 2026-12-05
- Daily Summary for 2026-12-05
- 2502.05872-Flexible inference of evolutionary accumulation dynamics using uncertain observational data
- 2511.08292-Distance by de-correlation: Computing distance with heterogeneous grid cells
- The day in conversation for 2026-12-04
- Daily Summary for 2026-12-04
- Daily Summary for 2026-12-03
- 2608.11444-Large-scale AI-Ready Data for Anti-Cancer Drug Response Modeling
- 2605.11718-Self-organized MT Direction Maps Emerge from Spatiotemporal Contrastive Optimization
- 2409.02674-Fibration symmetry-breaking supports functional transitions in a brain network engaged in language