Align the cued reference game with the original Hawkins et al. experiment - #19
Open
Mandyx22 wants to merge 1 commit into
Open
Align the cued reference game with the original Hawkins et al. experiment#19Mandyx22 wants to merge 1 commit into
Mandyx22 wants to merge 1 commit into
Conversation
Audited reference-game-hawkins.html against the experiment code and manuscript
behind the paper: OSF osf.io/vzvmf -> github component = hawkrobe/tangrams. The
paper's two variants are "free-matching" (the Clark & Wilkes-Gibbs style board
replication, experiments/tangrams_unconstrained) and "cued" -- "a more
straightforwardly sequential cued variant ... where directors were privately cued
to refer to targets one-by-one and feedback was given on each trial"
(experiments/tangrams_sequential). This file is the cued one.
Changed to match:
- Stimulus geometry. game.core.js lays out SQUARE 300x300px cells and
stimuli/objectSet.js draws every tangram at exactly 0.7x its natural PNG size,
so the shapes are NOT normalised -- one uniform scale preserves their relative
sizes. Cells are square and each image gets width = originalDrawWidth/300 as a
percent of the cell content box, exact at any cell_size.
- scramble_mode: "disjoint" (new plugin option). The original re-rolls both
layouts until no tangram shares a cell between players; plain "independent" left
~1/e of them coinciding, so positional reference sometimes worked by luck.
- Role-keyed feedback_content (new plugin option): the director sees only the
object the matcher clicked, the matcher only the true target, per the paper --
"the director saw which tangram their partner clicked, and the matcher saw the
intended tangram". CSS repaints the plugin's red "wrong" highlight green, since
the original highlights green either way and carries the outcome only through
the score counter.
- Persistent round counter and running score above the board, matching the
original's #roundnumber/#score, with show_running_score off.
- Instruction wording from client_onjoingame. Only edit: the original tells both
roles they may "talk to the director", a copy-paste slip, so each role now names
the other.
- Typing indicator, built on the multiplayer API rather than forking the plugin.
The original has one ("Participants saw a binary indicator that their partner
was currently typing"; sharedUtils/clientBase.js playerTyping).
Already correct and left alone: 2 players, fixed roles, 6x2 grid, 72 trials as 6
shuffled blocks of 12, per-trial re-scrambling, cued target, unrestricted two-way
chat, per-round chat log, the messageSent click gate, the 3000ms feedback window,
and unnumbered cells (the paper removed the numbers for the cued version; the
plugin only draws slot badges when there is more than one target).
Two documented differences remain, in the file header: gate semantics (the
original's gate opens on any message, including the matcher's own) and the absence
of the original's pre-game comprehension quiz.
Requires the plugin's reference-game-cued-fidelity branch for the two new options.
Adds reference-game-hawkins-local.html, the vendored offline twin, since the CDN
build cannot run until the plugin publishes to npm; vendor/ is gitignored.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is the build we are using for the paper.
reference-game-hawkins.htmlis the study artifact of record for the cued (sequential) reference game — the parameters here are the ones the reported data will be collected under, so changes to it are changes to the protocol.What "cued" means
The OSF project behind Hawkins, Frank & Goodman (2020) (osf.io/vzvmf) attaches hawkrobe/tangrams as its github component. The paper ran two variants:
experiments/tangrams_unconstrained)experiments/tangrams_sequential)The paper restricts its analyses to the cued version "as a cleaner confirmatory sample," and osf.io/vzvmf is that version's preregistration. This PR audits our cued build line by line against that source and the manuscript.
Changed to match the original
game.core.jslays out a 6×2 grid of square 300×300px cells, andstimuli/objectSet.jsdraws every tangram at exactly 0.7× its natural PNG size. The shapes are deliberately not normalised — one uniform scale preserves their relative sizes. Cells are now square and each image getswidth = originalDrawWidth / 300as a percentage of the cell content box, exact at anycell_size.scramble_mode: "disjoint". The original re-rolls both layouts until no tangram shares a cell between the two players (notMatchingLocs/arraysDifferent). Plain"independent"only guarantees the layouts differ, leaving ~1/e of tangrams coinciding by chance — enough that positional reference sometimes worked by luck.#roundnumber/#score.client_onjoingame. One edit: the original tells both roles they may "talk to the director," a copy-paste slip, so each role now names the other.Already correct, left alone
Two players, fixed director/matcher, 6×2 grid, 72 trials as 6 shuffled blocks of 12, per-trial re-scrambling, cued target, unrestricted two-way chat, per-round chat log, the
messageSentclick gate, the 3000 ms feedback window, and unnumbered cells (the paper removed the numbers for the cued version; the plugin only draws slot badges when there is more than one target).Known differences, documented in the file header
messageSentin itschatMessagehandler, which fires for any message including the matcher's own, so a matcher could unlock their own click by typing anything. Ours counts only the partner's message — the stricter reading, and what that code's own comment says was intended.round_timeout(60s) has no counterpart in the original, which ran untimed. It exists so a disconnected partner cannot hang a trial. Rounds it ends recordended_by: "timeout"with a null assignment, so they filter cleanly.Dependency — read before merging
This needs two options that do not exist in a published plugin yet:
scramble_mode: "disjoint"and role-keyedfeedback_content. Both are on thereference-game-cued-fidelitybranch of jspsych-multiplayer (12 new tests, suite green). That has to merge and publish first.Until it does,
reference-game-hawkins.htmlcannot run at all — its CDN tag forplugin-multiplayer-reference-game404s, because the package has never been published to npm. So this PR also addsreference-game-hawkins-local.html, an identical build that loads from a gitignoredvendor/directory; its header carries the rebuild commands. Once the plugin publishes, pin the version in the main file and delete the local twin.Testing
Structural verification only: both files parse, their timelines are byte-identical, all referenced resources resolve, and a jsdom render of a real trial confirms the round counter and score, both roles' wording, 12 images with
srcvalues the per-image CSS matches, the square grid tracks, and the click gate blocking before the director's message and submitting after.Not yet verified in a browser. The stimulus geometry, the green repaint, the per-role feedback and the typing hint are all visual and nobody has watched them render. A two-tab pass through a few rounds should come before this merges.
🤖 Generated with Claude Code