Implement the run-decision algorithm in gb_decide_run #18

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

`in_game/gameplay_models.py:666` has `this_resp.min_safe = 15 - aggression # TODO: write this algorithm`. Currently uses a trivial placeholder formula. The `min_safe` threshold determines when an AI manager chooses to run, affecting game fairness.

\`in_game/gameplay_models.py:666\` has \`this_resp.min_safe = 15 - aggression # TODO: write this algorithm\`. Currently uses a trivial placeholder formula. The \`min_safe\` threshold determines when an AI manager chooses to run, affecting game fairness.
cal added the
todo
enhancement
labels 2026-02-20 06:50:43 +00:00
cal added the
ai-working
label 2026-03-07 23:31:20 +00:00
cal removed the
ai-working
label 2026-03-07 23:35:23 +00:00
Author
Owner

PR #72 opened: #72

Replaced the placeholder 15 - aggression formula with a tier-based algorithm modeled after tag_from_second / tag_from_third:

  • Computes adjusted_running = self.running + abs(aggression_mod) to combine the manager's running aggressiveness with situational aggression
  • Brackets into three min_safe tiers: 4 (aggressive, adjusted_running ≥8), 6 (moderate, ≥5), or 8 (conservative)
  • Applies a ±2 outs adjustment: −2 with 2 outs (run on contact), +2 with 0 outs (protect baserunners)

Also added test_gb_decide_run to the test file covering Balanced (min_safe=6) and Yolo (min_safe=4) scenarios with 1 out.

PR #72 opened: https://git.manticorum.com/cal/paper-dynasty-discord/pulls/72 Replaced the placeholder `15 - aggression` formula with a tier-based algorithm modeled after `tag_from_second` / `tag_from_third`: - Computes `adjusted_running = self.running + abs(aggression_mod)` to combine the manager's running aggressiveness with situational aggression - Brackets into three `min_safe` tiers: 4 (aggressive, adjusted_running ≥8), 6 (moderate, ≥5), or 8 (conservative) - Applies a ±2 outs adjustment: −2 with 2 outs (run on contact), +2 with 0 outs (protect baserunners) Also added `test_gb_decide_run` to the test file covering Balanced (min_safe=6) and Yolo (min_safe=4) scenarios with 1 out.
cal added the
ai-pr-opened
label 2026-03-07 23:35:32 +00:00
cal closed this issue 2026-03-10 18:26:30 +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-discord#18
No description provided.