Saturday, January 13, 2007

The Lineup Toy

Creating a batting order has long been an interest of mine. Around this time of year, baseball fans start discussing and thinking about lineups for their teams, and the question is always "what lineup would be best to use". So I made a little toy program I call The Lineup Toy to help answer the question, or at least provide a useful starting point.

In baseball, runs are generally scored by players getting on base and other players knocking them in. So it makes sense to put the best players at getting on base in front of the players who are best at knocking them in.

The players at the top of the batting order get more plate appearances than the players lower in the order. The higher a player's OBP, the fewer outs that player makes. Since the length of your game is limited by 27 outs, putting high OBP guys on top of a lineup gives your team more plate appearances as a whole, and more chances to score runs.

This suggests a fairly simple-minded strategy for constructing a reasonable lineup:
1. Put the best OPS in 3rd
2. Put the best remaining Slg in 4th
3. Put the best remaining OBP's in 1st and 2nd (with the better Slg in 2nd)
4. Arrange the remaining players in order of descending Slg

Now, this might lead to some pretty strange-looking creations. But like I said, it's a simple-minded method. The Lineup Toy doesn't take into account factors like speed and stolen bases. Take the Lineup Toy's suggestion and use some common sense to tweak it.

This page is powered by Blogger. Isn't yours?