Skip to content

junsooshin/baseballsimulator

Repository files navigation

Baseball Game Simulator in Python

Runs 1000 simulations between two lineups

Name: Junsoo Derek Shin

Date: 13 June 2017

Note:

  • I wrote this program to try Python while doing something fun for me.
  • It currently lacks good structure, such as object-oriented principles.
  • I'm planning on fixing the structure, adding more details, and eventually hosting it online.

Running this program:

python baseball.py lineup1.txt lineup2.txt

For the lineup files, put team name (any string is fine), full names of 9 batters, full name of a pitcher, separated by commas and in single line.

For example:

Astros, George Springer, Alex Bregman, Jose Altuve, Carlos Correa, Yulieski Gurriel, Brian McCann, Marwin Gonzalez, Josh Reddick, Dallas Keuchel, Dallas Keuchel

Important Notes:

  • Players with the same names don't work right now (for 2017, Chris Young was the only such name).

  • In the batter and pitcher files, I manually stripped strange characters from the "Name" column title.

  • In the league file, I manually stripped strange characters from the "Season" column title.

Data sources:

Sources:

Things to be implemented in the future:

There are a lot of things to include in the baseball simulator, but pitcher management is the next thing to tackle, since, right now, I assume that the starting pitcher completes the entire game.

About

Simple baseball simulator in Python

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages