Task dossier

Anti-Reach Task

T000046T000046-anti-reach-taskDraftWeb preview availableUpdated Jun 20, 2026

Generalized pro/anti reach task with eye/hand reference-frame manipulation and keyboard proxy responses.

Anti-Reach Task flow diagram
Anti-Reach Task flow diagram
Preview path
This task ships with a matched HTML companion so the browser preview can stay aligned to the canonical local repository.
Quick start
Clone locally, then follow the README for install and run instructions.
git clone https://github.com/TaskBeacon/T000046-anti-reach-task.git
cd T000046-anti-reach-task
# Follow the README for local setup and run steps

Anti-Reach Task

FieldValue
NameAnti-Reach Task
Versionv0.1.0-dev
URL / Repositoryhttps://github.com/TaskBeacon/T000046-anti-reach-task
Short DescriptionGeneralized pro/anti reach task with eye/hand reference-frame manipulation and keyboard proxy responses.
Created ByTaskBeacon
Date Updated2026-04-16
PsyFlow Version0.1.12
PsychoPy Version2025.2.4
ModalityBehavior
LanguageChinese
Voice Namezh-CN-YunyangNeural (voice disabled by default)

1. Task Overview

This task implements a generalized anti-reach paradigm. Each trial combines a color-coded rule cue with a spatial cue, while the participant responds left or right as a portable proxy for reach direction relative to the hand anchor. Pro trials require a same-direction response relative to the spatial cue; anti trials require the opposite direction.

The trial display keeps the eye fixation point and hand anchor visually separated so both reference frames remain legible on a desktop monitor. Standard trials place eye and hand anchors on the same horizontal side; generalized trials place them on opposite sides. The cue and response windows are timed to mirror the published anti-reach protocol, while the local runtime uses deterministic sampling so the full trial sequence can be replayed and audited.

2. Task Flow

Task Flow

Block-Level Flow

StepDescription
1. Load configLoad the mode-specific YAML config (config.yaml, config_qa.yaml, or sim config).
2. Collect subject infoCollect participant info in human mode; inject deterministic IDs in QA/sim mode.
3. Initialize runtimeSet triggers, create the PsychoPy window, build the stimulus bank, and preload the config-defined stimuli.
4. Show instructionsPresent the Chinese instruction screen and, in human mode, the voice-rendered instruction copy.
5. Run blocksCall BlockUnit.generate_conditions() to schedule the 16 anti-reach condition tokens across the block.
6. Show block breakPresent block accuracy, correct-response RT, and timeout counts after each block except the last.
7. Save dataWrite trial-level CSV output and the runtime settings JSON.
8. FinalizeEmit the end trigger, close the trigger runtime, and quit PsychoPy.

Trial-Level Flow

StepDescription
fixationShow the eye fixation spot and the hand anchor in the trial-specific left/right positions.
context_cueShow a green pro frame or blue anti frame around the eye fixation spot.
memory_holdRemove the context frame and hold fixation before the go signal.
go_cueFlash the white spatial cue at the eye-centered cue location.
reach_responseKeep the cue visible while capturing the left/right reach-direction proxy response.
feedbackShow the correct goal marker and a brief Chinese outcome label.
itiShow a neutral fixation cross before the next trial.

Controller Logic

FeatureDescription
Condition SchedulingUses the built-in BlockUnit.generate_conditions(...) path instead of a custom scheduler.
DeterminismTrial tokens are parsed into positions, cue sides, and correct keys with a seeded helper in src/utils.py.
BalanceThe 16 trial tokens are evenly sampled within each block.

Other Logic

ComponentDescription
Trial-spec builderbuild_antireach_trial_spec(...) derives eye/hand positions, cue location, goal location, and deterministic durations from the block seed and trial id.
Summary helperssummarizeBlock(...) and summarizeOverall(...) compute accuracy, mean RT, timeout count, and total trials from the reduced rows.
Sampler responderresponders/task_sampler.py emits plausible QA/sim responses using the correct key from runtime factors.

3. Configuration Summary

Settings are loaded from config/config.yaml in human mode and from the QA/sim variants in automated modes.

a. Subject Info

FieldMeaning
subject_id3-digit participant identifier.

b. Window Settings

ParameterValue
size[1024, 768]
unitspix
screen0
bg_colorblack
fullscreenfalse
monitor_width_cm35.5
monitor_distance_cm60

c. Stimuli

Core task parameters and visible stimuli are listed below.

Core Task Parameters

ParameterValue
conditions16 tokens spanning standard/generalized x pro/anti x cue left/right
total_blocksHuman 4; QA/sim 1
trial_per_blockHuman 32; QA/sim 16
overall_seed2026
position_step_px145
eye_row_y_px120
hand_row_y_px-120
cue_row_y_px120
goal_row_y_px-120

Visible Stimuli

Stimulus IDTypeDescription
instruction_texttextChinese instruction block describing the red eye fixation spot, white hand anchor, green pro frame, blue anti frame, and F/J response mapping.
fixation_crosstextNeutral white cross used during the ITI.
eye_fixationcircleRed fixation spot in the eye row.
hand_anchorcircleWhite hand anchor in the hand row.
context_framerectSquare rule frame rebuilt as green for pro and blue for anti.
spatial_cuecircleWhite spatial cue at the eye-centered cue location.
goal_markercircleColored endpoint marker used on the feedback screen.
feedback_texttextBrief Chinese outcome label shown above the goal marker.
block_breaktextBlock summary with accuracy, mean RT, and timeout count.
good_byetextEnd-of-task summary screen.

d. Timing

PhaseDuration
fixation0.5-1.0 s
context cue0.2 s
memory hold0.5-1.5 s
go cue0.17 s
response window1.0 s
feedback0.3 s
ITI0.6 s

e. Triggers

EventCode
exp_onset1
exp_end2
block_onset10
block_end11
fixation_onset20
context_cue_onset21
memory_hold_onset22
go_cue_onset23
response_window_onset24
feedback_hit_onset40
feedback_miss_onset41
response_left50
response_right51
response_timeout60
iti_onset70

f. Adaptive Controller

ParameterValue
ControllerNone
Block schedulingBuilt-in BlockUnit.generate_conditions(...)
Simulation policyTaskSamplerResponder for sampler sim; built-in scripted responder for smoke sim

4. Methods (for academic publication)

Participants completed a generalized anti-reach task implemented in PsychoPy/PsyFlow. Each trial began with a fixation display showing an eye fixation spot and a hand anchor on separate rows. A colored square frame then indicated whether the participant should respond in the same direction as the spatial cue (pro) or the opposite direction (anti). After a memory delay, a brief white spatial cue appeared and the participant made a left/right keyboard response that served as a portable proxy for reach direction relative to the hand anchor.

The design preserves the published reference-frame logic by manipulating both cue side and eye/hand arrangement. Standard trials keep the eye and hand anchors on the same horizontal side, whereas generalized trials place them on opposite sides. This allows the runtime to audit compatibility in eye-centered and hand-centered frames while keeping the participant interface simple enough for desktop execution.

All participant-facing text lives in the YAML configs, while the state machine, stimulus placement, and trial timing are handled in code. Trial-specific positions and durations are derived deterministically from the block seed and trial id, which makes the task reproducible across human, QA, and simulation modes. This structure supports both experimental use and traceable validation of the anti-reach logic.