bug: leaderboard runs affected by two balatrobot defects — economy short-collected, losses recorded as wins

未关闭
#85 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
45/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
冷清
技术栈
python

调研方向

从 bot.py 和报告中描述的 executor 生命周期开始,然后重放 BalatroBench 数据集,以观察 cash_out 的时机和胜利状态的持久性。检查有效但无法执行的调用附近 gamestates.jsonl 的对齐情况。完成的标准是:受影响的 Rewards 和胜负标签已被修正或标记,并且已记录每次运行的隔离情况以及修复后的重放结果。

由索引模型根据 Issue 内容生成。

描述

Description

We replayed the full BalatroBench CC0 dataset (241 runs, 18k+ actions) on a
vanilla-faithful Balatro simulator as a differential check. Two balatrobot-level
defects we found and filed upstream reach published results:

  1. cash_out race (coder/balatrobot#231). bot.py calls cash_out the moment
    it sees ROUND_EVAL; the endpoint fires G.FUNCS.cash_out before the
    round-eval rows finish committing, so affected cash-outs collect one blind
    reward short ($3/$4/$5), or $0 when the payout is only the reward row. In our
    replay, of the runs with money divergence, 61 had live short (the race
    direction) and 13 the opposite (unexplained, possibly a second mechanism).
    Several dataset runs die in the shop on purchases they could have afforded
    with the missing rewards.

  2. won-flag cross-run leak (coder/balatrobot#232). The executor starts its
    Balatro instances once and cycles the whole task list through them; each run
    begins with menu + start, and G.GAME.won survives that path. Since
    bot.py records finish_reason = "won" whenever gamestate["won"] is
    truthy, a loss that occurs on an instance after that instance has produced
    any win can be recorded — and published — as a win. We observed the
    leaked flag 16 times in our own long-lived-instance campaigns; the exposure
    here grows with tasks-per-instance.

A note for dataset consumers

Independent of the above: in gamestates.jsonl, ~1% of tool calls are
valid-but-unexecutable on live; they consume a response without emitting a
gamestate, which shifts every later index. Anyone aligning gamestates[i] with
action i needs to re-align at those events (we detected it when a "divergence"
decoded exactly to the following step's rearrange arguments).

Suggested Fixes

  • Pick up the balatrobot fixes when they land.
  • Affected wins are detectable after the fact: a recorded win whose final
    gamestate never beat the ante-8 boss (chips/ante inspection) is the leak.
    Consider re-scoring or flagging affected runs in the published data.
  • Meanwhile, for benchmark-grade integrity: one game process per run (avoids all
    cross-run G.GAME leaks), and delay cash_out until the eval rows commit.

Happy to share our replay tooling/results for cross-checking.

主要语言
Python
星标
114
派生
14
PR 合并指标
30 天内没有已合并 PR

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

coder/balatrollm 的其他 Issue

查看 coder/balatrollm 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。