|
1 | | -# Probabilistic Stimulus Selection Task |
| 1 | +# Probabilistic Stimulus Selection Task (HTML Preview) |
2 | 2 |
|
3 | | -## Overview |
| 3 | + |
4 | 4 |
|
5 | | -This snapshot mirrors the browser companion task `H000040-probabilistic-stimulus-selection`. |
6 | | -It preserves the kana-based learning and transfer logic from the local canonical build while running inside the shared browser runner. |
| 5 | +| Field | Value | |
| 6 | +|---|---| |
| 7 | +| Name | Probabilistic Stimulus Selection Task | |
| 8 | +| Version | html (v0.1.0-dev) | |
| 9 | +| URL / Repository | https://github.com/TaskBeacon/H000040-probabilistic-stimulus-selection | |
| 10 | +| Short Description | Browser companion for the kana-based probabilistic stimulus selection task with learning and transfer phases, psyflow-web trial-context stamping, and a local monotonic trial-id counter | |
| 11 | +| Created By | TaskBeacon psyflow-web py2js port | |
| 12 | +| Date Updated | 2026-04-04 | |
| 13 | +| Modality | Behavior | |
| 14 | +| Language | Chinese | |
7 | 15 |
|
8 | | -## Task Flow |
| 16 | +## 1. Task Overview |
9 | 17 |
|
10 | | -1. Instructions explain the left/right response mapping. |
11 | | -2. Learning trials present AB, CD, and EF pairs with probabilistic feedback. |
12 | | -3. The learning block stops early only when the criterion is met. |
13 | | -4. Transfer trials present all pairwise combinations without feedback. |
14 | | -5. A final screen ends the task and exports the data. |
| 18 | +This HTML companion mirrors the local `T000040-probabilistic-stimulus-selection` task. Participants learn three probabilistic symbol pairs during a training phase and then complete a transfer phase with no feedback. The browser port keeps the same left/right response mapping, kana symbol assignment, learning-versus-transfer logic, and score semantics while using the current psyflow-web APIs and a local monotonic trial-id counter for browser runtime stability. |
15 | 19 |
|
16 | | -## Configuration |
| 20 | +## 2. Task Flow |
17 | 21 |
|
18 | | -- Six kana symbols are randomized across roles A-F per participant. |
19 | | -- Learning probabilities are AB 80/20, CD 70/30, and EF 60/40. |
20 | | -- Response keys are `A` for left and `L` for right. |
21 | | -- The preview uses shortened counts so the browser version stays compact. |
| 22 | +### Block-Level Flow |
| 23 | + |
| 24 | +| Step | Description | |
| 25 | +|---|---| |
| 26 | +| Load Config | Load the browser preview config. | |
| 27 | +| Show Instructions | Present the Chinese instruction screen. | |
| 28 | +| Assign Symbols | Randomly assign the six kana symbols to roles A-F for the current participant. | |
| 29 | +| Run Learning Block | Present AB, CD, and EF trials with probabilistic correctness feedback. | |
| 30 | +| Check Criterion | Evaluate whether the learning block meets the pair-specific accuracy criteria before transfer. | |
| 31 | +| Run Transfer Block | Present the 15 pairwise transfer combinations with no feedback. | |
| 32 | +| Finalize | Show the final score and export data through the shared runner. | |
| 33 | + |
| 34 | +### Trial-Level Flow |
| 35 | + |
| 36 | +| Step | Description | |
| 37 | +|---|---| |
| 38 | +| Choice Display | Two kana symbols are shown side by side, one on the left and one on the right. | |
| 39 | +| Choice Response | The participant presses the left or right response key. | |
| 40 | +| Learning Feedback | Learning trials show `正确` or `错误` feedback. | |
| 41 | +| Transfer Interval | Transfer trials skip feedback and proceed directly to the ITI fixation. | |
| 42 | +| Inter-Trial Interval | A short fixation separates trials. | |
| 43 | + |
| 44 | +### Controller Logic |
| 45 | + |
| 46 | +| Feature | Description | |
| 47 | +|---|---| |
| 48 | +| Pair scheduling | The learning phase repeats AB/CD/EF pair trials with pair-specific counts and a fixed safety cap. | |
| 49 | +| Symbol assignment | Six kana symbols are shuffled into the six roles once per participant. | |
| 50 | +| Learning feedback | Correct-role choices are sampled against pair-specific win probabilities. | |
| 51 | +| Transfer test | Transfer pairs are shown without feedback to measure learned preference. | |
| 52 | +| Adaptive control | The learning block stops early only when the criterion is met. | |
| 53 | + |
| 54 | +### Other Logic |
| 55 | + |
| 56 | +| Feature | Description | |
| 57 | +|---|---| |
| 58 | +| Trial context | Every participant-visible screen emits trial context through the current psyflow-web wrapper before `show()` or `captureResponse()`. | |
| 59 | +| Trial ids | The browser port uses a local monotonic trial-id counter instead of importing `next_trial_id` from `psyflow`. | |
| 60 | +| Deterministic preview seeds | Block seeds keep the preview reproducible across QA and simulation runs. | |
| 61 | +| Data semantics | Each row records pair ID, symbol roles, response key, correctness, feedback state, and score update. | |
| 62 | + |
| 63 | +## 3. Configuration Summary |
| 64 | + |
| 65 | +Settings are defined in `config/config.yaml`. |
| 66 | + |
| 67 | +### a. Subject Info |
| 68 | + |
| 69 | +| Field | Meaning | |
| 70 | +|---|---| |
| 71 | +| `subject_id` | Numeric participant identifier supplied by the shared runner. | |
| 72 | + |
| 73 | +### b. Window Settings |
| 74 | + |
| 75 | +| Parameter | Value | |
| 76 | +|---|---| |
| 77 | +| `window.size` | `[1280, 720]` | |
| 78 | +| `window.units` | `pix` | |
| 79 | +| `window.screen` | `0` | |
| 80 | +| `window.bg_color` | `black` | |
| 81 | +| `window.fullscreen` | `false` | |
| 82 | +| `window.monitor_width_cm` | `35.5` | |
| 83 | +| `window.monitor_distance_cm` | `60` | |
| 84 | + |
| 85 | +### c. Stimuli |
| 86 | + |
| 87 | +| Name | Type | Description | |
| 88 | +|---|---|---| |
| 89 | +| `instruction_text` | text | Chinese instructions explaining the left/right symbol choice task. | |
| 90 | +| `block_ready` | text | Brief ready screen shown before learning and transfer blocks. | |
| 91 | +| `iti_fixation` | text | Central fixation marker shown between trials. | |
| 92 | +| `feedback_correct` / `feedback_incorrect` | text | Learning-phase correctness cues. | |
| 93 | +| `good_bye` | text | Final exit screen shown at task completion. | |
| 94 | +| `kana_1` through `kana_6` | text | Hiragana symbols assigned to roles A-F. | |
| 95 | + |
| 96 | +### d. Timing |
| 97 | + |
| 98 | +| Phase | Duration | |
| 99 | +|---|---| |
| 100 | +| `timing.ready_duration` | `1.0 s` | |
| 101 | +| `timing.response_timeout` | `2.0 s` | |
| 102 | +| `timing.feedback_duration` | `0.5 s` | |
| 103 | +| `timing.iti_duration` | `0.5 s` | |
| 104 | + |
| 105 | +### e. Browser Preview Differences |
| 106 | + |
| 107 | +| Parameter | Meaning | |
| 108 | +|---|---| |
| 109 | +| `task.total_blocks` | Shortened to 2 for preview. | |
| 110 | +| `task.learning_trials_per_pair` | Shortened to 2 for preview learning. | |
| 111 | +| `task.transfer_trials_per_pair` | Shortened to 1 for preview transfer. | |
| 112 | +| `task.max_learning_blocks` | Set to 1 so the preview reaches transfer quickly. | |
| 113 | +| `task.left_right_balance_policy` | Uses `random_within_block` to allow the short preview transfer block. | |
| 114 | +| `task.total_trials` | Shortened to 21 for the compact preview. | |
| 115 | + |
| 116 | +## 4. Methods (for academic publication) |
| 117 | + |
| 118 | +The HTML companion presents the same probabilistic stimulus selection logic as the local PsychoPy build, but inside the shared browser runner. Participants learn three symbol pairs with different reward probabilities during the training phase and then complete a transfer phase that tests learned preferences without feedback. The preview keeps the same stage order, response mapping, score semantics, and trial-context semantics as the local task while shortening the run to one learning block and one transfer block for browser review. |
22 | 119 |
|
23 | 120 | ## Run |
24 | 121 |
|
25 | | -Open the TaskBeacon browser runner and launch `H000040-probabilistic-stimulus-selection`. |
| 122 | +Open the TaskBeacon browser runner and launch `H000040-probabilistic-stimulus-selection` to inspect the preview. |
0 commit comments