Spaces:
Running
Running
Commit History
-
Low-effort trials were dropped from the CSV
The per-trial harvest list is written to {iter}_boxes_{required}, and the template only carried required >= 6. That was survivable when the warm-up produced references in the twenties; it produces about half that now, so a slower participant's four levels are 3/4/5/6, or 2/3/4/5, and most or all of their trial detail never reached the CSV -- intact in the msgpack, absent from the file the analysis reads. Exporting a real pilot session showed 14 such columns being dropped. Adds required 1-5 for all 49 iterations, and a test that every level reachable from any calibration reference has somewhere to land. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>b317e7b -
The effort battery was not reaching the CSV
The NASA-TLX page went from two anchors (easy/hard) to one rating per effort level, and the export still named the two. effort_lvl1..4 exist as columns in the template and nothing had been written to them since the change: the same stale-key-list failure that lost REWARD_ORDER's trials and that the other post-task batteries were converted to a prefix sweep to avoid. The old names stay mapped so older files still export. The _touched flags added yesterday were riding the numeric prefix sweeps, because a bool is an int in Python, and arriving as columns the template has no room for. They are excluded there and summarised instead: one <page>_untouched count per slider page, which is what decides whether to trust a 50. Also pins the credit and bonus columns in a test -- 25 credits to the dollar, capped at $6, matching the bridge screen. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>41d39a5
-
One switch for which study, a night entry point, and readable TriPM columns
?study=dyad or ?study=sona replaces dyad_mode and a separate sona parameter. Two flags could disagree: a dyadic consent form with a SONA ending, or the reverse. SONA is the default, since nobody should be asked about their child unless the link says this is that study. ?start=night enters a night block directly. Checking a night change previously meant playing both day blocks first, because start=harvest skips only the front matter and there was no entry point further in. The TriPM columns are headed by their own statement rather than "TriPM item N". Row two of a Qualtrics export is the question text, so the file could not be read without a separate key beside it. The scoring key stays, since scale and reverse-keying are not in the statement.0d46751 -
Rework the post-task questionnaires and both earnings screens
Effort ratings now cover all four levels rather than only the easiest and hardest. Two anchors were enough when the question was whether effort mattered at all; with the levels recalibrated, and the gap between calibration and the main task still open, whether effort actually felt different across the range is a manipulation check worth having. The TriPM runs on one page with the items in bold and every answer required. Six pages with a counter made one instrument read as six questionnaires and invited people to watch the counter instead of the statements. Demographics now come last, so the session does not end with a 58-item block. The hypothetical-partner battery is skipped outside dyad mode. It asks the participant to imagine the other family member playing, and in a sample with no pairing there is nobody to imagine. Reworded into a question about a stranger they never met it would measure something else. Gender gains a self-describe option with a free-text field, and the ethnici…741a469
-
Reject key flooding, and bring the game rules back in line with the task
Two presses of the same key closer than 50 ms apart are rejected. The previous guard blocked auto-repeat but not a rapid keydown/keyup cycle, and a pilot session logged 3008 key events in one trial at a median gap of 0 ms, reaching 100% success by flooding. That turns a trial from a measure of willingness to work into a measure of input rate, which is the manipulation the whole task rests on. A human's fastest deliberate repeat is around 90 ms, so the threshold rejects machine-speed input and leaves real fast pressing alone. Rejected presses are counted per trial and exported rather than silently dropped, so a flooding participant is visible in the data instead of merely thwarted. GAME_RULES.md still described the pre-redesign task: rest at 1 credit, rewards of 2/6/10, the old effort level names, the removed per-stalk requirement, and a section headed "unresolved" for the hard95 problem that was fixed a month ago. Of its six open issues, two are now fixed, one is built, one has shrunk…8142f1d
-
Export the per-trial rest items as one joined field
Joined rather than split into four columns per trial. This file has one row per participant and 4,200 columns keyed by condition, so testing whether P(rest) depends on which companion was on screen needs a long frame either way; 288 columns would grow the file by nine percent and serve nobody. The proper four columns belong in the tidy trial frame, which is Task 3 of the analysis plan and does not exist yet. The assignment is a pure function of the participant id and the presentation position, so the log is a check that the code did what it claims rather than the only copy. Night 2 has no column: both of its options require identical effort, so it never builds a rest scene. Day task and Night 1 do, which is 72 trials. The test asserts the field reaches a real template column, because a logged field with no column is dropped silently at export, which has happened twice here already.410f57a
-
Ship the real consent form, TriPM items and demographics
consent.md is now the Georgetown BEAR IRB form, converted from the docx rather than retyped. The consent.md that was sitting in the repo root described a different study -- a treasure hunt with explorers and chests, not the harvest task -- and still carried [X] placeholders, so it has been removed rather than left where someone might use it. TriPM is the 58 items in administration order, with tripm_key.csv alongside carrying scale and reverse-keying, because items on their own cannot be scored. Demographics needed two question types the format did not have. Race and ethnicity is select-all-that-apply, since forcing one answer loses anyone who is more than one thing; it exports as the joined selection plus one flag per option so the CSV can be analysed without re-parsing a string. Age, occupation and the 22 income bands are dropdowns -- a radio grid of 22 income bands is a wall, and a select is the same question without it. Every demographic key has a template column, with a test tha…759ad42 -
Add consent, demographics and TriPM stages, driven by content/
The wording lives in files rather than string literals so it can be edited without touching Python, and so an IRB-approved consent form is stored verbatim instead of being retyped. content/README.md documents the three formats. Nothing here ships with any instrument; the item files are placeholders. A file that is missing, empty, or still carrying its PLACEHOLDER line reads as "not supplied yet" and its stage is skipped, so a half-filled folder never blocks a pilot run and never shows a participant a placeholder. In particular a missing consent form means the stage does not exist yet, NOT that the participant refused -- the opposite reading would silently end every session at the first screen. Consent runs before anything is collected, right after the id is known. Declining stops the session without recording data. Demographics and the TriPM go last. Everything before them asks about the task just completed, and the belief check is worth asking while it is fresh; the TriPM is the lo…4f51627 -
Split the effort and motivation ratings by choice, not by win vs avoid
The batteries asked about winning and avoiding losses for self and partner. "Avoid losing" only ever applied to the night blocks, and neither item lined up with what the model contrasts, which is work against rest on every day trial. Ask about the choices participants actually faced instead: work and rest, each for self and for the partner, plus the raid options for whichever night blocks they saw. Raid items are omitted otherwise -- asking someone about raiding a sleeping partner they never met is confusing at best and suggestive at worst. The export listed those keys one by one and still named the old ones, so every new rating would have been dropped on the floor. It keys off the prefix now, which is the same fix the stale REWARD_ORDER needed.03ab770
-
Add dyad_mode, and make condition assignment survive a restart
SONA participants bring their own ids and can quit and restart at will. If a restart reassigns them, the counterbalancing is destroyed silently. The PsychoPy tasks solved this with the Pavlovia shelf: a persistent orderMap keyed by subject id, looked up before assigning anything new. Do it with determinism instead of shared state -- assignment is a pure function of the pid, so a reload, a refresh or a Space cold start all land on the same arm. Nothing is claimed, so there is no race between simultaneous arrivals and no counter to lose. This is the same reason _seed_from_pid had to stop using hash(). Two sources: allocation.csv for the planned study, where the split is exactly balanced because it was dealt in advance, and a hash of the id for ids that were never in the table, where balance is approximate as it is for any per-arrival randomisation. Ids outside the table do NOT pick up a night block from their hash unless the link asks, so a pilot link cannot silently acquire one. dyad_…1f942d5 -
Make the randomisation reproducible, and stop losing trials in the export
_seed_from_pid used Python's hash(), which is salted per process. The same pid therefore produced a different trial order, work side and partner avatar on every server restart, and a Spaces cold start mid-session reshuffled the remaining blocks. Switched to crc32. The regression test spawns fresh interpreters, because nothing in-process can catch this. Counterbalance the night blocks. build_experiment() listed Night 1 before Night 2 unconditionally, so every 'both' participant met Night 1 first and any Night1-vs-Night2 difference was confounded with fatigue and practice. The stage list is fixed at import time and cannot be reordered per session, so both lanes are built and the unused one is skipped, driven by ?night_order=. Pre-register the allocation (make_allocation.py, allocation.csv). A seed gives random assignment, not balanced assignment; a table fixes the split exactly and can be inspected before collection starts. Arms are balanced WITHIN group, since group is recruited rathe…4a98c12 -
Recalibrate the effort levels, and add the optional night conditions
Two changes that share the same files, so they land together. --- Effort recalibration --- Pilot data: hard95 succeeded on 42.6% of attempts, against ~96% in comparable published tasks (EEfRT; Klein-Flugge 2015, who treat that rate as the evidence their calibration worked). Because the harvest is all-or-nothing, half the reward evaporated into failure risk, which the model then absorbed into k -- V_work = R - k*E^2 assumes the reward is certain. Three causes, all fixed: * round(max_boxes * 0.95) == max_boxes for any max_boxes <= 10, so the intended 5% headroom vanished: the hardest level asked for the participant's best-ever count in 8 of 8 sessions. Levels are now forced strictly below the reference and distinct wherever the arithmetic allows. * A harvest rate wobbles ~18% trial to trial, so best-of-two warm-ups is the top of that wobble -- a personal record, not a reproducible capability. The reference is now the mean. (Grip-force tasks avoid this because MVC IS repro…7b59407
-
Export the expanded post-task battery to CSV (was raw-file-only)
Motivation, Effort2, TaskRating, Belief, Hypothetical, and Strategy were being saved to the raw msgpack data file but never reached the exported CSV -- export_qualtrics.py only mapped Fatigue/NASA-TLX/Effort_impact/ comprehension-quiz columns. Appended 19 new columns to qualtrics_template.csv (same pattern already used for the social- comprehension Comp1_Q3/Q4/Q5 columns) and populate them in build_values(). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>0ab9251
-
Keypress logging, banner back, guided practice, quiz tweaks, better bark
- Full keypress log per trial (every discrete press: {t, phase, key}) in msgpack - Decision screen: brought back the coloured top banner (kept the centred "THIS ROUND, YOU EARN FOR X" callout) - Practice: now exactly 4 GUIDED trials (work/rest x self/partner) with a clear "PRACTICE — doesn't count" badge, a glowing guided card, and "choose X this round" prompt; only the guided choice works - Quiz: dropped "(a small amount)"; Q3 -> "My partner — it adds to their bonus"; added Q5 mirror for YOU; appended Comp*_Q5 columns - Puppy bark reworked to a yip (noise transient + bent chirp) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>6298df9
-
Second feedback pass: gate, attention check, social quiz, vibes, polish
- Device/keyboard gate + fullscreen prompt before the game - Attention check stage -> 49_attention_check export column - 2 social quiz questions (partner credits / can partner affect me) with appended Comp1_Q3/Q4 + Comp2_Q3/Q4 columns (template now 3495 cols) - Partner-ID magnifying-glass reveal on How-to-play slide 1 - In-game "YOU" label on player + "Partner <id>" on partner - Morning vs evening harvests get distinct time-of-day skies/sun/colour wash - Back/Next on How-to-play (2 slides) and Warm-Up (2 slides) - Copy: cover no longer "co-op farming game"; removed over-revealing "and for whom" - images/ folder: 9 rendered game stimuli/scenes + index Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>a937d5a -
Cornfield prosocial-effort task: full build
- Real-time canvas game (static/cornfield.js): 4s decision, walk-and-mash harvest (stressful), pleasant active rest (puppy + lemonade), calibration, avatar chooser, visible partner (highlighted on OTHER trials) - Faithful trial design (effort_design.py): 24 cells x 2 blocks = 48 trials, effort 50/65/80/95% of calibrated max, condition->Qualtrics-loop mapping - Stages (effort_stages.py) + questionnaires.py in Qualtrics order: fatigue(pre) -> calibration -> instructions -> practice -> comprehension -> final instructions -> blocks -> fatigue(post) -> NASA-TLX -> effort-impact - Instructions/comprehension wording matched to Qualtrics, adapted to corn - Byte-exact Qualtrics CSV exporter (export_qualtrics.py + qualtrics_template.csv): output identical to a real survey export (3491 cols, 3 header rows) - web_app.py wired to effort task, port 8083, title "The Cornfield" Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>ae6f93b