Resolve or document the pitcher OPS aggregation formula #6

Closed
opened 2026-02-20 06:51:39 +00:00 by cal · 1 comment
Owner

`app/routers_v2/teams.py:611` — `# TODO: should this be max??`. The `get_total_ops` function uses `(ops_vr + ops_vl + min(ops_vl, ops_vr)) / 3`. Comment questions whether `min` should be `max`. Formula duplicated in `sort_starters` at line 691.

Priority: medium

\`app/routers_v2/teams.py:611\` — \`# TODO: should this be max??\`. The \`get_total_ops\` function uses \`(ops_vr + ops_vl + min(ops_vl, ops_vr)) / 3\`. Comment questions whether \`min\` should be \`max\`. Formula duplicated in \`sort_starters\` at line 691. **Priority**: medium
cal added the
todo
enhancement
labels 2026-02-20 06:51:39 +00:00
cal added the
ai-working
label 2026-03-07 22:31:23 +00:00
cal added
ai-pr-opened
and removed
ai-working
labels 2026-03-07 22:33:28 +00:00
Author
Owner

PR opened: #60

Fix: Changed min(ops_vl, ops_vr)max(ops_vl, ops_vr) in both get_total_ops (line 621) and the duplicate inside sort_starters (line 703). The max version correctly penalises a pitcher's worst platoon split, which matters because starters face both LHH and RHH. The min version was rewarding dominant one-sided pitchers while understating their vulnerability against the other handedness. Also replaced the # TODO comment with a brief explanatory note.

PR opened: https://git.manticorum.com/cal/paper-dynasty-database/pulls/60 **Fix:** Changed `min(ops_vl, ops_vr)` → `max(ops_vl, ops_vr)` in both `get_total_ops` (line 621) and the duplicate inside `sort_starters` (line 703). The `max` version correctly penalises a pitcher's worst platoon split, which matters because starters face both LHH and RHH. The `min` version was rewarding dominant one-sided pitchers while understating their vulnerability against the other handedness. Also replaced the `# TODO` comment with a brief explanatory note.
cal closed this issue 2026-03-10 14:43:01 +00:00
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: cal/paper-dynasty-database#6
No description provided.