Last Page Build: 2025-06-28 01:31:16 +0100


Baseball Lineups

Ari
Published: 2023-08-21

Fiddler: Optimal Baseball Lineup

Solution to this weeks fiddler. I must admit I am not too happy with this solution, which involves simply using monte carlo simulations of all possible slugger starting positions and calculating the one with the best score.

Empirical Answer: The slugger should be ranked 4th, when the pure hitters take a single with probability \(p=1/3\) and the sluggers hit home runs with probability \(q=1/10\). If the pure hitters took singles with \(p=2/3\) instead, then surprisingly the optimal position is 9th.

Example Code

There has to be some random walk solution to this problem which involves setting up finite state machines and finding some stationary distribution for each configuration. I’m sure of it!