Home | Webstore
Latest News: OOTP 18.8.76 Update Available - OOTP 18 Available - FHM 4 Available - MLB Manager 2017 Available Now

World Series Special: OOTP Baseball 18 Now 66% Off!

  

Go Back   OOTP Developments Forums > Out of the Park Baseball 18 > OOTP Mods > OOTP Mods - Schedules

OOTP Mods - Schedules Create your very own game schedules, or share historical schedules

Reply
 
Thread Tools
Old 10-19-2015, 04:05 PM   #1
Fishbreath
Minors (Double A)
 
Fishbreath's Avatar
 
Join Date: Oct 2015
Posts: 125
Thanks: 24
Thanked 67x in 36 posts
A custom schedule generator

This is a small program to create custom schedules for OOTP. Tested on Windows 10 and Linux Mint, but it should work on any Windows, Linux, or Mac system with a recent version of Java.

Please provide feedback and report errors in this thread. The README file in the release explains a little more about how to use it.

Get it here (v2.6).

Usage guide
  1. Open the 'run.bat' file (or 'run.sh' for Mac/Linux).
  2. The schedule generator will print some information about settings set to defaults and ask if you want to proceed. If your settings.ini file is missing critical settings, the scheduler will tell you so and prompt you to quit by pressing enter.
  3. If your settings.ini passes muster, the scheduler will prompt you to proceed by entering 'y'.
  4. The scheduler will print the generated opponent pools, series counts, and other debugging information, and then will adjust home-away balance and schedule game times on each day.
  5. The scheduler will prompt you to enter a command. 'help' describes what each command does. 'write' will output the schedule to a file in the same directory as the schedule generator.

Changelog
v1.0 (Nov. 18, 2015):
- Initial release.

v1.1 (Nov. 19, 2015):
- Fix a bug where the schedule generation engine would pick too large an interval between series against the same opponent, leading to schedules with clusters of games at the start and end of the calendar, and large free spaces. This reduces, sometimes dramatically, the break time required for the schedule generation engine to find a solution.

v1.2 (Nov. 25, 2015):
- Implemented week-aware scheduling.
- Implemented schedule normalization.

v1.3 (Nov. 30, 2015):
- Settings for scheduling all-star games and the all-star break.
- Fixes bug where week-aware schedules would get off-kilter because
of the in-game all-star break scheduling.
- New slot conflict detection model, which detects more bad schedules
early on.

v1.4 (Jan. 20, 2016)
- Allow underscores in league definitions.
- Relax constraints on number of games.

v2.0 (Jul. 21, 2017)
- Entirely revamp scheduling engine.

v2.1 (Jul. 23, 2017)
- Add division matching for interdivisional and interleague games. The engine will attempt to pair off divisions of equal size to play against one another.
- Improve interdivisional and interleague scheduling.
- Improve home-away balancing.

v2.2 (Jul. 26, 2017)
- Fix problem where interleague pools would improperly fall back to random when matched-divisions scheduling is possible - Further improve home/away balancing; should come up with schedules balanced in home/away games in each category (and for each team, if size settings allow).

v2.3 (Jul. 31, 2017)
- Add option to match subleagues rather than divisions for interleague games (i.e., each team in SL1 plays each team in SL2, rather than pairing divisions).
- Improve scheduling of break days.
- Add option to prevent random break days from falling on certain days of the week.
- Add option to prevent random break days from occurring in the middle of series, provided doing so would not leave a team off on a day of the week specified by the option above.
- Improve handling of settings, notifying users when required settings are missing and providing sensible defaults for optional settings.

v2.4 (Aug. 1, 2017)
- Improve handling of spaces in settings files.
- Fix mid_series_breaks=false setting stealing games from required play days.

v2.5 (Aug. 12, 2017)
- Fix schedule output for one-division leagues. (In the settings.ini file, you still have to enter the full league specifier: e.g. SL1D1T10. The generator will, however, output the OOTP-expected format, e.g. T10.) (Thanks to lbj273 for the bug report.)

v2.6 (Aug. 15, 2017)
- Fix bug where series of an unplayed type (e.g. interleague in schedules without interleague play) might be scheduled just before the all-star break if the unplayed series type length is shorter than the lengths for series of ordinary types. (Symptoms: fewer games played than required, incorrect home-away balance. Thanks to lbj273 for the bug report.)

To-do
Nothing! (Simple requests may be possible.)

Last edited by Fishbreath; 08-15-2017 at 11:39 AM.
Fishbreath is offline   Reply With Quote
22 thanks for this post:
Bowtie (02-19-2016), byzeil (12-08-2015), Clemente21PIT (11-19-2015), darkcloud4579 (10-28-2015), eriqjaffe (10-20-2015), Germaniac (10-21-2015), Hageneezz (10-19-2015), Hankyu Braves (10-28-2015), Izz (10-21-2015), joefromchicago (10-19-2015), jpeters1734 (10-20-2015), kq76 (10-22-2015), Padreman (01-28-2016), Pjm8804 (11-27-2015), prisonerno6 (12-27-2015), r0nster (11-11-2015), RANGER11JP (11-29-2015), RchW (10-19-2015), TheMaus2 (10-25-2015), themonk (11-28-2015), txranger (10-24-2015), uabfan (10-29-2015)
Old 10-20-2015, 10:39 AM   #2
Fishbreath
Minors (Double A)
 
Fishbreath's Avatar
 
Join Date: Oct 2015
Posts: 125
Thanks: 24
Thanked 67x in 36 posts
Last night saw the file-output bit finished, along with games scheduled more evenly through the day. I hope to do some .ini file parsing for settings and configuration, and then release a first pass for public consumption.

I did some thinking last night, and it may be less work than I thought to do perfectly-balanced schedules, by moving to a primarily games-per-team model, rather than a series-per-season model.

The former model would involve generating a set of games per team, according to preferences about opponent counts and desired number of times played, and handling the scheduling and the series-fitting later. The latter model, the one I'm using today, involves generating series according to the preferred series lengths to match a given season length, then fitting teams and schedules into the pre-defined series structure.

I figure the first model will work better in the long run, and be more useful. In short, the hard part now is getting the game structure correct, while the hard part with the alternate model would be getting the series structure correct, and the latter is less important, more idiosyncratic, and much easier to edit into an automatically-generated schedule file anyway.

That's a topic for some other time, though. I'm focused on getting this version out and usable first, before I go about making any major changes.
Fishbreath is offline   Reply With Quote
2 thanks for this post:
darkcloud4579 (10-28-2015), Hageneezz (10-20-2015)
Old 10-20-2015, 11:27 AM   #3
jpeters1734
Hall Of Famer
 
jpeters1734's Avatar
 
Join Date: Jun 2014
Location: Juust a bit outside...
Posts: 3,622
Thanks: 831
Thanked 1,849x in 1,075 posts
If you get this working, it might just be a top 3 mod of all time!!!
__________________
Online Teams:

Founder: The Baseball Classic - One of the most unique online leagues you'll find
Founder: Confederation of European Baseball, a Pro/Rel League
The Baseball Classic - Former GM Oil City Oilers 1972, 1979, 1989 Classic Cup Champions
Sydney Baseball Championship - Former GM North Sydney Bears 1974, 1976 Grand Finals Winner 1972, 1973 Grand Finals Runner-up

"Cannonball Coming!" Go Bucs!!
jpeters1734 is offline   Reply With Quote
2 thanks for this post:
Fishbreath (10-20-2015), Hageneezz (10-20-2015)
Old 10-20-2015, 10:36 PM   #4
thehip41
Major Leagues
 
thehip41's Avatar
 
Join Date: Aug 2014
Posts: 345
Thanks: 105
Thanked 179x in 126 posts
This sounds awesome.
thehip41 is offline   Reply With Quote
Old 10-21-2015, 07:52 AM   #5
kq76
Global Moderator
 
kq76's Avatar
 
Join Date: Nov 2002
Location: Vancouver, Canada
Posts: 8,706
Thanks: 1,065
Thanked 855x in 479 posts
Looking forward to it.

While this might be limited in the beginning, this might end up one of those projects where you re-visit from time to time making better each time until it does pretty much anything anyone could ever want from it.

In case you didn't know already, generated schedules were something that were once a very popular request and we had a greatly respected member who made tonnes of them by hand, but unfortunately we lost him. So while jpeters statement might sound like hyperbole at first, it might not be at all. As the voice said, "If you build it, he will come."

Good luck!
__________________
Support the one-and-done DH
(I think it's better than both the AL and NL games)
or more flexible substitution rules.
kq76 is offline   Reply With Quote
Thank you for this post:
Fishbreath (10-21-2015)
Old 10-21-2015, 10:56 AM   #6
Fishbreath
Minors (Double A)
 
Fishbreath's Avatar
 
Join Date: Oct 2015
Posts: 125
Thanks: 24
Thanked 67x in 36 posts
Here's the first pass at it, for your perusal and experimentation. Unzip it into any directory, then run the .bat file for Windows users, or the .sh file for Linux users (like me). You'll need Java installed. The schedule generator will read in settings from the settings.ini file, generate a potential schedule, and ask if you'd like to write it to a file. If you're satisfied with the schedule and enter 'y', it'll write the schedule to a file with the comment 'autogen' and timestamp. If you'd like to have the scheduler try again, enter 'n', and it'll generate a new schedule with the same parameters.

To configure the schedule generator, edit the settings.ini file. Comments in the file describe the functions of the various parameters. Note that the start_day parameter can be used to generate more complicated or more regular schedules, by generating the season in multiple parts and combining the files at the end. If you run the schedule generator from the command line, you can pass in a filename for a different settings.ini file as the first argument.

Some additional shuffling of scheduling order means that asymmetric divisions and subleagues are now supported, provided the overall number of teams in the league is even. The results will likely be poor without a large number of games, but they won't be altogether unreasonable all the time.

I'll be watching this thread. If it breaks, or does something unexpected, let me know.

The rest of this post will be an explanation of how the schedule generator works right now, so you can work out how best to exploit its idiosyncrasies.

  1. Generate the list of allowable series lengths, using the preferred, min, and max series length configuration parameters, along with the even series length parameter.
  2. Add the preferred series length to that list preferred factor more times.
  3. Create the prototype schedule: create series by randomly selecting a series length from the series lengths list and adding them to the prototype schedule, until the number of games in the prototype schedule is the number of games required.
  4. Assign series types. Declare each series from the prototype schedule to be a divisional series, subleague series, or interleague series, matching as closely as possible the numbers provided in the settings file. Here, and everywhere else, hitting the target numbers exactly is done in priority order: divisional games first, then subleague games, then interleague games.
  5. At this point, the schedule is in that priority order. Shuffle it, so that each type of series is spread roughly evenly through the season.
  6. Insert break days according to the settings in the config file.
  7. Select interleague opponents for each team.
  8. For each team, work out the number of games required against each opponent of each type.
  9. Shuffle the list of teams. For each team and each series type, pick the longest remaining series of that type that the team is not scheduled to play in. From the list of opponents not scheduled to play in this series, pick the opponent the team has the largest number of remaining games against. Schedule both teams for this series.
  10. If there are any teams left over, for instance if divisions have five teams each, schedule a game against another leftover team, using the priority order from above.
  11. For each opponent, tweak home/away games until home-away balance is attained.
  12. Set game times according to the configuration options.
Fishbreath is offline   Reply With Quote
2 thanks for this post:
joefromchicago (10-21-2015), thehip41 (10-21-2015)
Old 10-21-2015, 09:38 PM   #7
Fishbreath
Minors (Double A)
 
Fishbreath's Avatar
 
Join Date: Oct 2015
Posts: 125
Thanks: 24
Thanked 67x in 36 posts
I've just uploaded a small update which fixes a bug in the schedule file generation logic. (The <schedule> element would always contain a total_games attribute of 100, instead of the derived value.)

It also improves the schedule generation logic, targeting a specific number for each type of series instead of a specific number for overall games. The settings.ini file now contains series length configuration parameters for each type of series. The net result of these changes is that the scheduler is 1) more likely to happen upon quality schedules for any random set of parameters, and 2) much easier to tune to produce something close to a desired schedule.

The link in the post above should work.
Fishbreath is offline   Reply With Quote
Thank you for this post:
thehip41 (10-22-2015)
Old 10-22-2015, 04:08 PM   #8
Fishbreath
Minors (Double A)
 
Fishbreath's Avatar
 
Join Date: Oct 2015
Posts: 125
Thanks: 24
Thanked 67x in 36 posts
Now that I'm to something of a checkpoint—it isn't a perfect tool, but it does generate schedules that I wouldn't be terribly unhappy to be forced to play (my Elsdorf Argonauts are playing with one next season, in fact)—I'm interested in your input on what my next move should be with this tool. There are two paths I can take.

Option one: I have in mind some changes that would make the schedule generator better at handling arbitrary, asymmetric league structures, like tracking which teams were excluded from divisional play the last time the scheduler attempted to schedule a divisional game, or doing scheduling in a team-first rather than series-first manner, to do better at guaranteeing even matchups between teams where possible. The scheduler would still have a large random element, but would be better at generating sensible schedules for a wide variety of league structures. I think that some additional schedule realism would also shake out of this effort—games every day, with different break days for different teams.

Option two: provide deeper user configuration for schedule structure. You'd have the option to specify a list of series for each type of play, which the scheduler uses instead of automatically generating them, or a list of series per opponent per type, which gives you the ability to design a schedule almost to the game. Note that it would be hard to make that setup work with asymmetric divisional structure inside of subleagues, and may pose obstacles to asymmetry in any form.

I feel like I'm eventually going to get to both of these—in particular, specifying series per opponent may require doing part of the first option anyway. That said, I'm at a point where I'm more or less personally satisfied with the outcome of this project, and as such, I'm willing to let the time I put into it be more community-directed. Let me know what you'd like to see.
Fishbreath is offline   Reply With Quote
Old 10-23-2015, 01:20 PM   #9
Hageneezz
All Star Reserve
 
Hageneezz's Avatar
 
Join Date: Sep 2005
Location: The Hague,Netherlands
Posts: 539
Thanks: 67
Thanked 49x in 35 posts
This must be a stupid question (sorry for that), is it possible to generate a 94 game schedule for a league with 4 divisions of 5 teams? If so i must be doing something wrong, hope you can help..
Hageneezz is offline   Reply With Quote
Old 10-24-2015, 09:04 AM   #10
Fishbreath
Minors (Double A)
 
Fishbreath's Avatar
 
Join Date: Oct 2015
Posts: 125
Thanks: 24
Thanked 67x in 36 posts
It doesn't look like the scheduler can quite handle that yet.

The reason is that it doesn't track which teams have been left out of divisional play or subleague play in the case of odd numbers of teams. It does that selection randomly and counts on the law of averages, which unfortunately will only hold true in the very large scale. So, you'll end up with some teams getting left out of divisional play several times, and some teams getting scheduled for too many non-divisional games.

Since you were the first person to reply, and I kinda wanted to do the things it would take to make your schedule work anyway, I'll try and put the work in over the next week or two to make it generate better results.

As an aside, I sat here for five minutes or so generating schedules, and it did get it right... once... for one team. Guess I still have some work to do before it gets odd numbers right. :P

Code:
T14 schedule debug 94 games 47H/47A
Divisional 64 games 32H/32A
	T11 16 games 8H/8A
	T13 16 games 8H/8A
	T12 16 games 8H/8A
	T15 16 games 8H/8A
Subleague 30 games 15H/15A
	T4 2 games 1H/1A
	T7 2 games 1H/1A
	T1 2 games 1H/1A
	T8 2 games 1H/1A
	T3 2 games 1H/1A
	T16 2 games 1H/1A
	T18 2 games 1H/1A
	T10 2 games 1H/1A
	T17 2 games 1H/1A
	T6 2 games 1H/1A
	T20 2 games 1H/1A
	T9 2 games 1H/1A
	T2 2 games 1H/1A
	T5 2 games 1H/1A
	T19 2 games 1H/1A
Interleague 0 games 0H/0A
Fishbreath is offline   Reply With Quote
Thank you for this post:
Hageneezz (10-24-2015)
Old 10-27-2015, 08:25 AM   #11
bwburke94
Hall Of Famer
 
bwburke94's Avatar
 
Join Date: Jun 2008
Location: Amherst, MA
Posts: 3,215
Thanks: 220
Thanked 1,201x in 764 posts
So this is like the modern equivalent of StickWare?

EDIT: The 100 games bug is still popping up.
__________________
The "turn off league evolution" guy. Normal sig coming back when I have the time to update it.

Last edited by bwburke94; 10-27-2015 at 08:59 AM.
bwburke94 is offline   Reply With Quote
Old 10-28-2015, 08:42 PM   #12
TheMaus2
All Star Starter
 
TheMaus2's Avatar
 
Join Date: Feb 2014
Location: The OOTP Forums. Always.
Posts: 1,300
Blog Entries: 16
Thanks: 570
Thanked 246x in 202 posts
Sticky icky icky this!!!
__________________
Quote:
나는 비행기에있을 때 싫어. 내 옆에있는 물병으로 깨어 난다. 내가 지금이 물병에 책임 져야 해.
Quote:
Ich hasse es, wenn ich auf der Flucht bin und ich wache mit einer Wasserflasche neben mir auf, wie oh toll, jetzt muss ich für diese Wasserflasche verantwortlich sein
Quote:
Odio cuando estoy en un vuelo y me despierto con una botella de agua a mi lado como oh grande ahora tengo que ser responsable de esta botella de agua
Experience in OT Debates pays off sometimes.
TheMaus2 is offline   Reply With Quote
Old 10-28-2015, 09:17 PM   #13
darkcloud4579
Hall Of Famer
 
darkcloud4579's Avatar
 
Join Date: Jun 2003
Posts: 7,562
Blog Entries: 32
Thanks: 887
Thanked 1,078x in 768 posts
MVP contribution.
darkcloud4579 is offline   Reply With Quote
Old 10-28-2015, 11:16 PM   #14
Fishbreath
Minors (Double A)
 
Fishbreath's Avatar
 
Join Date: Oct 2015
Posts: 125
Thanks: 24
Thanked 67x in 36 posts
I'm about halfway through the fancier scheduling logic. It has three parts, one of which is trivial:

1. Opponent pool generation. Figure out which teams play which teams over the course of the season. Takes some finagling to figure out the best pools for asymmetric structures with too few games to play round robin. I wrapped this up tonight.

2. Matchup generation. Figure out how many times each team plays each other team. Trivial in the main, but harder for pools with asymmetric membership. (If a pool includes two teams from one division and three from another, we have to schedule extra matchups somewhere for the three-team group. Ideally it'll stay inside the pool, but I'm not sure I can make that generalize all the time.)

3. Schedule generation. Fit the scheduled matchups into a calendar. This will be the hard part. Lots of constraints to get right (or wrong), and a myriad of ways to start a schedule that's impossible to complete. We'll see how it goes.
Fishbreath is offline   Reply With Quote
Thank you for this post:
nightfly (11-12-2015)
Old 10-29-2015, 06:39 AM   #15
uabfan
Minors (Single A)
 
Join Date: Jul 2010
Location: Nashville, TN
Posts: 78
Thanks: 2
Thanked 9x in 8 posts
Hot damn, Fish. Hot damn.
uabfan is offline   Reply With Quote
Old 10-29-2015, 09:16 AM   #16
Fishbreath
Minors (Double A)
 
Fishbreath's Avatar
 
Join Date: Oct 2015
Posts: 125
Thanks: 24
Thanked 67x in 36 posts
Alrighty, baseball schedule mavens, I have a question for you.

For asymmetric league structures, or asymmetric division structures inside subleagues, it's required to have some asymmetric pools of opponents. Say for instance you have this structure:

SL1D1D5D2T6

Marking teams from D1 as 'A' and teams from D2 as 'B', assuming the schedule parameters require that we split the teams up into two groups, the most logical split seems to be this:

A1 A2 A3 vs B1 B2 B3
A4 A5 vs B4 B5 B6

The first group is easy—just do a schedule where each team plays each team from the other division the same number of times. The second group is harder. I can't schedule only interdivisional games, because the A teams would need to play more than the B teams. If I schedule all the teams in the pool to play round-robin, then it works, but as many as half of the games in an interleague pool won't be interleague games, in that formulation. Is there any better way than that?

What it comes down to, I guess, is that schedules that force asymmetric groupings are going to have to schedule some teams to play more divisional/subleague games when there aren't subleague/interleague games to work with. Is that acceptable?
Fishbreath is offline   Reply With Quote
Old 10-29-2015, 10:41 AM   #17
bwburke94
Hall Of Famer
 
bwburke94's Avatar
 
Join Date: Jun 2008
Location: Amherst, MA
Posts: 3,215
Thanks: 220
Thanked 1,201x in 764 posts
Quote:
Originally Posted by Fishbreath View Post
Alrighty, baseball schedule mavens, I have a question for you.

For asymmetric league structures, or asymmetric division structures inside subleagues, it's required to have some asymmetric pools of opponents. Say for instance you have this structure:

SL1D1D5D2T6

Marking teams from D1 as 'A' and teams from D2 as 'B', assuming the schedule parameters require that we split the teams up into two groups, the most logical split seems to be this:

A1 A2 A3 vs B1 B2 B3
A4 A5 vs B4 B5 B6

The first group is easy—just do a schedule where each team plays each team from the other division the same number of times. The second group is harder. I can't schedule only interdivisional games, because the A teams would need to play more than the B teams. If I schedule all the teams in the pool to play round-robin, then it works, but as many as half of the games in an interleague pool won't be interleague games, in that formulation. Is there any better way than that?

What it comes down to, I guess, is that schedules that force asymmetric groupings are going to have to schedule some teams to play more divisional/subleague games when there aren't subleague/interleague games to work with. Is that acceptable?
Alternating exclusions should work.

SERIES 1: Exclude B6, leaving five teams in each division.
SERIES 2: Exclude A1 and have two of the B teams play each other, leaving four teams in each division.
SERIES 3: Exclude B5, leaving five teams, et cetera.
__________________
The "turn off league evolution" guy. Normal sig coming back when I have the time to update it.
bwburke94 is offline   Reply With Quote
Thank you for this post:
Fishbreath (10-30-2015)
Old 10-30-2015, 09:59 AM   #18
Fishbreath
Minors (Double A)
 
Fishbreath's Avatar
 
Join Date: Oct 2015
Posts: 125
Thanks: 24
Thanked 67x in 36 posts
Thanks for the insight. I hit upon the algorithmic description of that this morning. Here's a slightly deeper discussion of the issue, and an explanation of the solution from the direction I came across it.

Automatic scheduling is a difficult problem. My goal is, wherever possible, to simplify it into smaller problems, so that I can compose a solution to a given set of scheduling constraints out of information gained from solving smaller problems about that schedule. One of those smaller problems I ran into with the first iteration was scheduling interleague games. You can't simply schedule willy-nilly, because it's very easy for random chance to require a team be playing two other teams at once. That led me to do some work on figuring out opponent pools ahead of time: this seems like the way a human scheduler would figure things out, for one, and for another, it lets me go into matchup planning with the knowledge that this team must play these opponents, and need not be reserved for any other opponents.

The idea behind planning pools and matchups first is that by doing so, I can divide the season into three parts: divisional, subleague, and interleague parts. Each part should contain the same number of games. This means that I can plan matchups inside the pools and end up with the right number of overall games in the end. This also means that unbalanced subleague and interleague pools will end up with some divisional and subleague play scheduled, respectively, which is acceptable.

The question, then, is what constitutes a balanced pool? It's a pool where every sub-structure contributes the same number of parts, or, equivalently, where every substructure has the same number of opponents. In that case, each team requires one matchup per opposing team in the pool.

Unbalanced pools may require a different number of matchups, depending on the structure. Where n is the overall number of teams in the pool, and s is the number of teams contributed by the substructure with the fewest teams in the pool, the number of matchups required appears to be (n - s) * s. For instance, in a 3-2 pool as given above, six matchups are required. The three-team substructure plays each team from the two-team substructure twice, which leaves the three-team substructure with four matchups each and the two-team substructure with six each. The two-team substructure is finished. Each team from the three-team substructure plays each other team from within the substructure once, filling their six-matchup requirement.

With that information in hand, I can examine the number of games allocated to the type of play. If every pool is balanced, it doesn't matter—each team can schedule a slightly longer series against one opponent without wrecking the schedule. If any pool isn't balanced, we have to pick a number of games for the pool: the number closest to the desired number for the pool's type that is divisible by the number of matchups in every pool, and is a multiple of the preferred series length. At that point, we can assign series to each matchup based on the preferred series length number.

That just about wraps up the brain-work I need to do on matchup planning. Next step is to get that coded and tested, then I have to dive in on the actual scheduling. Which, I should remind you, is one of the parts I thought would be hard, in contrast to this part, which I rather incorrectly thought would be easy. :P
Fishbreath is offline   Reply With Quote
Thank you for this post:
pgjocki (10-30-2015)
Old 10-31-2015, 09:50 PM   #19
Fishbreath
Minors (Double A)
 
Fishbreath's Avatar
 
Join Date: Oct 2015
Posts: 125
Thanks: 24
Thanked 67x in 36 posts
Below is the progress to date, with all the information I need to begin to move into the actual scheduling portion. The league structure below is SL1D1T4D2T4SL2D1T5D2T5, a plausible 18-team setup which requires some interleague pools with unbalanced team numbers. Note that the code correctly identifies the two unbalanced pools, by showing that some teams have more available opponents than other teams.

Code:
Divisional pool [T1, T2, T3, T4]
Divisional pool [T5, T6, T7, T8]
Divisional pool [T9, T10, T11, T12, T13]
Divisional pool [T14, T15, T16, T17, T18]
Subleague pool: [T3, T4, T2, T1, T7, T6, T8, T5]
Subleague pool: [T11, T9, T12, T10, T13, T16, T18, T17, T15, T14]
Interleague pool: [T8, T5, T14, T15, T10]
Interleague pool: [T3, T1, T9, T12, T13]
Interleague pool: [T2, T4, T18, T17]
Interleague pool: [T7, T6, T16, T11]
Divisional opponent sizes: [3:4]
Divisional opponent sizes: [3:4]
Divisional opponent sizes: [4:5]
Divisional opponent sizes: [4:5]
Subleague opponent sizes: [4:8]
Subleague opponent sizes: [5:10]
Interleague opponent sizes: [3:2, 2:3]
Interleague opponent sizes: [3:2, 2:3]
Interleague opponent sizes: [2:4]
Interleague opponent sizes: [2:4]
Here's a sample list of matchups developed for T1 in Hageneezz's league structure (four divisions of 5 teams, 16 games per divisional opponent, 2 games per interdivisional opponent). The list consists of a list of series per opponent.

Code:
[T2:[4D series T1vT2, 4D series T1vT2, 4D series T1vT2], T3:[4D series T1vT3, 4D series T1vT3, 4D series T1vT3], T4:[4D series T1vT4, 4D series T1vT4, 4D series T1vT4], T5:[4D series T1vT5, 4D series T1vT5, 4D series T1vT5], T6:[1S series T1vT6, 1S series T1vT6], T7:[1S series T1vT7, 1S series T1vT7], T8:[1S series T1vT8, 1S series T1vT8], T9:[1S series T1vT9, 1S series T1vT9], T10:[1S series T1vT10, 1S series T1vT10], T11:[1S series T1vT11, 1S series T1vT11], T12:[1S series T1vT12, 1S series T1vT12], T13:[1S series T1vT13, 1S series T1vT13], T14:[1S series T1vT14, 1S series T1vT14], T15:[1S series T1vT15, 1S series T1vT15], T16:[1S series T1vT16, 1S series T1vT16], T17:[1S series T1vT17, 1S series T1vT17], T18:[1S series T1vT18, 1S series T1vT18], T19:[1S series T1vT19, 1S series T1vT19], T20:[1S series T1vT20, 1S series T1vT20]]
Note that this isn't a complete solution: I still have the hard part to do, which is slotting things into the actual schedule, and before I get to that, I need to implement matchup generation for unbalanced divisions. I hope to have that done before too long, but at the same time, the Falcon 4 BMS crew just released a new version, and there's some jetting around waiting for me. :P

More updates as they come.
Fishbreath is offline   Reply With Quote
Old 11-01-2015, 05:19 PM   #20
Fishbreath
Minors (Double A)
 
Fishbreath's Avatar
 
Join Date: Oct 2015
Posts: 125
Thanks: 24
Thanked 67x in 36 posts
Ever nearer to success. Below is the result of the work on asymmetric matchup generation. It turned out to be a bit of a pain implementing the logic I'd already tested on paper, but we got there.

Note that this version of the schedule generator, when finished, will automatically tweak the number of games required to attain better balance. The settings were 50/30/20, but ended up being 60/30/24. (The logic calculates the number of matchups required to fit into a given structure, then looks for the first number of games at or above the requested game count that is evenly divided by all the matchup numbers.) Note also the uneven subleague pools, e.g. [T13, T16, T19]. Each team plays 30 games in that pool, but only T13 plays 30 non-divisional games (15 against each opponent). T16 and T19 must play 15 games against each other to make up the shortfall.

The scheduling parameters are getting simpler, too, in favor of increased auto-generation logic. Now, you don't need to plug in very much more than the desired number of games per opponent type, the desired length of series per opponent type, and the league structure.

Code:
DIVISIONAL pool: [T1, T2]
T1 60 games
T2 60 games

DIVISIONAL pool: [T3, T4, T5]
T3 60 games
T4 60 games
T5 60 games

DIVISIONAL pool: [T6, T7, T8, T9, T10]
T6 60 games
T7 60 games
T8 60 games
T9 60 games
T10 60 games

DIVISIONAL pool: [T11, T12]
T11 60 games
T12 60 games

DIVISIONAL pool: [T13, T14, T15]
T13 60 games
T14 60 games
T15 60 games

DIVISIONAL pool: [T16, T17, T18, T19, T20]
T16 60 games
T17 60 games
T18 60 games
T19 60 games
T20 60 games

SUBLEAGUE pool: [T1, T4, T6, T8]
T1 30 games
T4 30 games
T6 30 games
T8 30 games

SUBLEAGUE pool: [T2, T3, T9]
T2 30 games
T3 30 games
T9 30 games

SUBLEAGUE pool: [T5, T10, T7]
T5 30 games
T10 30 games
T7 30 games

SUBLEAGUE pool: [T11, T14, T18, T20]
T11 30 games
T14 30 games
T18 30 games
T20 30 games

SUBLEAGUE pool: [T12, T15, T17]
T12 30 games
T15 30 games
T17 30 games

SUBLEAGUE pool: [T13, T16, T19]
T13 30 games
T16 30 games
T19 30 games

INTERLEAGUE pool: [T8, T9, T13, T12]
T8 24 games
T9 24 games
T13 24 games
T12 24 games

INTERLEAGUE pool: [T3, T10, T11, T17]
T3 24 games
T10 24 games
T11 24 games
T17 24 games

INTERLEAGUE pool: [T4, T5, T14, T20]
T4 24 games
T5 24 games
T14 24 games
T20 24 games

INTERLEAGUE pool: [T2, T6, T16, T18]
T2 24 games
T6 24 games
T16 24 games
T18 24 games

INTERLEAGUE pool: [T7, T1, T19, T15]
T7 24 games
T1 24 games
T19 24 games
T15 24 games
Below is Hageneezz's structure. I see that thehip41 is working on that request already, and I suspect he'll beat me to the punch, but we'll see.

Code:
DIVISIONAL pool: [T1, T2, T3, T4, T5]
T1 64 games
T2 64 games
T3 64 games
T4 64 games
T5 64 games

DIVISIONAL pool: [T6, T7, T8, T9, T10]
T6 64 games
T7 64 games
T8 64 games
T9 64 games
T10 64 games

DIVISIONAL pool: [T11, T12, T13, T14, T15]
T11 64 games
T12 64 games
T13 64 games
T14 64 games
T15 64 games

DIVISIONAL pool: [T16, T17, T18, T19, T20]
T16 64 games
T17 64 games
T18 64 games
T19 64 games
T20 64 games

SUBLEAGUE pool: [T4, T5, T1, T3, T2, T6, T8, T7, T9, T10, T15, T11, T12, T13, T14, T20, T19, T16, T17, T18]
T4 30 games
T5 30 games
T1 30 games
T3 30 games
T2 30 games
T6 30 games
T8 30 games
T7 30 games
T9 30 games
T10 30 games
T15 30 games
T11 30 games
T12 30 games
T13 30 games
T14 30 games
T20 30 games
T19 30 games
T16 30 games
T17 30 games
T18 30 games
The only thing left to do is the final scheduling, although I say that with some reservation. Slotting games into a calendar is the hardest part, and undoubtedly it'll take some time to get right.
Fishbreath is offline   Reply With Quote
Reply

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 05:37 AM.

 

Major League Baseball trademarks and copyrights are used with permission of MLB Advanced Media, L.P. Minor League Baseball trademarks and copyrights are used with the permission of Minor League Baseball. All rights reserved.

The Major League Baseball Players Association (www.MLBPLAYERS.com ) is the collective bargaining representative for all professional baseball players of the thirty Major League Baseball teams and serves as the exclusive group licensing agent for commercial and licensing activities involving active Major League baseball players. On behalf of its members, it operates the Players Choice licensing program and the Players Choice Awards, which benefit the needy through the Major League Baseball Players Trust, a charitable foundation established and run entirely by Major League baseball players. Follow: @MLB_Players; @MLBPAClubhouse; @MLBPlayersTrust

Out of the Park Baseball is a registered trademark of Out of the Park Developments GmbH & Co. KG

Google Play is a trademark of Google Inc.

Apple, iPhone, iPod touch and iPad are trademarks of Apple Inc., registered in the U.S. and other countries.

COPYRIGHT © 2017 OUT OF THE PARK DEVELOPMENTS. ALL RIGHTS RESERVED.

 

Powered by vBulletin® Version 3.8.10
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Copyright © 2015 Out of the Park Developments