Showing posts with label Baseball Mogul. Show all posts
Showing posts with label Baseball Mogul. Show all posts

Wednesday, April 5, 2017

Baseball Mogul 2017: Schedule File Formats

Baseball Mogul 2017 now includes support for team abbreviations in schedule files, making it much easier to create or import your own schedule files (for historical and/or fictional seasons).

This is a copy of the document included in the Baseball Mogul "schedules" folder.

Schedule Filenames

The league format is converted to numbers and letters that are used to create the file name. If the schedule is from a specific year, the year is appended to the filename.

This is an example of the name of a schedule file: 162-U-555-555-I-2017.txt.

  • ‘162’ is the number of games in the season.
  • ‘U’ means the schedule is “unbalanced”. This means that teams play more games within their division, that vs. league opponents. (A ‘B’ would be used to indicate a “balanced” schedule, where all league teams play every other league team roughly the same number of times).
  • The first ‘555’ refers to the number of teams in each division of league #1 — the American League has 5 teams in each of 3 divisions. The second ‘555’ refers to the number of teams in each division of the league #2 — the National League also has 5 teams in each division.

Because this schedule is for an unbalanced league, Baseball Mogul needs to ensure that league format has the correct number of teams in each division. Thus, the schedule file includes a number for each division.

For balanced schedules, the game only cares about whether the number of teams in each league match the schedule format. This only requires one number for each league. If the above file were for a balanced schedule, it would use the following filename: 162-B-15-15-I-2017.txt.

  • The ‘I’ indicates that the schedule includes interleague games. If the schedule only features league play, this is replaced with an ‘L’.
  • By default, all schedules have a 3-day all-star break. If this schedule didn’t have an All-Star Break, '-N' would be appended to the filename (for ‘No all-star game’).
  • Finally, the specific year can be added as an optional parameter. If a year is listed, this schedule will only be loaded for that season.
The Baseball Mogul "schedules" folder

Examples

162-B-14-16-I = 162 games, balanced, 14-team AL, 16-team NL, with interleague play.
162-U-554-565-I = 162 games, unbalanced, 5-5-4 AL, 5-6-5 NL, with interleague play.
154-U-77-66-L = 154 games, unbalanced, 7-7 AL, 6-6 NL, no interleague play.
154-U-77-66-L-N = 154 games, unbalanced, 7-7 AL, 6-6 NL, no interleague play, no All-Star Break.

Schedule Formats

All schedule files use one line per scheduled game. Each group of games is preceded by a single
specifying the date on which those games occur.

This date must always be in the format “XXX M/D/Y”. For example, “Wed 4/5/2017” refers to
Wednesday April 5th, 2017. The month and day are the only data used; the year and day of week are
ignored.

Individual games on each day can be represented in one of two formats:

1. Numerical Team Indexes

Teams are represented by numbers, starting at 0, such as the following lines:

Sun 4/3/2017
0 @ 6
1 @ 3

Each number specifies a team in the database, with the teams grouped by division.1 For example, in a
template for the 1977 season:

- Teams 0-6 are the AL East
- Teams 7-13 are the AL West
- Teams 14-19 are the NL East
- Teams 20-25 are the NL West

Teams are ranked alphabetically within each division. Using 1977 again as an example:

- Team 0 is the Baltimore Orioles
- Team 1 is the Boston Red Sox
- Team 2 is the Cleveland Indians
- etc.

Note: Baseball Mogul assumes that leagues are sorted alphabetically, and divisions are sorted from East to West. The “American League” will be listed before the “National League”; the “AL East” will be listed before the “AL Central” and the “AL West”; etc.

2. Team Abbreviations

New for Baseball Mogul 2017, schedule files now support 3-letter abbreviations. For example:

Sun 4/3/2017
SFG @ ARI
NYY @ TBR

Team abbreviations can be viewed (or edited) in the League Editor inside Baseball Mogul.

Schedule Files as Templates

If the specific year is omitted, Baseball Mogul will use the schedule file as a template. Instead of
scheduling the games exactly as specified in the file, it will load the schedule file and then randomize
team schedules within each division. This allows the game to create unique schedules for future years, or for historical years for which we do not yet have specific data.

Schedules are shuffled WITHIN each division. So, in the 1977 example above, if Team 0 is scheduled to play the first game of the season, then the schedule created from that template will feature ANY ONE of the first seven teams to play the first game of the season.

Double-Headers

Baseball Mogul doesn’t currently support teams with more than one game schedules on the same day.
If you are creating a schedule file for a historical year with scheduled double-headers, you will need to move the 2nd game to a day where those teams have a day off (such as by moving the 2nd game of a Sunday double-header to the following Monday).

Missing Schedule Files

If there is no matching schedule file, Baseball Mogul fabricates a schedule using an algorithm than can produce some unrealistic schedules (with large gaps between games played). I am trying to expand the number of schedule files available inside Baseball Mogul. If you have created a file for a missing year or format, please forward it to cjd@sportsmogul.com and/or post it to our mod forums.

Thank you!

Appendix A: Numbers Used in Schedule Files for 2014-2016 Seasons

Note that teams are ordered:

  1. Alphaterically by League (AL then NL).
  2. Then by division from east to west.
  3. Then alphabetically within each division.


AL East
BAL 0
BOS 1
NYA 2
TBR 3
TOR 4

AL Central

CHA 5
CLE 6
DET 7
KCR 8
MIN 9

AL West

HOU 10
LAA 11
OAK 12
SEA 13
TEX 14

NL East

ATL 15
MIA 16
NYN 17
PHI 18
WAS 19

NL Central

CHN 20
CIN 21
MIL 22
PIT 23
STL 24

NL West

ARZ 25
COL 26
LAD 27
SDP 28
SFG 29

Saturday, March 25, 2017

Adding Stadium Art to Baseball Mogul

I got an email this morning with the following question:
  1. I am trying to use this photo of Jarry Park in Baseball Mogul, but all the numbers are skewed. The batter is nowhere near home plate, the first baseman is almost on the pitchers mound... what can I do to fix this?
They attached a file called PBP-Stadium-Montreal.jpg:




To verify the problem, I copied this file to my 'Stadiums' folder and started a new game as the 1974 Expos. When I went into Play-By-Play mode for their first home game, the field looked like this:


As reported, the ratings for all the fielders are in the wrong place on the field (as are the outfield fence distances). This is because every stadium photo requires a matching text file that specifies the coordinates that Baseball Mogul needs to use when drawing these labels.

To get these coordinates, open the photo in a graphical editing program. I use the "Paint" program included with Windows. Baseball Mogul assumes a photo size of 640 x 480 pixels, so you should resize your photo before proceeding.

Microsoft Paint displays the coordinates of your cursor in the lower left corner of the window. Start by placing your cursor over home plate and record the coordinates to a text file. Continue this process for each of the following locations on the field, typing each set of coordinates on it's own line. (If the foul poles are outside the picture, estimate their coordinates.)

Home Plate
First Base
Second Base
Third Base
Left Field Corner
Center Field Wall
Right Field Corner

After each pair of coordinates, you can add a comment by typing '//' and the following it with a useful label. When done with PBP-Stadium-Montreal.jpg, my text file looks like this:

318,351 // HOME_PLATE_COORDINATES Bottom corner
515,290 // FIRST_BASE_COORDINATES Outside corner
321,250 // SECOND_BASE_COORDINATES Top corner
128,285 // THIRD_BASE_COORDINATES Outside corner
-47,221 // LEFT_FIELD_COORDINATES Base of foul pole
324,194 // CENTER_FIELD_COORDINATES Base of CF wall
700,229 // RIGHT_FIELD_COORDINATES Base of foul pole

Save this file with the same filename as the stadium photo, but add the ".ini" file extension (e.g. PBP-Stadium-Montreal.ini).

When I go back into Baseball Mogul 2016 and resumed the game with the 1974 Expos, the stadium view now looks like this:


Much better!

Friday, March 25, 2016

Baseball Mogul 2016 Launches April 2nd at 11:30 pm!

Baseball Mogul 2016 will be available for download from sportsmogul.com at 11:30 pm (EDT) on Saturday, April 2nd.


This year's version includes updated team and player stats through 2015, complete spring training rosters, and an additional 1,000+ real-life minor league players (that's more than 75 players per franchise, complete with hand-edited ratings and vital stats).

More than a hundred beta testers have been putting Baseball Mogul 2016 through it's paces -- with the new rosters, but also with fictional and historical leagues. More than 80% of the reported bugs have been fixed, and I'm pretty confident we can fix the rest before March 31st.

We have also completely re-designed the Baseball Mogul data format, making it possible to directly edit player ratings (as opposed to the old frustrating method of editing a player's "predicted" stats until you got the ratings you wanted).

I'll be posting more info over the next few days and weeks. Thanks for reading!

[Edit: Date and time of product launch updated.]

Sunday, March 29, 2015

Baseball Mogul Diamond: Head-To-Head Records

I just got an email from a customer suggesting that we show head-to-head records between each team during the season. Well, Baseball Mogul already does that (and we've made some improvements with Baseball Mogul Diamond). So here's a quick primer for anyone who wasn't aware of the "Head-To-Head" button on the Calendar Screen:

Near the top of the Calendar Screen is a rectangle with the words "Head-To-Head". It doesn't really look like a button, but it is.


Clicking the button brings up the head-to-head records for every team, divided by league (and with a section for "Interleague Play", if applicable). An example of just the National League is shown here:


My team (the Cubs) are shown in blue. Our record against Cincinnati was 5-14. We went 4-2 against Colorado, 2-5 versus the Dodgers, and so on.

Monday, February 16, 2015

Baseball Mogul’s League Builder Feature

Although we are busy working on Baseball Mogul Diamond, we often get questions asking about existing features in Baseball Mogul. I got an email yesterday asking if it was possible to "combine teams from different years".

It is possible. It's called the "League Builder" and it's one of the primary ways you can customize your league. The League Builder lets you build a league with any team from the 1901 season through the present day. To access this feature, you first must choose to “Start a New Game” in Baseball Mogul. Then select “Custom” (as shown below):


After selecting the “Custom” option, you will be prompted with four more choices to build a league. Choose the “League Builder”:


The League Builder consists of a dialog box that lets you select any season and any team from that season. Then click "Add Team >>" to add that team to your league.


Continue until your league is complete. You can use teams from all different years, or have a few from the same year. You can even pick 30 different years from the same franchise, letting you test which year was the best team for any select organization, like this:


The League Builder supports leagues as small as four or as large as thirty. When you finish selecting the teams of your choosing, click “Done” and the league will finish setting up, after which you’ll be able to play with or against your favorite teams of all time from year to year.

Tuesday, December 9, 2014

Viewing Head-to-Head Stats (Baseball Mogul)

When I posted some news last week about Baseball Mogul Diamond, one of the responses was a request to add "hitter/pitcher results vs. each pitcher/hitter and hitter/pitcher results vs. each team".

As it turns out, we've been tracking player-vs-player and player-vs-team results since 2007. So here's some info in case you didn't know how to access this feature:

1. On the charts tab in the Scouting Report, click on the gray box that shows what is currently being displayed (batting average, 2 outs, etc.) and you will get a dialog box that lets you choose vs-player or vs-team:


2. Stats by each team's lineup versus the other team's pitchers are shown at game start (when selecting a starter or adjusting the lineup). For example, this screen shot shows a player comparing the career performance of two pitchers against the Yankees:


3. During game play, head-to-head stats are shown under the batter's scouting report.





Saturday, December 6, 2014

Baseball Mogul Diamond

Last week, I promised some news about Baseball Mogul to our newsletter subscribers. I haven't been able to pull together any screenshots, but I can let you know about some new developments, with more information to come over the next 3 months.

We're changing the name, sort of.

In early 1998, we launched a game called Baseball Mogul 99 (instead of the more accurate "Baseball Mogul 98"). This numbering scheme was chosen by our publisher, and matched other sports games, but it has since led to confusion because "Baseball Mogul 2015" includes rosters for 2014, with player stats through 2013.

So, the next version, including stats through the 2014 season, will not be called Baseball Mogul 2016. It will be called Baseball Mogul Diamond. The logic behind the name "diamond" is that we have four notable areas of new features:

(1B) Free Agent Compensation

Baseball Mogul Diamond includes up-to-date rules and regulations for free agent compensation, matching those set out by the most recent collective bargaining agreement (CBA).

Free Agent Compensation
When teams lose players to free agency (after giving that player a "qualifying offer") they are entitled to additional picks in next amateur draft as compensation.

Many of you don't want these roster rules to slow down game play or make it more complicated. So, we have added a new "Roster Rules" dialog that lets you customize this feature.

(2B) Improved Aging Model

This includes many small changes, but the most visible is the fact that players now move "down the defensive spectrum" as they age. Bill James first defined the defensive spectrum in the 1980s, creating a list of positions from the least difficult (on the left) to the most difficult (on the right):


The best offensive players are usually found closer to the left side of the spectrum. (Note that before about 1930, 3B was actually between CF and SS).

As players age, they tend to move from the more difficult defensive positions (on the right) to the least difficult (on the left). For example:

  • Rod Carew played 2B until age 29, then moved to 1B.
  • Craig Biggio was drafted as a catcher, but moved to 2B at age 24 and moved the outfield at age 36.
  • David Ortiz started his career at 1B, then slowly shifted from being a DH in about 15% of his games to starting at DH 97% of the time.
  • etc.

(3B) New General Manager AI (Artificial Intelligence)

We're rewriting the general manager AI so that computer-controlled teams draft, sign, re-sign, release and trade players more realistically. The "Tradezilla" engine had some flaws that needed to be fixed, and the AI had other weaknesses. For example, it was common for a team to sign (or trade for) a star player, only to let him rot on the bench because the team already had a great player at that position. Teams also have serious problems with cash and salary management, among other things.

So ... the new roster rules described above required that we create much more comprehensive GM AI, and has also allowed us to fix existing problems. As many of you have noted, the addition of the roster rules solved some of the problems for us. For example, free agent compensation tends to help small market teams stay competitive with the big boys.

(Home) Improved User Experience

Okay. There are many smaller improvements, so I just lumped them into "improved user experience".

We've improved end-of-season contract negotiations by making it easy to skip a player and come back to him later. We also show you how much payroll you have in expiring contracts, to make it easier to stay within your budget.

You can now view player projections (not to be confused with "predicted stats") on the Leaders Page and in the Sortable Stats Dialog.

Pitcher usage has been adjusted (yet again) to not only match recent trends by managers, but to ensure accuracy in all historical eras. We have also added more adjustable parameters, in case you want to tweak the simulation results to your liking.

And of course we are continuing to respond to your bug reports and suggestions in our forums.

Thank you for continued support and feedback, and please stay tuned for more info!

Thursday, May 29, 2014

DICE: Defensive Independent Component ERA

I'm reposting an article from July 2000, because Baseball Mogul players keep asking me what 'DICE' stands for on the pitcher Scouting Report (and because the text in the original article is tiny and hard to read).

Defense Independent Component ERA

July 19, 2000

If you play Baseball Mogul, you have already encountered Defense Independent Component ERA ("DICE"), even though you don't realize it. This is because the artificial intelligence in Baseball Mogul uses DICE to evaluate pitching talent.


We also use it at Sports Mogul to create our annual player projections.

DICE starts with the concept of "Component ERA" invented by Bill James. The concept is pretty simple -- use the components of a pitcher's statistical performance (such as hits allowed and hit batters) to predict a pitcher's ERA. Because there is a strong correlation between these individual events and the pitcher's ERA, you can actually estimate a pitcher's ERA in a season by just looking at the components. In other words, you can predict earned runs allowed by looking at the individual events (such as walks and home runs) that led to the runs themselves.

ERA is a somewhat luck-based stat. One season is a relatively small sample size, and earned runs given up in one season may not be a true indicator of the pitcher's overall ability level. The pitcher might have given up several home runs with the bases loaded, causing his ERA to be higher than it would have been if the home runs had been distributed randomly throughout the season.

By deriving a value from hits, walks, hit batters and home runs, Component ERA attempts to be a better evaluator of a pitcher's true ability to prevent runs.

Here is James' formula for Component ERA (CERA):

CERA=(((H+BB+HBP)*(.89*(1.255*H+2.745*HR)+.56*(BB+HBP-IBB)))/(BFP*IP))*9-.56

But there are a few problems with CERA:

The biggest is that it includes hits. Hits aren't a great indicator of a pitcher's true pitching ability. With the exception of home runs, the number of hits allowed by any pitcher are largely affected by the quality of the defense behind him. This makes sense, but it also stands up to statistical analysis. A pitcher's Strikeout Ratio (strikeouts pitched per 9 innings) is relatively consistent from year to year. However, a pitcher's Hit-Out Ratio (ratio of hits to outs, after removing strikeouts and homeruns) doesn't have the same consistency.

The second problem I have with CERA is that it's tough to calculate. Although they aren't perfect, I like measures such as Slugging Percentage and Total Average with formulae that are pretty easy to remember.

So, I created a slightly different form of Component ERA called "Defensive Independent Component ERA" (or DICE) that uses the variables in Component ERA, but removes hits (but leaves in Home Runs -- because these are almost never affected by defense).

At first, it looked something like this:

DICE = x + (y*(BB + HBP) + z*HR) / IP

Using all active pitchers in 1999 with 500 or more career Innings Pitched, I performed a regression on the above function to determine the constants x, y and z such that DICE best predicted their career average ERA. (There were 229 pitchers in this data set).

But after some experimenting, I noticed that ERAs were also strongly correlated with strikeouts, even when the other stats (walks, hit batters, and home runs) were already taken into account. As strikeouts are also defense-independent, it makes sense to add them to the formula. This is somewhat counter-intuitive. After all, a ground out can be just as good as a strikeout to end an inning. But the regression doesn't lie -- strikeouts are more effective than other types of outs at reducing earned runs. Or more accurately, strikeout numbers are useful in predicting a pitcher's ERA.

So I added strikeouts to the formula and performed another regression to determine the correct coefficients to use in the formula. Finally, I found the integer coefficients that best matched the data (because integers make the math easier than that required for CERA):

DICE = 3 + (3*(BB + HBP) + 13*HR - 2*K) / IP

(The Mean Squared Error for this formula, across all 229 pitchers, is .100697. The Square Root of the Mean Squared Error is about .317 -- meaning that about 2/3 of all actual ERA values should fall with .317 runs of a pitchers DICE value)

So there you have it:
1. Start with a value of 3 times the number of walks and hit batters
2. Add 13 for every home run allowed
3. Subtract 2 for every strikeout
4. Divide this total by the number of innings pitched
5. Finally, add this result to 3.00 to get the pitcher's Defense-Independent Component ERA (aka DICE).

Here's an example using Roger Clemens 1998 season (his most recent Cy Young Award):

DICE = 3.00 + (3 * (68 BB + 7 HB) + 13 * 9 HR - 2 * 292 K) / 264 IP = 2.14
Roger's actual ERA in 1998 was 2.05

Anyway, I first developed this stat to help me predict how a pitcher would perform in my rotisserie league. DICE is a better predictor of a pitcher's ERA in the upcoming year than any other stat I could find (such as his previous year's actual ERA). Using these predictions, I was able to win the league for 4 years out of 6 (and I'm currently in 1st place in year 7). And of course DICE is one of many tools we use inside the Baseball Mogul game engine.

Thursday, April 17, 2014

Creating an Expansion Team (Baseball Mogul)

This year's version of Baseball Mogul has a new feature: the ability to create a new expansion team and build it from players on current teams, using the current MLB rules for conducting expansion drafts.


When you choose "Expansion" on the New Game Dialog (above), there is a new button in the lower right with a question mark on it:


Clicking this button takes you to the Create Expansion Team dialog, where you select the city for your expansion team, and specify a team name, stadium name and division.

Note: The team name automatically includes your city name. For example, the above team will be called the "Las Vegas Dealers". You can use the League Editor to change this later (such as to the "Nevada Dealers").
After you click "Play", Baseball Mogul will automatically create a 2nd expansion team to ensure that there are an even number of teams. The computer analyzes the current city data and picks a city at random from among the best options.

Is it fair to assume that the "Oregon Cavemen" play in "GEICO Park"?
Baseball Mogul then hands you control of your team, at the beginning of the expansion draft.


Each of the existing teams is allowed to protect 15 players in the first round of the expansion draft, and 3 additional players in each additional round (and players drafted in the last 3 seasons, such as Manny Machado, do not need to be protected). For example, in the following list of third basemen, we see that the Yankees left A-Rod unprotected, because they would love an expansion team to take his contract off their hands:


At any point, you can use the Play Menu to let the computer complete the expansion draft for you. And, after the expansion draft is complete, you can still grab unsigned players to fill out your major-league and minor-league rosters.

Thursday, February 13, 2014

Baseball Mogul 2015 Pre-Order



We are now accepting pre-orders for Baseball Mogul 2015, which will go on sale on April 11th.

This pre-order option is limited to only 20 customers, and can be locked down by pledging $25 at the Kickstarter campaign for Masters of the Gridiron.

I admit that it's weird to use Kickstarter for Baseball Mogul, a product that is now in it's 17th version. We have always wanted to allow pre-orders of Baseball Mogul through our normal ordering system, but we aren't allowed to process a payment unless we immediately ship the product.

So, here we are, selling Baseball Mogul 2015 on Kickstarter at a whopping 28% discount, and you won't even be billed until after the Kickstarter campaign ends.

(Note also that we have added an option to pre-order both Baseball Mogul 2015 and Masters of Gridiron for $47, including free shipping inside the United States).

Sunday, March 24, 2013

Baseball Mogul 2014: New Feature Descriptions

Although this repeats some of the information posted earlier this month, this is the description of new features that is being included in the help files for Baseball Mogul 2014:

Major League Equivalencies

Baseball Mogul automatically analyzes each player's career (at all levels, including major league and minor league stats) and converts them to "Major League Equivalencies", projecting how each player will perform in the upcoming season. For example, a .300 batting average with the Pawtucket Red Sox might translate to a .273 batting average at the major league level. Real-life minor league stats (see below) are adjusted for level of play and park factors.

Tuesday, March 5, 2013

Baseball Mogul 2014: Minor League Park Factors

Park factors used for calculating 2013 Major League Equivalencies (MLEs) for minor league and major league players included in Baseball Mogul 2014. (.pdf version)

Five-year park factors generated using 2008-2012 minor league player data.

California League (Class A Advanced)

Team
State
Farm System
H
2B
3B
HR
BB
K
R
Bakersfield Blaze
CA
CIN
0.98
1.00
0.93
1.05
1.03
0.99
0.98
High Desert Mavericks
CA
SEA
1.05
1.03
0.85
1.23
1.03
0.94
1.13
Inland Empire 66ers
CA
LAA
0.98
0.96
1.15
0.79
0.99
1.03
0.93
Lake Elsinore Storm
CA
SD
0.96
1.01
1.13
0.84
1.02
0.97
0.95
Lancaster JetHawks
CA
HOU
1.08
1.04
0.91
1.21
1.01
0.96
1.14
Modesto Nuts
CA
COL
1.00
1.06
1.26
0.80
0.99
0.99
0.97
Rancho Cucamonga Quakes
CA
LAD
0.99
0.99
1.02
0.96
0.97
0.99
0.96
San Jose Giants
CA
SF
0.94
0.97
1.04
0.87
0.97
1.08
0.89
Stockton Ports
CA
OAK
0.98
0.95
0.71
1.22
1.02
1.04
1.00
Visalia Rawhide
CA
ARI
1.03
1.04
0.88
1.19
1.01
0.98
1.06