tag:blogger.com,1999:blog-32379171877257744432017-02-08T22:43:40.930-06:00Making Baseball Schedulesgmohttp://www.blogger.com/profile/15132077067653458053noreply@blogger.comBlogger6125tag:blogger.com,1999:blog-3237917187725774443.post-86015247878559942322009-12-05T20:39:00.002-06:002009-12-05T20:40:35.727-06:00Series Layout - Some BasicsOkay, enough philosophical rambling (for now). This is a peek at work that actually makes a schedule, or at least some of the first basic steps.<br /><a name='more'></a>Time to open up the spreadsheet <b>(1)</b> and start laying out the series that will ultimately turn into the schedule. Series are my building blocks. What do they look like in the spreadsheet? Here is an example:<br /><div class="separator" style="clear: both; text-align: center;"><a href="http://2.bp.blogspot.com/_wEGJA5fo_Mo/SxsXhcwDx8I/AAAAAAAAAAM/j_gHyCUQnRU/s1600-h/one_series.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://2.bp.blogspot.com/_wEGJA5fo_Mo/SxsXhcwDx8I/AAAAAAAAAAM/j_gHyCUQnRU/s320/one_series.png" /></a><br /></div>Those 3 cells containing 3 numbers define a series for me. The left cell has the number of games in the series, and I underline that number to help differentiate it and give some pattern to the layout when it is full of series. The next cell in the middle is a number to indicate the away team. The last cell on the right is a number to indicate the home team.<br /><br />I suspect most readers here are familiar with <a href="http://www.ootpdevelopments.com/">OOTP</a> using counting numbers to represent the teams in the schedule files. Almost every other reason besides needing them in the end result also points to using numbers to represent teams. The names are essentially never known in making the schedule and will vary across seasons anyway, small numbers allow the spreadsheet cells to be very small and compact, and numbers allow use of formulas in various processing steps through development.<br /><br />Going back to the series shown above with 3 games of 1 playing at 2, let us expand on those teams' matchups to what they may have for a whole season. Suppose these teams are division opponents and are determined to be playing each other a total of 20 times. The obvious choice then is to have each team host 10 of those 20 games, and 10 games can be spread across three series of 3, 3, and 4 games. That would look like this:<br /><div style="text-align: center;"><span id="goog_1260066606837"></span><span id="goog_1260066606838"></span><a href="http://1.bp.blogspot.com/_wEGJA5fo_Mo/SxsXnGEDd2I/AAAAAAAAAAU/riyUMPCfOPE/s1600-h/two_teams_matchups.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://1.bp.blogspot.com/_wEGJA5fo_Mo/SxsXnGEDd2I/AAAAAAAAAAU/riyUMPCfOPE/s320/two_teams_matchups.png" /></a><br /></div> That is simple enough, so let us now step from two teams to four teams. For an added level of complication we will have the number of games against each opponent be not quite equal and not all even. That means special attention must be paid to make sure the home and away game totals even out.<br /><br />Suppose the four teams are each to play a total of 38 games combined against the other three teams. If it was 36 total games, it would be easy to split them 12 (6 H & 6 A) against each of the 3 opponents. For 38 there needs to be two "additional" games - one against each of two of the opponents, with one being home and one away.<br /><br />In this case determining the matchups for any given time is trivial. Whenever 1 plays 2, then 3 plays 4. Whenever 1 plays 3, then 2 plays 4. Whenever 1 plays 4, then 2 plays 3. I will later discuss handling the matchups for more teams.<br /><br />There are various ways the additional 1 home game against one opponent and 1 away game against another opponent for each team can be added. One good way to work it is to give each team the one more home game against the "next" team and the one more away game against the "previous" team. For example, 1 can host 2 (the "next" number/team) and play at 4 (the "previous" number/team as the last number can be considered the one before the first number) for their additional games. Then to fill out the needed games 2 can host 3, and 3 can host 4. The end result looks like this:<br /><div style="text-align: center;"><a href="http://3.bp.blogspot.com/_wEGJA5fo_Mo/SxsYDD2RQVI/AAAAAAAAAAc/ul6R2MgWd1s/s1600-h/four_teams_matchups.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://3.bp.blogspot.com/_wEGJA5fo_Mo/SxsYDD2RQVI/AAAAAAAAAAc/ul6R2MgWd1s/s320/four_teams_matchups.png" /></a><br /></div>The "additional" games are what make the 4-game series not be 3-game series. Note how two of the 4-game series (2 @ 1 and 4 @ 3) are on the same row, while the other two (1 @ 4 and 3 @ 2) are on separate rows. Where they are is usually not important, but it can matter and might change as the process continues.<br /><br /><br />(1) A technical note... My spreadsheet program is the generic spreadsheet in Microsoft Works. High-tech, huh?! I think if I ever got Excel those files could transfer directly over. The OpenOffice spreadsheet is a little different as in formulas it used semicolons where I have commas now. Not sure if OO could thus directly ingest my files.gmohttp://www.blogger.com/profile/15132077067653458053noreply@blogger.com1tag:blogger.com,1999:blog-3237917187725774443.post-14049527700431759412009-11-23T21:22:00.002-06:002009-11-23T21:24:55.715-06:00Series as Building Blocks - Part 2When a schedule request specifies to some degree the number of games per opponent my first step is figuring out how to break them down into series, preferably mostly 3-game series and some 4-game. If the games per opponent are not prescribed, I gravitate toward numbers that make for an easier series breakdown.<br /><a name='more'></a><br /><br />That may even mean sacrificing perfect balance like in home/away (H/A) games per opponent. If some opponent is to be played 10 times in total, nice balance would be 5 H and 5 A. But 5 is not a preferable number for making series. I will use 2-game series as needed, and if this is the only opponent to play 10 times then I may go with a 2-game series and a 3-game series both H and A for an even 5/5 split.<br /><br />My inclination though is to split the 10 games into two 3-game series (both either H or A) and one 4-game series (A or H, which ever the 3-game series are not). That alone would mean an uneven H/A split of 6/4 or 4/6. But if there are 4 teams to be played 10 games, then there could be two with the 6/4 split and two with the 4/6 split. That would mean an even split of H/A across the whole set of opponents even though the split is not even for any single one of them. This 6/4 or 4/6 split still something I am not particularly fond of as I intend to describe later down the line.<br /><br />I can understand wanting perfect symmetry with home and away. But a request for playing all 5 division opponents 16 times, split 8H/8A, is not a recipe that I like because it means 2+3+3 or 4+4 to get to 8. It depends on how the rest of the games fall into series, but one way I might do 16 games against each of 5 division opponents is 8/8, 7/9, 9/7, 7/9, and 9/7.<br /><br />On the other side of not enough 3-game series can be too many 3-game series. For example, take 12 teams divided into 2 divisions of 6 teams each. For 162 games you could have all 3-game series with 18 games per division opponent (18*5=90) plus 12 games per opponent in the other division (12*6=72). For 18 games you could have three home 3-game series and three away, and for the 12 it could be two home 3-game series and two away. It may seem ideal, except the total series equals 54, which introduces issues from <a href="http://makingbaseballschedules.blogspot.com/2009/11/series-as-schedule-building-blocks-part.html">part 1</a> - all series taken as half-weeks means a season that is a week and a half longer than modern MLB because there is an offday for each team every week rather than the majority of weeks.<br /><br />If requests are for all 4-game series so that the schedule is not simply 2 series per week or for all 3-game series with a offday for all teams each week, that can generally be accommodated. They though may not be as beautiful in the eye of this beholder, a minor concern. However more importantly they may not be as easy to develop by this creator.gmohttp://www.blogger.com/profile/15132077067653458053noreply@blogger.com0tag:blogger.com,1999:blog-3237917187725774443.post-48662971025626306862009-11-21T12:55:00.000-06:002009-11-21T12:55:28.212-06:00Series as Schedule Building Blocks - Part 1Schedules are about teams playing games. But typically for me individual games are not considering during much of the process. For most of the way I only care about series rather than the individual games that compose series.<br /><br />The fewer independent parts to have to manage and manipulate, the easier the process is. That theme will be recurring.<br /><a name='more'></a><br />A 3-game series of games on consecutive days is much easier to work with than 3 individual games. The series packages the games together into a single unit, so that is what I use until the point where the individual games need to be put down on specific dates for the end product. With mostly 3-game series and some 4-game series, then rather than 6 or 7 games per week I only have to manage 2 series.<br /><br />In fact, exactly 2 series per week like that (as is typical for modern MLB as described previously) is how I prefer to work. I get the number of games, but immediately shift to considering number of series, which hopefully is directly related to the length of the schedule.<br /><br />The MLB schedule is 26 weeks, or 52 half-weeks. One of those half-weeks is the All-Star Break, so there are 51 half-weeks for series, thus the aim would be 51 series. For 162-games schedules like MLB I figure to try to match that. How is that done with 3-game & 4-game series? Here is the math, with X being the number of 3-game series and Y the number of 4-game series:<br /><br /><span style="font-family: "Courier New",Courier,monospace;">X + Y = 51 (total series)</span><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;">3*X + 4*Y = 162 (total games)</span><br style="font-family: "Courier New",Courier,monospace;" /><br />Rearrange the first equation to solve for Y, then substitute that for Y in the second equation:<br /><br /><span style="font-family: "Courier New",Courier,monospace;">Y = 51 - X</span><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;">3*X + 4*(51 - X) = 162</span><br style="font-family: "Courier New",Courier,monospace;" /><br />Solve the second equation for X, which allows for determination of Y also from the first total series equation:<br /><br /><span style="font-family: "Courier New",Courier,monospace;">3*X + 204 - 4*X = 162</span><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;">X = 42</span><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;">Y = 9</span><br style="font-family: "Courier New",Courier,monospace;" /><br />We could have figured that out a little less explicitly mathematically. What if 162 games were all in 3-game series? That would be 162/3=54 series. That is 3 more half-weeks than the MLB template. I fairly regularly end up making schedules with only 3-game series, but for 162 games that makes the season a week and a half longer. To avoid that the games of the "extra" 3 series need to be absorbed by other series to make some 4-game series. With 3 extra series of 3 games each, that is 9 series that need to be made into 4-game series.<br /><br />Whatever the total number of games, if given the flexibility my first step is to translate that number of games to a workable number of series. For 144 games, 46 series allows for about the same frequency of offdays. For 120 games, 38 series is an obvious choice.<br /><br />The next trick after that is slotting opponents home and away into those series. That can be very tricky and lead to having to go back and start all over. Consider the 51 series for a 162-game schedule. That is an odd number meaning that the number of home and away series will not be equal, probably being 25 of one and 26 of the other.gmohttp://www.blogger.com/profile/15132077067653458053noreply@blogger.com0tag:blogger.com,1999:blog-3237917187725774443.post-47075991405712722062009-10-13T20:34:00.000-05:002009-10-13T20:34:26.510-05:00The Modern MLB scheduleWhen I make a schedule I tend to gravitate in the absence of contrary specifications (and maybe sometimes in spite of them!) to a form very similar to that of <a href="http://www.retrosheet.org/schedule/index.html">modern Major League Baseball (MLB) schedules</a> for parameters not specific to league structure. What I mean by modern is basically the last several years when I have been making schedules, though not much has changed across the wild card/interleague era going back to the mid-1990s. Maybe "current" is a better term, but I am using "modern".<br /><br />This is probably the sort of schedule with which more people, at least in the US and Canada, are more familiar than any other. I suspect that even if the specifics are not consciously known, many people have a good "feel" for many of the parameters. Unless something is specified otherwise I will generally make the assumption that someone requesting a schedule is figuring on parameters similar to current MLB. From that mindset initially when I first got into this some of my creation techniques became geared more toward making schedules with resemblance to modern MLB. That in turn leaves me more inclined in that direction, which over time leads to a preferred style.<br /><br />Now I will describe and discuss some of the parameters of the modern MLB schedule. Feel free to comment on any you may like or not like.<br /><a name='more'></a><b>Mostly 3-game series with some 4-game series and possibly a few 2-game series</b><br /><br />Series will get their own full post soon. For a brief summary, with two series per week both being 3-game means one offday, and one being 4-game means no offday that week. I have developed methods specific to such a scheme.<br /><br /><b>Monday through Sunday "baseball week"</b><br /><br />Most people probably know MLB series are almost always ending on Sundays. Sometimes series will wrap around to Monday, especially in some cases with Monday holidays. But as a rule of thumb we can say series end Sundays. Working back from that those series started either on Thursday (if it was a 4-game series) or Friday (if it was a 3-game series). The early part of the week also gets a series. Depending on the weekend series, the early-week series may be 4 games (Mon-Thu) or 3 games (Mon-Wed or Tue-Thu).<br /><br />That is the usual pattern for MLB and what I aim to do whenever possible.<br /><br /><b>3-4 day All-Star Break slightly after mid-season</b><br /><br />The break begins 1 week after the approximate mid-point in terms of games, so that teams typically go in having played about 87-88 games. With the All-Star Game on Tuesday the break is Monday through Wednesday at least, with teams playing a 3-game Fri-Sun series coming out of the break off Thursday also.<br /><br />I generally follow that pattern for 162-game schedules. For fewer games I will tend to push the All-Star Break closer to the end of the season to allow for more games to be played. For example, a 100-game schedule would have the All-Star Break after about 55 games if at the same relative point as MLB, but I would probably put it after 60-70 games.<br /><br /><b>Offdays on average about one per 10 days (i.e., two per three weeks)</b><br /><br />MLB currently plays 162 games across 182 days from the first Monday in April to the Sunday a few days before or after October 1st. Or at least that is what I consider it by ignoring things like a single game Sunday night on national TV before most other teams start the season the next day or games in Japan several days before. That means 20 offdays total across 26 weeks, but again 3-4 of those occur during the All-Star Break.<br /><br />Also offdays fall differently for different teams. At any given time even without real world postponements one team may have played a few more games than another. I like that. I like regularly seeing half-games in the games back column of the standings. I like when opposing pitching rotations do not exactly align. I can understand reasons people may have for wanting all offdays the same for teams, and that is easier to do as a rule. But I prefer a schedule that is "messier" with the offdays like MLB has.<br /><br /><b>Maximum of 20 consecutive days without offday</b><br /><br />This is a regulation within the collective bargaining agreements between MLB ownership and the players association, <a href="http://www.ootpdevelopments.com/board/talk-sports/44049-mlb-scheduling-regulations.html">as many schedule parameter rules are.</a> It means no more than 2 consecutive weeks without an offday.<br /><br />Sometimes requests leave no need to worry about this with gamedays being much less common than offdays, and occasionally offdays may be prescribed to be rarer. But whenever possible I do make a point to adhere to this guideline.<br /><br /><b>Homestands and road trips limited to about 3 series maximum</b><br /><br />Ideally for player travel considerations there are not too long road trips and homestands are not generally too short so that teams have too much coming and going. The MLB schedule will tend to be dominated by homestands and road trips with length of two series (6-7 games). Some extend to three series (9-11 games), but few will be only 1 series (3-4 games).<br /><br />My standards are somewhat more relaxed. My goals are no homestands or road trips longer than 14 games and trying not to exceed some amount of single-series homestands and road trips. Avoiding too-long takes precedence over limiting the number of too short. If everything else is satisfactory I will not work to try to eliminate further single-series homestands and road trips.<br /><br /><b>No doubleheaders</b><br /><br />The regularly scheduled doubleheader has now disappeared from the MLB schedule. I do not use doubleheaders unless specifically requested because my process is just a bit cleaner and easier without them.<br /><br /><b>Unbalanced with division opponents played above twice as often or slightly more than other league opponents</b><br /><br />This degree of imbalance has developed as the ratio of division opponents to other league opponents has decreased. Obviously before the divisional era schedules were balanced, and even during the divisional era MLB had time with balanced schedules.<br /><br />League structure and amount of interleague play are important factors in shaping exactly how unbalanced to make a schedule. If the desire is to play all non-division opponents in two series, one home and one away, then the rest of the games (ignoring or besides any interleague) must be division games. Playing 162 games that way with two divisions of 6 teams would mean about 25 games per division opponent with the 6 games per other league opponent, whereas two divisions with 10 teams it would mean only about 11-12 games per division opponent.<br /><br />Both the 2:1 ratio of games per division opponent to games per non-division league opponent and a pair of 3-game series per non-division league opponent are common starting points for me in developing schedules when requests do not have exact specification of the imbalance.<br /><br /><b>Handful of interleague series in total</b><br /><br />About 10 percent of games are interleague currently in MLB. For similar sized leagues I aim for something similar, though for smaller leagues there figure to be higher percentages of interleague games. MLB limits the interleague play to the first half of the season, not too early but not too close to the All-Star Break. I am inclined to spread it out a little more and have some series after the All-Star Break. With 6 series across a schedule with a span like MLB, I may put the interleague in 2 series in late May, 2 series in mid-June, and 2 series in early August.gmohttp://www.blogger.com/profile/15132077067653458053noreply@blogger.com0tag:blogger.com,1999:blog-3237917187725774443.post-73058690921581413792009-09-30T20:46:00.000-05:002009-09-30T20:46:19.330-05:00Schedule parameters introduction I know this may be like telling people who wonder how to build a house, 'this is a board, and this is a nail.' But I think talking about some nuts and bolts (and mixing metaphors) is a good start. I do want to get the basics out there and have people think about the factors that come into play when mapping out a schedule. Plus I am still figuring out how I want to approach describing aspects of the creation process.<br /><br />Everything that defines how to make a schedule can be considered parameters. All the details in a request for a schedule, plus a variety of other details typically not specified are parameters. Total number of games, numbers of games against division/league/interleague opponents, start/end dates, All-Star Break, and offday frequency are among the key parameters.<br /><br />A well-defined schedule request includes specification of enough parameters to establish a good blueprint for constructing the schedule. Most of the above-mentioned are critical. Obviously without the number of games there is no way to know how to make a schedule. Perhaps less obviously though the timeframe for the schedule is important. There is a major difference between a 100 game schedule spanning 16 weeks versus spanning 26 weeks. You can say build a house that looks like this, but you better also tell the size to make it.<br /><br />Every possible detail need not be explicitly spelled out in a request. Some parameters can be defined by other parameters. For example, offday frequency is generally established by the number of games plus the start and end dates rather than being stated directly.<br /><br />Some parameters I will take the liberty of defining myself if the request did not and there is an apparently obvious choice. For a 162 game schedule, unless told otherwise I will assume it can be like modern MLB and span 26 weeks (including, if applicable, a half-week All-Star Break).<br /><br />The better defined the parameters are, the clearer the blueprint is, and thus the more certain the instructions on how to build the schedule will be. That is usually good, however it can also cause problems. Parameters might be contradictary. That can usually be fixed though. A more difficult problem is when parameters are such that I do not see the schedule as being feasible to produce. A complicated league structure with a very specific breakdown of games per opponent simply may not be possible to make, or at least in any reasonable amount of time.<br /><br />In the future I plan to discuss how various parameters fit into my schedule creation process.gmohttp://www.blogger.com/profile/15132077067653458053noreply@blogger.com1tag:blogger.com,1999:blog-3237917187725774443.post-32968418940858896962009-09-19T23:57:00.002-05:002009-09-20T22:27:46.872-05:00A take on making baseball schedulesMy initial goal with this blog is to try to convey how I make schedules in the hopes that others may also be able to utilize my techniques and make schedules.<br /><br />I came to start making baseball schedules for the <a href="http://www.ootpdevelopments.com/" target="_blank" title="OOTP">Out of the Park Baseball (OOTP)</a> computer game in 2004 when version 6 allowed the importing of schedule files. To this point making schedules for OOTP remains essentially my only activity as far as making schedules goes. The focus here though is on the general process of creation of the schedules and not the final output into any particular format like the files OOTP can ingest.<br /><br />I welcome any suggestions on what to do here. I already have some ideas, and I make no promises about the amount of activity here, but I am open to reasonable ideas.gmohttp://www.blogger.com/profile/15132077067653458053noreply@blogger.com3