Skip to content

fix(applications): RLRW returns the choices it simulates - #102

Merged
lenarddome merged 3 commits into
mainfrom
100-rlrwgeneratetrue-does-not-return-the-choices-it-simulates
Oct 6, 2026
Merged

lenarddome merged 3 commits into
mainfrom
100-rlrwgeneratetrue-does-not-return-the-choices-it-simulates

Conversation

@lenarddome

Copy link
Copy Markdown
Collaborator

Closes #100.

With generate=True, RLRW sampled a choice on every trial but did not return it, so its simulations could not be used for parameter or model recovery.

Changes

  • _sessions.rlrw records the chosen arm of every trial (int64) and returns it; RLRW outputs it as response, the column it reads observed choices from, so simulated data can be fitted directly. Without generate, response is the observed choice.
  • Documented generate and the new output in the RLRW docstring.
  • Tests: simulated choices follow the returned policy (recomputed from the same seed) and the reward is that of the chosen arm; response equals the observed choices without generate; numba and Python simulate the same choices. The frozen per-trial reference predates response, so the reference comparisons leave it out.
  • Version bumped to 0.26.0.dev2, with a changelog entry.

Every RLRW export now has one more column, response; other outputs are unchanged.

🤖 Generated with Claude Code

lenarddome and others added 3 commits October 6, 2026 15:54
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@lenarddome lenarddome linked an issue Oct 6, 2026 that may be closed by this pull request
@lenarddome
lenarddome merged commit f05ac40 into main Oct 6, 2026
16 checks passed
@lenarddome
lenarddome deleted the 100-rlrwgeneratetrue-does-not-return-the-choices-it-simulates branch October 6, 2026 14:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

RLRW(generate=True) does not return the choices it simulates

1 participant