Quote:
Originally Posted by ProXy
That helps a little more, yeah. It also probably explains why it fails to match divisions for all of the combinations I've tried so far, as my league is one subleague with nine divisions of eight teams each (so SL1D1T8D2T8...D8T8D9T8, which I've shortened because it's quite long lol), so I don't have an even number of divisions.
|
Yup, that'll do it. Odd numbers of divisions per subleague are a real bear to handle—very few of the ways I'm cheating the difficulty of the problem end up working out well.
I do have one idea that may make it feasible to extend the double round robin scheduler to the odd-division-count case. Right now, the rotation is team-major, division-minor: teams in each pair of divisions in the round robin setup rotate, then the divisions rotate. In the odd-divisions case, this means that the division not currently paired with another gets a long series of off days on subleague-play days while the paired divisions finish their rotation.
The obvious solution is to add a switch to flip the order of rotation—division-major, team-minor. The off division switches every subleague day, so the byes are spread around more evenly. The difficulty (although it's not a serious difficulty, thinking about it as I write this) is that I have to keep track of every division pairing instead of just the current one, so I can keep track of the state of each pair's team rotation.
(Note to self: the solution is to save each pair's actual state indexed by each pair, and I don't have to generate them ahead of time, either—rotate the teams into a temporary pair object, look up the actual pair object by the pair.)
Quote:
My only other comments are things that I was hoping to be able to achieve but I think are impossible given the difficulty of implementation. For example, it would be nice if we could have multiple preferred series lengths so that I could, for example, have 17 games per intra-divisional matchup (two 4's and three 3's) whereas I think under the current system, it would be three 4's and one 5 or perhaps worse, four 4's and a random extra game somewhere.
|
I think this one might not be too hard at all, provided entering a list of all series (by length) to be played is an acceptable burden on the schedule author.
There may be some confounding factors there with odd team counts/bye days, however—I'd have to dig into it a bit, and I think I'm more likely to take a run at the double round robin scheduler upgrade first. For pools of odd size, I think the restriction would have to be that each length of series in the list has to occur enough times so that each team can have a bye series of each length.
Quote:
Other thoughts I had that would be cool things to have are things that would literally be impossible unless the OOTP devs took up your code somehow and implemented it into the game I think. Like, I had an idea when formulating my league that I wanted most subleague pools to put all teams with similar W/L records or similar rankings in their division together in an attempt to try to balance the schedule difficulties, but I don't think this mod could ever even consider schedule difficulty unless it had OOTP data to feed from.
|
If I'm not mistaken, OOTP randomizes which team gets which team number from a schedule file, so there would be some work required on the OOTP end before there's the chance to do pool selection based on inputs. It would be nifty, though!
Quote:
Despite my crazy ideas though, this is a great mod that works wonders for what I'm doing, so I'm satisfied, but if you're ever thinking of expanding the scope of what's possible with the mod, I think having more granular control over series lengths (or maybe something even more general than that, like maybe a thing where you could input what your desired matchups would be for a single team and then it tries to match that as best as possible?) would be an interesting place to start. I don't know how hard that would be to code, but as I'm a math major, I'm acutely aware (and tickled by) of the mathematics of combinatorial scheduling and I understand that, in general, it's an immensely difficult problem.
Speaking of the math of scheduling, I'm currently tackling with an interesting problem myself: given a particular schedule, is it possible to insert a non-zero number of break days without impinging on existing series and, if so, how many? I've mostly been messing with this by trial-and-error, but it's interesting because for some schedule permutations, there are multiple solutions (e.g. for a schedule where each team plays 18 games against all other teams in the division, plus 12 games each against three non-division teams and another 9 games against six non-division teams for a total of 126 divisional games and 90 subleague games, I can add 12, 18, or 24 break days without impinging on a series) and others have no solutions, at least for break day counts between 10 and 25.
Once again, this is a fantastic mod, and I'm really enjoying just playing around with it!
|
I appreciate the kind words! Alas, despite my computer science degree I was never very much good at the math beyond logic, and by making the scheduler operate on the basis of arranging blocks of series first and fitting matchups in in a second step, I managed to dodge a lot of the combinatorial complexity of the problem.
One of these days, I'd love to make a full-on constraint-based solver that can handle an NFL-type schedule, where some teams may be playing divisional games, some teams subleague games, and some teams interleague games, but I haven't yet found a treatment of the issue that's approachable enough to make that a possibility, and the computational complexity may mean that it's not really feasible for large leagues anyway. (That is, unless people want to leave their computers running for a day or two to crunch the numbers.)