Spaces:
Running
Running
Commit History
-
Edit the notebook prose against the house style
Removes 18 contrastives, 15 em dashes, 3 evaluative stand-ins for a quantity and 2 banned adjectives across all six notebooks. The notebooks are generated, so the generators are the source of truth, but regenerating would drop every stored output and these are markdown-only changes. Both sides are patched and then checked: regenerating into a scratch directory reproduces the committed notebooks cell for cell, markdown and code. All six still validate, with 63 stored outputs and no error outputs. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>95345f5
-
Finish recovery.ipynb at n=100, and log the session state
Parameter recovery now runs at 100 participants; model recovery runs at 40 deliberately. Model recovery asks whether integrated BIC picks the generating model, and BIC differences grow with participants, so more of them make the question easier rather than sharper. At 100 the 8 x 8 sweep ran over two hours without finishing, and it caches only at the end, so nothing was recoverable. Results at the shipped designs. The day task recovers k_self +0.91 and k_other +0.90 at 48 trials with the gap at +0.62, and model recovery is 6/8 there, every miss involving the beta structure rather than the number of k parameters. Night 1 recovers all four of its models at both trial counts and never confuses h-free with h-fixed. Night 2 is 3/4 at 24 and 4/4 at 48. docs/SESSION_LOG_2026-08.md records where the work stands, the four questions that need the researcher rather than code, and the seven errors found along the way, so they are not reintroduced. Most of those came from choosing a parameter val…64f8454
-
Correct the simulated beta, which was suppressing the self/other gap
Beta was drawn from 0.3 to 1.0, picked without checking it against anything. Jo Cutler's simulation code bounds beta at 0 to 5 and tests recovery at 1, 3 and 5. The value scales differ, so the comparison has to be on beta times the value difference, which is what the softmax sees: hers comes to about 4.3, mine to 2.0. Simulated participants were roughly half as decisive as hers. That suppressed the one result the analysis kept reporting as a hard limit. With beta at 0.7 to 2.2 the day-task self/other gap recovers at +0.60 on the shipped 48 trials rather than +0.30, and reaches 0.7 at 96 trials where it previously did not reach it by 150 at all. Overall P(work) is unchanged, so this was never saturation. Night 1's h and k both drop from 35 and 31 trials to 24, so the shipped night block is already sufficient for them. Ranges now live as shared constants that night_models imports from a single place, since the two notebooks had drifted onto different assumptions and would have contradi…6cf57d6 -
Reframe the notebook around what the task actually ships
The notebook led with 24 trials as the day-task headline. The day task runs the 24-cell grid once per block across two blocks, so it ships 48 trials and every cell appears twice. Reading the 24-trial row understated it badly: model recovery is 7/8 at 48 rather than 5/8, and k_other recovers at +0.82 rather than +0.57. The two night blocks do ship 24 trials each, so their 24-trial rows were right. The notebook now opens with a table of what each block actually runs, plots the day-task scatter at 48, and marks 48 on the trials axis, so the sweep reads as "what extra blocks would buy" rather than as the design itself.d5ae2bb -
Add Night 1 and Night 2 recovery, each as its own model family
Both nights are separate decisions and get their own model rather than being folded into the day task. Night 1 (raid or sleep) estimates harm aversion h alongside k and beta; h = 0 is in the family as the null, so the comparison asks whether taking credits off a partner costs anything at all. Night 2 (whose pocket) has identical effort on both options, which has a consequence the model has to respect: the effort terms cancel and only their difference is estimable. It fits w and dk, never k_self and k_other separately. dk is centred on zero rather than squashed into a positive range, because "no difference" is exactly the null that parameter tests. Night 2 as shipped locks each pair to a total of 12, so what you gain and what your partner gains correlate -1. Both the shipped and a decoupled version are run so the cost of that coupling is measured rather than argued about. Unlike the day task, these parameter ranges are assumptions -- the pilot pins the day-task range to observed cho…0b19142 -
Store the executed recovery notebook
Parameter recovery and 8x8 model recovery at 24 and 48 trials, with figures. The two halves say different things and both are real. Per-participant recovery of the self/other gap in k is poor at 24 trials (r = +0.01) because it is a difference of two noisy estimates. Model recovery at the same 24 trials never once confuses a 1k model with a 2k model, so whether a self/other difference exists is answered reliably even where its per-person magnitude is not. The only confusions are between one beta and two, which is a nuisance distinction.052eb02 -
Anchor the simulated k range to the pilot instead of guessing it
The recovery numbers are a statement about the assumed parameter range as much as about the design, and the range was guessed: k in 1..5, which implies people work on about 80% of trials. The nine complete pilot sessions actually chose work on 66% of SELF and 58% of OTHER trials, so real k is higher than that. The difference is not cosmetic. Under the guessed range, k*E^2 cannot come near the 8-credit gap between the top reward and rest, so two thirds of the design sits at ceiling, k_self recovers at +0.25 over 24 trials and the self/other gap at +0.09 -- which would read as "the design cannot measure the thing it exists to measure". Under k_self 6 / k_other 9 / beta 0.6, which reproduces the pilot choice rates (0.68 / 0.59 against 0.66 / 0.58), the R=6 trials become informative and only R=10 stays near ceiling. K_MAX moves 10 -> 20 to leave the squash room above k_other, with gradients checked at the new values. The notebook now prints information per design cell so where the R=10 t…be24b6b -
Fix two pyEM integration bugs that would have silenced model recovery
calc_BICint calls the objfunc with output="all" and subscripts the result for its "nll" key, so returning a bare float raised "'float' object is not subscriptable" from inside a joblib worker -- a long way from the cause. The objfunc now has both output modes. pyEM's FitResult exposes posterior_mu / posterior_sigma, not mu / sigma. The wrong names were caught inside a try/except that turned every BIC into nan, so all 64 fits per trial count would have run to completion and produced an empty confusion matrix rather than an error.da6cba2 -
Add the effort-discounting recovery analysis (pyEM)
Parameter and model recovery for the design, using Rhoads' pyEM. Both questions are asked of simulated data where the truth is known, so the answers are about the design rather than about any participant. Headline is 24 trials, with 48/72/96 to show what more trials would buy. The eight-model family crosses one-vs-two k, one-vs-two beta, and a parabolic vs linear exponent. The 1k models are in it as the null: the self/other gap in k is what the task exists to measure, so if a 1k model wins, the design did not detect prosocial discounting at all. Two guards sit before any fitting, because both failure modes produce garbage that reads as a modelling result rather than a bug: * check_gradients() -- pyEM fits on an unbounded scale and squashes into range with norm2beta(x, max_val). A max_val far above the plausible values saturates the sigmoid, the optimiser sees no slope, and recovery collapses. That has already happened once on this project. * choice_balance() -- infor…56b39b6