A simple even/odd decision task on single digits (0–9). Each digit appears at the centre of the screen; the participant presses a key to indicate whether it is even or odd. Reaction times and accuracy are recorded.
This example is useful as a minimal working experiment and as a starting point for building more complex tasks.
Fixation cross → Digit → Response → ITI
500 ms until key key press 500 ms
| Key | Meaning |
|---|---|
F |
Even |
J |
Odd |
sudo apt install libsdl3-dev on Ubuntu/Debian)# Fullscreen, participant 1
go run main.go -s 1
# Windowed (development / testing)
go run main.go -s 1 -d
| Flag | Default | Description |
|---|---|---|
-s |
0 |
Participant ID (integer) |
-d |
off | Development mode: windowed 1024×768 |
Data are saved to goxpy_data/ as a .xpd file (CSV with a metadata header). One row per trial:
| Column | Description |
|---|---|
number |
The digit shown (0–9) |
key |
Key pressed |
rt |
Reaction time in milliseconds |
correct |
Whether the response was correct |