Removes all 353 em dashes across the task, the quiz prefixes becoming
"Correct:" and "Not quite:". Also untracks the study documents a git add -A
swept into main, and adds the script that built this commit.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Deploy: counterbalance the side within a block, fix the feedback capital
Each block now puts the pair's first letter on the left for exactly half its
trials and its second for the other half, shuffled, matching the 20-trial
PsychoPy scheme. Applies to the dyad arm and the SONA arm. The quiz feedback
sentence is recapitalised after its prefix is stripped.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Deploy: record the trial landmarks, the quiz feedback and the clicks
stim_onset/outcome_onset plus the two interval columns, from stamps nicewebrl
was already writing; the quiz feedback text; partner_relation; and the screen
recorder fix that was losing every click count and the timing file's rt.
Also deals the partner code and avatar from the pool instead of per session.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Deploy: stop a parent and child meeting the same stranger
partner_id_for and partner_avatar_for now seed off rando, so a parent playing
under their first child's pid no longer gets that child's partner. The match
reveal records the partner it showed and export_csv prefers it, keeping the
three sessions already collected readable. Also carries the per-child bearid
fix to the BEAR sheet tooling.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Deploy: 16-trial redesign, chest/counterbalancing fixes, pilot bug fixes
Squashed deploy snapshot of main (items 23-30 in PROJECT_LOG.md), built
without the tracked reviewer-instructions .docx: Hugging Face's git
endpoint rejects pushes containing binary files (Git LFS/Xet only), and
this history carried two .docx blobs. The doc isn't needed by the running
app -- it stays tracked on `main` and backed up via `origin`, just left
out of what's pushed here. See PROJECT_LOG.md on `main` for the full,
unsquashed commit history and rationale.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Illustrated instruction slides, randomized partner avatar, and quiz polish
- Split the cover story into 4 screens (intro, explorer picker, twist +
matching reveal, money/goal) and each how-to-play bullet into its own
screen, each with a purpose-built illustration (sprites.py).
- Add a randomized-per-participant partner avatar (4 muted looks), shown
at the matching reveal with a transparent background and used
consistently everywhere the partner appears in-game; logged in the
CSV/GitLab randomization log.
- Practice: keep the meadow visible behind the "press space to continue"
banner after the rating screen, instead of a full-screen takeover.
- Quiz: remove "you" bolding except for you-vs-partner contrasts, restyle
with playful colors/emoji, and add an illustration per question; add a
houses visual to the "You're all set!" screen.
- Wording: "relatively" -> "pretty reliable" in practice narration.
- Add a dev shortcut (?dev=1&start=questionnaire) to jump straight to the
post-game questionnaire for testing.
Co-Authored-By: Claude Sonnet 5 <no…
Instruction rewrite, parent/child role, post-game questionnaire, and bug fixes
- Reword confusing/redundant instructions; split HOW_TO_PLAY into 3 shorter
screens; clarify that chest identity (not side) matters and stays
consistent all game but isn't 100% deterministic per trial.
- Add parent/child role selection at ID entry (URL param, storage, and
CSV/GitLab logging); "young person" wording now only applies to child
participants.
- Add post-game questionnaire (strategy, motivation, effort, task rating,
belief check, hypothetical parent/child battery), ported from the sibling
PE task's pattern.
- Sound: replace the on/off toggle with a No sound/Chimes/Retro picker.
- Add persistent Fullscreen button so participants can re-enter fullscreen
after exiting it.
- Fix: chest lids could stay visually open after an error in the per-step
overlay-clear hook; a held arrow key on house entry could auto-select a
chest (now requires an explicit SPACE press); mashing SPACE during the
outcome screen could wipe the coin feedback before the minimum view time;
…
Make the export RL-model-ready: chosen_option column + pyem_data loader
- export_csv now writes chosen_option (the chosen letter A-D) alongside chosen_side — this is
the 'choices' input the pyem RL models want (rl_hp.py); OG encodes the choice the same way
(key_resp.keys side + option_left/right letters, no ready chosen-letter column).
- new pyem_data.py: load_subjects()/to_all_data() turn the GitLab *_data.csv into the exact
(12,20) arrays each rw*_fit expects (choices letters, outcomes_self/other in {-1,0,+1},
option_pairs (12,20,2) letters), main-task trials only. Verified end-to-end on demo data:
every chosen letter is one of the two shown, all 240 cells filled.
- CODEBOOK documents chosen_option.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Decouple the experimental block order from house location, like the original task:
- the Nth house ENTERED gets the Nth pair in a fixed per-ID block-order sequence (env now
tracks current_block/blocks_entered; pairs/outcomes/side/attention/float indexed by block)
- house appearance + position stay physical; positions come from 1 of 5 fixed layouts
(number % 5, counterbalanced)
- new per-block float_order (6 you-first / 6 partner-first) for the upcoming coin animation
- DATA: blockIndex is now the experienced block (0..11); added physical_place/physical_house/
float_order per trial + house_by_block/place_by_block in summary; rando log gains
layout_id/block_order/float_order/attention_blocks. CODEBOOK updated.
- verified: orders self-tests, smoke (12x20 all rated), demo playthrough + export, clean boot
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- display name 'Treasure Hunt for Two' -> 'TreasureHuntForTwo' everywhere it's shown
- index(): if ?pid=X differs from the stored pid (same browser reused for a new kid), wipe
per-user storage (new seed -> new data file) and clear saved stage state, so two
participants on one computer never get merged into one file
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Attention check (21st trial in 2 random houses) + post-hoc quality flags
- new M_ATTENTION env mode: after the 20 trials, 2 deterministically-chosen houses show
'Press the LEFT arrow key to show you're paying attention'; any key advances (no trap),
the key + RT are recorded
- orders: 2 random attention houses per pid (none in practice)
- export: 'attention' rows (block, key, correct, rt) + summary attention_passed/total
- quality_flags.py: flags incomplete / fast-RT / side-bias / failed-attention participants
(surfaces for review, does not auto-exclude)
- CODEBOOK documents the attention rows + summary fields
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Add anonymous 'matched partner' ID to the cover story (deterministic)
- orders.partner_id_for(pid): stable, anonymous community-database code (cover story only)
- shown on the cover page ('matched with Partner #4421') and again on the finish screen
- recorded in the rando log + CSV summary (partner_id) for transparency
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Rename: Duo Treasure Hunt -> Treasure Hunt for Two
- rename block_order -> pair_by_place (it's the pair per place slot, NOT visit order)
- house_assignment -> house_by_place using house NAMES (matches the data CSV)
- add A_stim_desc..D_stim_desc (readable chest look) + group label + pos_by_place
- add houses_done / completed / last_saved (append_to_log now upserts in place, so the
log row reflects the latest progress; skips the commit when nothing changed)
- migrate_rando_log.py: one-time rewrite of the existing log into the new schema (done)
- CODEBOOK updated to document the new log columns
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Fix data-loss: GitLab is the guaranteed sink + per-house checkpoints
ROOT CAUSE: save_data() early-returned without Google creds, so the FINAL save at
'Adventure complete' did nothing; GitLab only got data from the periodic timer, so the
end of a session (or any restart) was lost (e.g. pid 0003 froze at house 3).
- _export_and_push_gitlab(): shared, Google-independent primary sink
- save_data() always pushes to GitLab; checkpoint_save() pushes after each finished house
- periodic safety push 120s->60s; final save retried 3x; track houses_done
- kid-friendly 'Pause' button moved top-right (clear of fullscreen toggle), minimal text
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>