attention-tasks
A small suite of X11-based attention-control experiments written in C. The programs administer timed cognitive tasks, record per-trial responses, and emit logs suitable for downstream analysis. Targeted at researchers and clinicians who need a lightweight, reproducible tester without the overhead of a full psychology framework.
Background
The tasks implemented here follow the “squared” paradigm described by Burgoyne, Tsukahara, Mashburn, Pak, and Engle (2023). Their work argues that attention control can be measured cleanly when both the stimulus and the response options independently carry congruent or incongruent information — producing four trial classes rather than the two of the classical task.
Trials fall into one of four types:
- fully congruent
- fully incongruent
- stimulus congruent, response incongruent
- stimulus incongruent, response congruent
A 30-second practice phase precedes a 90-second test phase. Feedback is delivered after each trial via a short chime or buzzer and a running score. As a sanity check on participant effort, key-mashing produces scores between roughly 45% and 56%; the meaningful-performance cutoff is taken to be 60%.
Burgoyne, A. P., Tsukahara, J. S., Mashburn, C. A., Pak, R., & Engle, R. W. (2023). Nature and measurement of attention control. Journal of Experimental Psychology: General, 152(8), 2369–2402. doi:10.1037/xge0001408
Tasks
- Stroop Squared
- Target word “RED” or “BLUE” printed in red or blue ink; the participant picks the response option whose ink colour matches the target’s ink colour. The response word “red” is always on the right and “blue” on the left.
- Flanker Squared
- Target stimulus is five arrows; the participant picks the response whose central arrow points the same direction as the target’s flanking arrows.
- Simon Squared
- Target stimulus is a single arrow; the response options are the words “LEFT” and “RIGHT”.
Programs
- stroop-sq
- Runs the Stroop Squared tester. Opens an X11 window, presents timed trials, plays auditory feedback, and writes a per-session log. See stroop-sq(1).
- task-gen
- Generates scenario files for any of the testers. Accepts
--num-tasks,--stimulus-congruent, and--response-congruentratios so the trial mix can be tuned per study. See task-gen(1).
Build
BSD-make project. Links against libX11,
libSDL2, libpthread, and the in-house
libswgysnd audio helper. Includes and libraries are
pulled from /usr/X11R6, /usr/local, and the
bundled include/ and
lib/ directories. Built with
-std=c17 -Wall -Wextra -pedantic; see the
Makefile for the full flag set.
Repository layout
- data/
- Sample scenario inputs and example session output.
- docs/
- Per-task descriptions and design notes.
- include/ · lib/
- Bundled headers and static libraries for the audio helper.
- tools/
- Post-session analysis scripts (R).