Spaces:
Running
Running
Commit History
30 days ago
-
Stop a late web_app import from 500ing the participant's page Running
The container runs `python web_app.py`, so web_app is __main__ and is not in sys.modules under its own name. `from web_app import log_event` inside a function therefore does not find the running module: it builds a SECOND copy and executes its body again, mid request. That body registers NiceGUI startup handlers, and NiceGUI refuses once it has started: RuntimeError: Unable to register another startup handler. NiceGUI has already been started. which reaches the participant as a 500. I introduced this in 51ba07c while fixing the same bug in screens.py: the screen timing went in through three `from web_app import log_event` calls, in questionnaires._fb, effort_stages._fb and _comp_round. A participant hit the 500 on 2026-11-03, reopened the study in a new window and could not get past the avatar screen. screens.watch already takes its logger by registration, so the imports were never needed: web_app calls screens.set_logger(log_event) as it loads and the `log=` argument only …78de84e
-
Carry the answer and whether it was right into the timing rows
PsychoPy writes <component>.keys and <component>.corr beside the onsets, so a quiz question's row says what was pressed and whether it scored. The timing file had the onsets and the rt and neither of those. Both tasks now write keys and corr. corr is 1 or 0 on a question with a right answer and blank everywhere else, which is what PsychoPy does. keys is the response where there is one and falls back to whatever closed the screen. In the hunt that is each of the seven quiz questions. In harvest it is each comprehension question, in both the main round and the night watch round, which share one _comp_round; a wrong answer re-asks the question in a later round, so the round number is in the component name or the retries would overwrite each other. screens.py no longer touches app.storage.user directly. It raises outside a page builder, which is where the unit tests call from, and a recorder that can take a session down is worse than no recorder, so every access falls back to a process-…ecc987b -
Time every screen, not just the clicks inside a harvest
This task timed almost nothing. A harvest screen recorded the first and last click on its boxes, and that was all. The instruction pages, the calibration, the practice, the quiz, the comprehension rounds, the night blocks and every questionnaire battery produced their answers with no clock on them, so a session's length could not be split into where it went. Every stage in effort_stages and questionnaires is built by the same _fb factory, so wrapping that one function covers the whole task. The intro pages are wrapped where they are shown, and a page revisited with Back is its own record, or the revisit would read as one very long page. Each record carries enter, exit, dwell, how many clicks it took and how long until the first one, which is the response time for a screen whose answer is a click. Clicks are logged for the first time here, ported from task_sl-cu-nicewebrl, each tagged with the screen it happened on. export_timing writes <base>_timing.csv, one row per screen in the or…4db8278
-
One left edge for every statement and its scale
The TriPM and demographics pages centred the instruction, the statements and the Continue button, so each statement sat over the middle of its own scale and a short one could end up on the line above its options. Both pages now put the whole list in one left-aligned 600px column: statement, its scale on the next line pulled flush by the radio's own 10px of inner padding, then the next statement. test_a_blank_demographics_page_is_not_an_absent_one sliced a fixed 2600 characters from demographics_stage and lost its assertions when the layout grew; it now slices to the end of the function. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>8b60381
-
Record which game each liked partner belonged to
The belief record carries `kind`, the liking record carried only `where`. Partner numbers run in the order the participant met them and that order is a coin flip, so liking_p1 is the treasure hunt's partner for half the sample and the daytime harvest's for the other half. `kind` is the stable token that says which game; `where` is prose and can be reworded. The analysis maps `where` back for the sessions already collected, so nothing is lost either way. This stops it needing to. Deployed with both data repos quiet for an hour, so no session was interrupted. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>09748bb
-
A blank demographics page looked exactly like an absent one
Found by driving a whole session end to end on the live Space. Every empty answer is dropped from the demographics record, so a participant who declined all twelve questions stored {"measure": "demographics"} and nothing else. That is indistinguishable from a stage that never ran, or from content/demographics.txt still sitting on its placeholder. It records n_items, asked and n_answered now, the way the TriPM already recorded n_items. The run itself: 7468a997cdac870b, four trials a block, Harvest second. It reached Demographics and finished with its metadata file, all twenty-nine stages in order, and the four measures that defer to whichever task finishes second. From the mirror it loads, audits, reaches pyEM and returns parameters, and the dev_mode filter keeps it out of the participant pool. Also measured, because an automated driver made the task look twice as slow as it is: a trial is 12.1 s from startTrial to startTrial with the tab awake. Chrome throttles timers in a background…c20b11d -
The partner questions stay at the end, and every partner has a face
Settled with the researcher: the belief and liking pages belong after everything else, in the same block as the TriPM and the demographics, and deferred to whichever task finishes second. Asking whether the other player was real tells the participant there is something to doubt, so it waits until nothing is left to contaminate. The interim version from earlier today asked them inside each block's battery, which put the day block's question before the night block was played. What was actually wrong is that the pages showed an id and nothing else, and P2-63540 is not somebody a participant can recognise. Each row carries that person's face now. question_partner_rows() is the people list, one row per person; partner_roster() stays the money list, where one row can be two people because their credits land in one purse. The other task's partner is the hard half. An explorer redrawn as a farmer is a different-looking person from the one they met, so the picture comes from the app that drew…f52b886 -
Say who every screen is for, and ask about each partner where they were met
Eight items from the 18 October playthrough. The rest phase drew the word "Rest" while the work phase drew "WORK for YOU" or "WORK for your PARTNER". Resting on a partner round pays the partner the rest credit, so the one screen that named no beneficiary was a screen where the beneficiary was the point. restPaysOther() answers it, and it is not paysOther(): the night harvest, night 1 and the harvest-speed block all carry beneficiary "other" and pay the participant. The outcome screen dims the whole board, so the farmer and the partner who were standing in the scene are both behind it. It draws the person it pays now, and both of them on a night-harvest outcome. The live canvas drew one fixed partner palette, so the person by the field was not the person the matching screen had just revealed and the night block's new partner looked exactly like the day one. cfg.partnerAvatar carries the index, picked off the partner id each block already passes. Belief and liking are per block, at t…f54e080 -
A period, not a semicolon
The consent fix for the RA's run-on introduced one, and the October log section had four more. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>64b04ea -
The RA playthrough, item by item
Two consent typos, a themed version of the 10-second rule, and three things about the task itself. The arrow prompt was 13px. An RA read it, pressed an arrow expecting to move a cursor, and took the round starting as the task skipping past the selection step. It is 17px now, in a pill measured from the text, and it says the press is the choice; the work-or-rest slide and the screen before the first card say the same thing in words. The harvest and the empty-soil click sounded like they played together because they nearly did: clearing a field is a burst of SPACE, and the press after a successful one lands on the soil it just cleared. The click is quiet for 220 ms after a stalk comes in. Submit and Back stayed on screen beside Continue once a quiz answer was in, greyed out but still there. They take turns in one row now. The last item was a blank strategy answer "sending me back to the beginning of the quiz". The data half is the push bug, fixed in cb6f294: that whole night battery …280712f
-
The liking question's bold markers showed as asterisks
_slider_battery bolds the whole prompt, so the ** around the partner id nested, and the question rendered as "*P2-69469, the person you played with in the daytime harvest?*" in italics with the markers visible. Found by playing it. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>c90512d -
One belief page about every partner, and a points screen per block
From our user's second review of the run. The belief question is asked once, at the end of the study, about every partner, one Yes/No each, in words that fit what could happen to that person. Split across the two batteries it was asked twice and still missed a partner each time, because the other task's partner belongs to neither battery. A liking slider per partner sits with it, since both are about the people rather than about either task. Both defer to whichever task finishes second, the way the TriPM and demographics already do, so the handoff's partner rows now carry a fourth field saying what kind of partner each one was. Three fields still decode, so the two deploys can straddle. Each block has its own points screen before its own questions, naming only that block's two people: the day pair kept theirs, the night harvest had none at all and its result appeared only on the very last screen of the study. Every screen that says what somebody got now shows that person's picture, …71a8a60 -
Belief checks last, partners on the final screen, and two flashes
From our user's review of the full run. The belief checks move to the very end, after the TriPM and demographics. Asking whether the other person was real, in the middle of a battery, tells the participant there is something to doubt, and everything after it is answered by someone who has just been invited to suspect the study. Nothing follows them now. Both are asked there, each about its own block. The final screen no longer auto-forwards to part 2 after four seconds. That is the only screen that says what the night harvest settled to, and our user was taken away before they had read it. It also reports what the partners ended up with: this task's own, plus the other task's, carried on the handoff as signed pbonus1=/plost1=/psig=. Two numbers, because earning for someone and costing them are different events, and the night harvest only ever takes away. The screen said what the participant got and nothing about anybody else, in a study about what people do to other people. The canv…0063096 -
The correct quiz answer is no longer always the top choice
Every comprehension item was written with the answer first and nothing reordered them. Both quizzes were passable without reading, and the night harvest's quiz is the exclusion criterion, so a fixed order was deciding who counts as having understood the block on an artifact of how the options were typed. Options are now ordered per participant, seeded by pid and item id, so the order is fixed within a session and the retry asks the question the same way round. `correct` moves with the options, `options_order` records where they came from, and the export writes the choice TEXT, so the Qualtrics columns are unaffected. The TriPM is asked in a per-participant order too, with each key travelling with its own item, so tripm_key.csv scores what it always did; the presented order is recorded as item_order. 58 items on one page in one order put the same statements last for everyone, and the three scales are interleaved in the published order, so that cost fell unevenly across them. The TriPM…730c8df -
The consent form names the order it will actually run
Three corrections to both forms. The order was stated as the treasure hunt first, which the combined study randomises, so half the sample read an order they were not going to get. The two tasks are described without an order now, and one sentence states the order this session already resolved. A single-task run says it is decided at random, so no form can reach a participant with an unfilled slot in it. Venmo was never set up. Only an Amazon gift card and PayPal are, in both forms and the prereg. The payment ask is a name, an email address and the reference code from the last screen. The form listed the first two, which read as the whole of it, and said nothing about the code a participant is shown and then asked for. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>64c8bdc
-
Name the night partner, and stop printing the fatigue question twice
Found by walking the two batteries. The night partner showed as "your partner (Player 2)" on the motivation and effort pages and as "your partner (the other player)" on the feelings page. Its id is derived from the participant id, not random, so falling back to a placeholder is never necessary; partner_label_plain derives it when storage has not been written, and the feelings items do the same. The fatigue page used the question as its heading and then asked the question again underneath. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>c204290 -
The post-task battery runs once per block, adapted to each
One battery at the end asked about both blocks at once, which meant the night-harvest items were on a page shown before that block existed in some orders, and every other item was ambiguous about which half of the session it meant. It now runs twice, after the block it asks about. A fatigue slider between the two blocks, as well as before and after. Each battery is framed to its block: NASA-TLX says which harvest to think back to, the feelings items ask about earning for someone in the day and about walking home while they lose in the night, motivation and effort carry only that block's choices, task ratings name the block, strategy asks about that block, and the belief check asks its own partner its own question, into its own column so one cannot overwrite the other. A day-only session is unchanged: the day battery keeps the stage names it was registered with and sits where it always did, and the night battery is skipped with the block itself. STAGE_ORDER gains the eight new stages…9fdb00a -
Requested not forced, and a credits screen that fits the night block
The belief page silently did nothing when Submit was pressed with a blank. The consent says participants are free to refrain from answering any question, and every other page in the battery already asks "are you sure" before letting an unanswered one through; this one just looked broken. It now asks the same question. Both credits screens said "You earned 0 credits for your partner" about the night partner. Nothing the participant does in that block can raise their total, only hold down what they lose, so that sentence describes a game that was never played. Both now say how much that partner LOST of their 150 and what they keep, with the number of drawn nights underneath. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>d5561a7 -
The belief items stop equating the gain with the loss
"would really lose the credits you took" says the partner's loss equals what the participant pocketed. They take 2 and the partner loses as much as 20. That is the 1:1 reading the task is built to avoid, and it would have been the last thing a participant read about the block. It asks about the credits SHOWN now. The two items are parallel and each names its block: "During the daytime harvest..." and "During the Night Harvest...". The heading is Your Partners when there are two, and the day partner is named only then, since with one partner there is nobody to tell them apart from. The tests read the prompts with adjacent string literals joined. They are built from f-string fragments across several lines, so a substring search for a sentence was failing on the line break rather than on the wording. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>0404cb1 -
Say what running out of time costs, and let start=end reach the end
A failed harvest printed "for you, out of their loss" under "Didn't finish in time!", which says the participant was paid out of a loss when they were paid nothing, and never said why the partner's number was the big one. It now reads "You keep nothing" over "Your partner loses 20 credits, the same as if you had rested". The rule was also never stated before they played. Slide 2 now says it: choose WORK and fail to finish, you keep nothing and your partner loses the whole amount. ?start=end and ?start=credits now skip the optional blocks. With watch=1 they dropped you into four guided nights and a quiz on the way to the questionnaires, which is not what jumping to the end means, and is why the post-task screens looked missing. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>d2185e8 -
A belief check for the night partner
The one item asked whether the other person would RECEIVE the money you earned for them. That describes the opposite of the night harvest, where credits are taken from them, and with two partners it no longer said which one. The prereg rests an exclusion criterion on this item, so for the night block it was resting on a question about a different person and the opposite direction of money. Second item, shown only when the block ran, naming that partner and asking whether they believed the credits were really lost. Submit waits for both. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>9dc5cc3
-
Night Harvest: four slides, a partner search, and cards you can read
Renamed throughout, participant copy and code. "The Last Field" is gone. The instructions are four screens with Back and Next instead of one wall: the pairing, the choice, the ranges, the money. Slide 1 carries the pairing alone and runs the same partner search the day task uses, for the night partner and its own avatar: being told you have a new partner and then seeing no search read as a relabelling of the first one. The cards lost everything that is not a number. Gone: the gloss under the title, the "for certain" caption, the box count as a sentence. What is left is the title, YOU and THEM, one line each. The emoji sat at y+40 with the title under it and the two overlapped at this card height; it now sits beside the title, measured. Each card still shows only ITS OWN side's amount. The requested "THEM: keep 18, lose 2" cannot work: the 18 is the rest-side loss minus the work-side loss, so on a night where the rest side is the vague one that figure becomes a range and the work car…121f140 -
A third loss level, and self-report items for the last field
Losses of 8, 14 and 20 against 2, so the harm averted spans 6 to 18. The low end is where this block is weakest: at a harm weight of 0.25 a participant works on 8.5 of 48 trials when the most that can be averted is 12, and on 13.5 when it is 18, and below about 4 there is no gradient left to fit. That is the CU range. The certainty 2x2 stays. Earlier I read "crossing the work side adds no precision" as "the work side is idle" and proposed dropping it. The crossing is not there for precision: when the rest side is vague a general preference for the stated option pushes toward working, when the work side is vague it pushes toward resting, so the two cancel and what survives is the partner-specific discount. That is the control standing in for the self arm. The simulation that showed no gain had no such preference in it. It does now, and reports how far the discount lands from the truth with and without the crossing. The grid is 3 x 2 x 2 x 4 = 48 cells at one visit each, which is how th…2c5e024
-
Practice nights and a quiz before the last field counts
The block ran its first live trial as the first time anyone saw these cards. For an antisocial condition that is the worst place to be learning the layout, because a participant still working out who loses what produces choices that read as indifference, which is the pattern the hypothesis predicts. Three guided nights, banking nothing: a REST so they watch their own credits rise while the partner loses 14, a WORK so they see the smaller pay and the smaller loss, and a REST with the rest side shown as a range so the reveal is not a surprise on a night that counts. All three use the biggest loss. Two quiz items, on who loses what under each option, re-asked with the explanation until both are right and capped at four attempts so nobody is held at a screen. Both distractors on the REST item deny the harm, which is the one belief the design depends on. The attempt count is saved, which is what makes this usable as the prereg's exclusion criterion. The main comprehension quiz could not …e863dec
-
The last field, and the partner id in brackets
The night block's work phase is harvesting, so the story had to be about a field. The other player has one field still standing that has to come in before morning. Take a bagful from the edge and walk home with 2 credits, and the rest of their crop is still standing at dawn, which costs them 8 or 14. Bring their field in to their barn, which is work and pays nothing, and they lose only the little that is always lost. Same payoffs as the version checked in analysis/open_field_recovery.py, same 2x2 over which side's loss is stated. Every mention of the partner now reads "your partner (P2-46501)". A bare "P2-46501's field is still standing" makes the reader decode a code before they can read the sentence, and the uncertainty block's second partner put two codes in one session. partner_label_plain() takes which=2 for that one, and the sprite label gained brackets for the same reason. The uncertainty intro was still quoting D.REST_CREDIT, so it promised 2 credits for resting while its car…afb3162
-
Fix the skip dialog, the skipped-page record, and a stray capital
The "you haven't answered everything" dialog was dismissable by ESC or a backdrop click, which set neither button's event: the awaiting Continue handler never returned, the dialog vanished, and the click looked like it had done nothing. It is persistent now, and deleted afterwards rather than left in the page -- four of them had piled up by the end of one questionnaire run. Every slider starts at 50 and "Continue anyway" records that as an answer, so a 50 in the data could be a considered midpoint or a page nobody touched. Each item now carries a _touched flag. It reaches the raw per-stage record; adding the columns to qualtrics_template.csv would carry it into the CSV too. And "You earned 0 credits for Your partner (P2-82078)" -- the label is only ever used mid-sentence. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>650a45a
-
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 -
Consent buttons, earnings on the final screen, and a warning that sides swap
Consent now ends with "I consent to take part in this study." and Yes / No buttons rather than agree / do not agree, and the phrases a participant should not skim past are marked in bold red: that a computer is needed, the 2 SONA credits, and both bonus figures. The partner screen bolds who the partner is rather than the pronoun. The helper that supplies "your age" was emphasising itself, which nested inside the new bold and rendered its markers literally. REST no longer shouts YOU, since the contrast on that screen is work against rest, not self against partner. Earnings appear on the final screen. They were shown only on the bridge between the task and the questionnaires, so a participant reaching the end by any other route never saw them, and nobody saw them again after twenty minutes of questionnaires. This reverses an earlier decision that they should not repeat there, and the test that encoded it is updated rather than deleted. The conversion now lives in one function; it was w…963e8ea
-
Rewrite the instruction and quiz copy
Emphasis now marks quantities rather than pronouns. The screens bolded every "you" and "your", which competes with the one contrast the task is built to measure; capitalization carries YOU against YOUR PARTNER instead, and bold is left for the credit amounts and the ten-second limit. Screen changes: the partner screen is headed "You've been matched!"; the choice screen is "Work or Rest" with one bullet per option; the practice screen is a single line, since each practice round already carries its own prompt and listing them first spends attention before the participant has done anything; the block intro drops its closing sentences. Quiz: "Let's check your understanding!", a "Quiz (3/5)" counter, full-sentence options ending in a period, and the partner always written as YOUR PARTNER to match the round banner. The retry screen no longer repeats the instructions the participant has just failed to apply, which was a wall of text at the moment attention is lowest. Items were re-read aga…11ad76e
-
Split the consent form by dyad mode, and widen the income bands
The IRB form consents a parent about themselves and their child. The SONA sample has no child, and telling an undergraduate that "whether or not you and your child take part is up to you" is simply wrong, so there are now two forms: consent.md without the family wording and consent_dyad.md with it, selected by dyad_mode. The mandated-reporter clause mentions child abuse and stays in both; it is a legal notice, not dyadic framing. A missing dyad form does NOT fall back to the neutral one. Substituting would consent a parent on a document that never mentions their child, which is worse than showing no form at all and stopping. Income moves to 10k bands from $5,000, keeping the wide $90,000-$179,999 and over-$180,000 categories. One band spans $75,000-$89,999 so the 10k run meets $90,000 cleanly; adjust that line if a different top structure is wanted.bae2aef -
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
-
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
-
Wording tweaks, sl-cu-matched hypothetical-stage phrasing, and credits/money screen moved before questionnaires
- "Matched with a partner" -> "Random Partner Assignment" - Practice heading: drop the yellow-circle emoji, "Great job! Let's practice!" - Comprehension quiz: clarify that adding to the (partner's or your own) bonus means real money - hypothetical_stage now titles the page "Your parent"/"Your child" and uses sl-cu's exact intro wording ("In the meantime, {who} played the same game. How do you think they did?") - New credits_bridge_display() shows the credit totals + money-conversion + finish-splash picture right as gameplay ends (QuestionnaireTransition stage), mirroring sl-cu-nicewebrl's show_coins_bridge(); the true final screen (web_app.finish_experiment, already simplified in a prior commit) no longer repeats this content Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>d83c32c -
Preserve already-entered answers on Back, lock quiz Back after submit
- questionnaires.py: went_back returns for nasa_tlx/effort_impact/motivation/ effort_exerted/task_rating/hypothetical (first battery)/belief/strategy now include the already-collected values instead of discarding them, so a last-record-wins export doesn't blank a good answer just because the participant clicked Back afterward. - questionnaires.py (_ask_mc): disable the Back button once an answer is submitted for the CURRENT quiz question, so a participant can't see the correct-answer explanation and then re-attempt with the answer known. Back to a previous already-answered question is unaffected. - questionnaires.py (fatigue_stage): trim the "post" intro since the new QuestionnaireTransition screen right before it already says the game is over. - test_back_navigation.py: replace a near-tautological or-joined assertion with two real ones, and make the file read path-independent. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>e8e2c75 -
Add themed icon to each comprehension quiz question
a9a68b2 -
Add cross-stage Back navigation to the post-task questionnaire chain
_slider_battery gains allow_back and now returns (values, went_back); nasa_tlx/effort_impact/motivation/effort_exerted/task_rating/belief/ hypothetical/strategy stages wire Back to _go_back_one_stage(). Fatigue stays Back-disabled by design. self_esteem_stage's call site (not part of this chain) is updated to match the new return shape so it doesn't break. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>d818021 -
Fix Task 1: Add precondition documentation and comprehensive Back navigation test
- Document idx >= 2 precondition in _go_back_one_stage() docstring (required by experiment framework stage ordering; idx < 2 cases don't rewind correctly) - Add test_comp_round_back_navigation unit test that directly verifies Back logic with mocks: user goes back on Q2, Q1 is re-asked, both eventually answered - Clean up dead code from test file (unused with block, unused imports) - Simplify integration test to verify quiz page loads (full UI interaction testing requires real browser; unit test now covers the critical Back mechanism logic) Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>24c3f5a -
Add comprehension quiz Back navigation + fix 'YOU round' wording
- Add _go_back_one_stage() helper function for cross-stage rewind primitive - Fix "YOUR round" -> "YOU round" wording in comp_who_self quiz prompt - Add optional Back button to _ask_mc() with can_back parameter - Rewrite _comp_round() to support within-quiz Back navigation - Add test_back_navigation.py with wording and integration tests Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>32bd232
-
Theme remaining corn/harvest references in questionnaires.py
Per explicit human ruling (extending beyond the original spec's stated non-goals): nasa_tlx_stage()'s intro/prompts and strategy_stage()'s prompt still said "harvesting the corn" regardless of theme. Themed using the same th['verb']/th['target'] pattern already established elsewhere in this file (comp_items()/comp2_intro()). The Qualtrics export_text (byte-exact CSV compatibility, e.g. comp_items()'s "I still have to harvest corn") and comments are untouched, as those are deliberately fixed forever.bb47cd8
-
Add child/parent role, hypothetical cross-role questionnaire, and theme selection
Adds a required Child/Parent role field at session start (logged, URL-reflected), role-conditional partner-matching wording, a bigger post-task questionnaire (expanded motivation/effort battery, task ratings, belief check, hypothetical cross-role battery, strategy free-text), and a same-mechanic theme system (harvest/jellyfishing/firefly-catching/boxes) selected via ?theme=. Also fixes the "effortful" slider wording, drops the mid-task score reveal, adds an explicit end-of-task screen with a Close button, and clarifies the controls callout in the instructions. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>46d9ff4
-
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
-
Aversive harvest, sounds, clarity, untimed decision, changelog
- Harvest now click-per-corn (no auto-collect on walk; discrete SPACE press each) - Removed 4s decision deadline + all "too slow" copy; repurposed quiz Q1 - Emphasized countdown: HUD seconds + big central number + HURRY in final secs - Decision cards: "WORK/REST for YOU/your PARTNER" + highlighted reward pill; work HUD echoes who you're working for + "X credits for N corn" - Beneficiary light-up: YOU or partner glows on each harvest - Sounds (synth WebAudio): walk, harvest, ka-ching, fail, hurry, button, sip, bark - Removed "Set-up" heading from PID screen - CHANGELOG.md added; images/ refreshed Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>c15b906
-
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 -
Game + flow overhaul from playtest feedback
- Fix stuck main task: forgiving harvest (radius-1 + auto-collect on walk), hardened rAF loop (try/catch), feedback auto-advances + SPACE to continue - Avatars: 10 varied farmers (gender-coded + neutral, skin tones, glasses, fox mask, princess crown, mushroom); fix partner nameplate clipping - Cover splash (welcome = picture only) + finish "Harvest Complete!" splash - Reordered flow: welcome -> choose farmer -> How to play (2 slides, Back/Next) -> Warm-Up (renamed calibration, no thank-you) -> Practice -> Quiz -> Ready -> Morning Harvest -> Break -> Evening Harvest (block order randomized per pp) - Instructions rewritten for 10-17yo, highlight work-vs-relax choice - Quiz: SL-style (advance regardless), per-question explanations, greyed submit - Removed unused consent/SL-instruction text Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>729d3a8 -
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