Antisaccade Task

| Field | Value |
|---|
| Name | Antisaccade Task |
| Version | v0.1.4-dev |
| URL / Repository | https://github.com/TaskBeacon/T000032-antisaccade |
| Short Description | Rule-dependent inhibitory control with prosaccade versus antisaccade responses. |
| Created By | TaskBeacon |
| Date Updated | 2026-03-18 |
| PsyFlow Version | 0.1.12 |
| PsychoPy Version | 2025.1.1 |
| Modality | Behavior |
| Language | Chinese |
| Voice Name | zh-CN-YunyangNeural (voice disabled by default) |
1. Task Overview
This task implements a two-condition antisaccade paradigm:
prosaccade: respond toward the target side.
antisaccade: respond opposite the target side.
Each logical trial presents a fixation baseline, a rule cue, a short gap, and a lateralized target response window. The build uses keyboard direction keys (f/j) as a portable proxy for gaze direction.
The task no longer uses a separate controller object. Trial-specific rule, target-side, and timing values are generated by a deterministic helper in src/utils.py from the block seed and trial id, which keeps the runtime auditable without maintaining cross-trial mutable state.
2. Task Flow

Block-Level Flow
| Step | Description |
|---|
| 1. Block setup | Load the block condition stream with BlockUnit.generate_conditions(...) and resolve the per-block seed. |
| 2. Trial execution | Run fixation -> rule cue -> gap -> saccade response -> ITI for each logical trial. |
| 3. Block summary | Summarize only logical trial rows from the completed block and show accuracy, correct RT, and timeout count. |
| 4. Final summary | Show session-level totals and save the reduced CSV output. |
Trial-Level Flow
| Step | Description |
|---|
fixation | Show center fixation and left/right peripheral anchors. |
rule_cue | Present condition cue (朝圆点 or 背离圆点). |
gap | Remove cue and keep neutral anchors before target onset. |
saccade_response | Present one lateral target and capture left/right response under deadline. |
iti | Show neutral fixation scene until next trial. |
Helper Logic
| Component | Description |
|---|
| Rule parser | Validates prosaccade vs antisaccade and rejects unknown labels. |
| Deterministic spec builder | Samples target side from a stable seed basis (block_seed + trial_id) and computes the correct key. |
| Summary helpers | Aggregate reduced rows into accuracy, mean correct RT, timeout count, and total trials. |
Controller Logic
| Component | Description |
|---|
| Task-local controller | Not used. Deterministic helper logic in src/utils.py replaces mutable controller state. |
Runtime Context Phases
| Phase Label | Meaning |
|---|
fixation | Neutral baseline before the rule cue. |
rule_cue | Rule preparation period. |
gap | Cue-target separation interval. |
saccade_response | Active response capture window. |
iti | Inter-trial reset interval. |
3. Configuration Summary
a. Subject Info
| Field | Meaning |
|---|
subject_id | 3-digit participant identifier. |
b. Window Settings
| Parameter | Value |
|---|
size | [1280, 720] |
units | pix |
screen | 0 |
bg_color | gray |
fullscreen | false |
monitor_width_cm | 35.5 |
monitor_distance_cm | 60 |
c. Stimuli
| Stimulus Group | Description |
|---|
fixation | Central fixation cross used in fixation/gap/ITI phases. |
rule_pro, rule_anti | Color-coded rule cues (朝圆点, 背离圆点). |
left_anchor, right_anchor | Peripheral position anchors shown before target onset. |
left_target, right_target | Lateral white target circles for directional response. |
instruction_text, block_break, good_bye | Entry, transition, and completion text screens. |
d. Timing
| Stage | Duration |
|---|
| fixation | uniform in fixation_duration range |
| rule cue | uniform in cue_duration range |
| gap | uniform in gap_duration range |
| response window | response_deadline |
| ITI | iti_duration |
e. Helper Logic
| Helper | Purpose |
|---|
src/utils.py | Deterministic trial-spec generation and summary aggregation. |
task.enable_logging | Enables the helper to emit auditable trial-spec logging. |
f. Triggers
| Trigger | Code | Semantics |
|---|
exp_onset | 1 | experiment start |
exp_end | 2 | experiment end |
block_onset | 10 | block start |
block_end | 11 | block end |
fixation_onset | 20 | fixation onset |
rule_pro_onset | 21 | prosaccade rule cue onset |
rule_anti_onset | 22 | antisaccade rule cue onset |
gap_onset | 30 | gap onset |
target_onset_left | 40 | left target onset |
target_onset_right | 41 | right target onset |
response_left | 50 | left response key |
response_right | 51 | right response key |
response_timeout | 60 | no response before deadline |
iti_onset | 70 | inter-trial interval onset |
4. Methods (for academic publication)
Participants completed a rule-based oculomotor inhibition task containing prosaccade and antisaccade trials. Each trial began with fixation, followed by an explicit rule cue and a short cue-target gap, then a lateral target requiring a directional response. Prosaccade trials required same-side responses relative to target location; antisaccade trials required opposite-side responses.
Behavioral outputs were logged at trial level, including condition, target side, response key, correctness, reaction time, and timeout status. The implementation emits phase-aligned triggers for fixation, cue, gap, target onset, response category, and ITI to support synchronized acquisition workflows.