2026-02-07.13.56.24
Where to go next with baseball sim:
Phase 1: Address Core Statistical Model Limitations
1. Implement Shrunken HR and BABIP Rates:
* Goal: Calculate individual player-specific Home Run (HR) and Batting Average on Balls In Play (BABIP) rates using empirical Bayes shrinkage.
* Impact: This will move away from using league averages and allow the model to better capture individual player power and hitting skill.
* Action: Modify src/stats_engine.py to update the _calc_player_stats method.
2. Implement Shrunken Hit Type Distribution:
* Goal: Replace the fixed ratios for singles, doubles, and triples (given a hit) with shrunken player-specific distributions.
* Impact: This will more accurately reflect individual batter's ability to hit for extra bases.
* Action: Update src/stats_engine.py (likely within _calc_player_stats and get_matchup_probs).
3. Expand Park Factors:
* Goal: Investigate and implement park factors for Strikeout (K) and Walk (BB) rates.
* Impact: Ensures that park effects are comprehensively applied across all relevant plate appearance outcomes.
* Action: Modify src/stats_engine.py to extend park factor application.
Phase 2: Enhance Game Simulation Logic (Subsequent Phase)
4. Improve Runner Advancement (Double Plays):
* Goal: Refine the advance_runners logic in src/game_sim.py to accurately handle double plays, especially on ground balls.
* Impact: Makes the game simulation more realistic and closer to actual baseball rules.
5. Basic Pitcher Fatigue/Substitutions:
* Goal: Introduce a basic mechanism in src/game_sim.py where pitcher effectiveness can decrease after a certain pitch count, allowing for changes.
* Impact: Adds a layer of realism to pitcher performance and game flow.
Phase 3: Introduce Context and Advanced Features (Longer-Term)
This phase would involve more complex changes like incorporating game state into probability calculations, integrating defensive metrics, and exploring advanced
machine learning models.