|
||||
|
|
OOTP Mods - Schedules Create your very own game schedules, or share historical schedules |
|
Thread Tools |
06-06-2006, 11:11 PM | #1 |
Minors (Double A)
Join Date: Mar 2002
Location: Burnaby BC Canada
Posts: 127
|
Home-grown schedule oddities
I created a schedule for my 4-4-4, 4-4-4 fictional league to the following specs:
56 games vs own division: 7 games home and away (a 4-game series and a 3-game series) 96 games vs other divisions in the same sub-league 6 games home and away (2 3-game series) 24 interleague games (1 single home/off-day/away series over three days) (This is the sort of set-up I think MLB should consider, rather than the interleague imbalanced nonsense that they have now. 5-5-5 is more complex, which is why I switched to 4-4-4, but certainly not impossible.) The Perl program I wrote to translate my Sudoku-like charts into an XML schedule file worked like a charm after the usual bout of debugging. Now I think I have the bugs slaughtered (as Marc would say) but there is one remaining anomaly: some teams claim in the analysis page to have 163 games in their schedule, yet I count 162 games for these teams in the grid. It usually says that these teams play an extra game somewhere against a division rival, but I can't find the extra one in the grid. Anyone seen this anomaly? Is it possible that I have a team scheduled to play two games in a day and the grid view hides one of the games? |
06-07-2006, 12:15 AM | #2 | |
Hall Of Famer
Join Date: May 2002
Location: Longmont, CO
Posts: 3,166
|
Quote:
I suggest opening the file or the data portion of the file somewhere where you can count the number of lines in your schedule file. There should be 12*162=1944 games and thus that many data lines. |
|
06-07-2006, 01:04 AM | #3 |
Minors (Double A)
Join Date: Mar 2002
Location: Burnaby BC Canada
Posts: 127
|
Why didn't I think of that?
Anyhow, my day 1 begins on line 7 and day 180 ends on line 1950, so there are the right number of games: 1950 - 6 = 1944. I've uploaded the grid and evaluation pages so someone can maybe see what I am not seeing... |
06-07-2006, 01:38 AM | #4 | |
All Star Starter
Join Date: Dec 2001
Location: Somewhere to the left of 2nd base
Posts: 1,598
|
Quote:
__________________
MWT Did Tennesee Delaware Mississppi's New Jersey? Idaho ... Alaska! |
|
06-07-2006, 05:15 AM | #5 |
Minors (Double A)
Join Date: Mar 2002
Location: Burnaby BC Canada
Posts: 127
|
More evidence that there is something to be looked at here:
I had the AI play through a year under the schedule that the program claimed is flawed. All teams played exactly 162 games the first year, so the file is fine and the evaluation page needs a tweak. Now halfway through year four, I find that trying to get a grid results in a blank page and the evaluation page is further off each year in the number of games played, now showing 186-204 even though the same schedule is being used.... |
06-07-2006, 05:45 AM | #6 | ||
Hall Of Famer
Join Date: Feb 2002
Location: Up There
Posts: 15,415
|
Quote:
Quote:
I think the issue here is the report output rather than the schedule file. As long as your end-of-season standings list the correct number of games having been played, then you know the schedule file is correct. I'm just beginning to look into this in conjuction with something else I'm checking out. Hopefully it's merely a report generation problem, but at any rate, when I know more, I'll follow up here with a post. |
||
06-07-2006, 07:03 AM | #7 |
Minors (Double A)
Join Date: Mar 2002
Location: Burnaby BC Canada
Posts: 127
|
I don't think that the schedule grid or the schedule evaluation report pages should include pre or post season games. Most who make their own schedules use these pages to check to see that their schedule files are properly balanced.
Anyhow, I had a 4-4-4, 4-4-4 league with a first-year schedule that shows a mysterious extra game for 22 of the 24 teams, but only in the evaluation page--the grid counted to 162 for all teams. This seems to me to be a likely flaw of some sort. Not a huge one, and since it is all working fine I don't mind if you file it away for now! |
06-07-2006, 12:34 PM | #8 |
All Star Reserve
|
I noticed same problem
Instead of Perl, I used quick basic to generate a schedule file...
Works great!!! But in my league, the second 'league' had some teams report more games than they actually had in the schedule (I wrote a piece of code to print out the # of home and away games for each team in the .lsdl file I created) Must be a bug with schedule analysis???
__________________
@RHS_SID on Twitter - Go Cubs - BoSox - World Series - One Day ...#WhenItHappens |
06-07-2006, 12:41 PM | #9 |
All Star Starter
Join Date: Dec 2001
Location: Somewhere to the left of 2nd base
Posts: 1,598
|
David, the in-game report includes Spring Training games. Could that explain your discrepency?
__________________
MWT Did Tennesee Delaware Mississppi's New Jersey? Idaho ... Alaska! |
06-08-2006, 05:31 PM | #10 | |
All Star Reserve
|
Quote:
The discrepancies that the 'schedule analyzer' reports an incorrect # of games for several teams compared to what the schedule actually contains and each team plays....
__________________
@RHS_SID on Twitter - Go Cubs - BoSox - World Series - One Day ...#WhenItHappens |
|
06-10-2006, 08:40 AM | #11 | |
Hall Of Famer
Join Date: Jul 2002
Location: Kentucky
Posts: 2,601
|
Quote:
|
|
06-10-2006, 09:43 AM | #12 |
All Star Reserve
|
Quick Basic Program for schedule making
I am running a 128 team, 1 league 'league'.
16 districts of 8 teams each. I am trying to 'mimic' College Baseball. But to make it more 'fun' I have all district teams playing each other once, home and away, instead of 3 game series, with a day off between each game (3 man rotations). So I wanted some 'random games' outside the conference before each district round-robin schedule. So, picture this: non-conference 'random games' 4 home and 4 away home and away with each team inside district repeat and rinse that gives me 44 games, 22 home and 22 away, 28 games in-conference and 16 non-conference games for each team. (side note: One reason I want to be able to schedule playoff games is I want to 'seed' my post-season based solely on conference game standings) Code to do my schedule? Please keep in mind that I am an old 27-year-CAD/CAM guy (a dinosaur in the industry), not a programmer, but I like to dabble: I wrote this in Quick-Basic but it should be easy to do with VBasic... Just make an array to keep up with home and away games and what games have been played and not been played and set some rules on how many times a team can play another team.... the sched8.dat reference is a data file of the static in-district games - I have always hated how the 'schedule generator' in ootp series doesn't make the last week or two of the season be games that matter (divisision games, rival games) here is what my sched8.dat looks like - not I want 1 vs 2 at the end :-) 1,8 2,5 3,6 4,7 -1,-1 1,7 2,8 3,5 4,6 -1,-1 6,1 7,2 8,3 5,4 -1,-1 5,1 6,2 7,3 8,4 -1,-1 1,4 3,2 5,8 7,6 -1,-1 1,3 2,4 5,7 6,8 -1,-1 2,1 4,3 6,5 8,7 -1,-1 99,99 here is the actually quick basic code: RANDOMIZE (1961) DIM vis(128) DIM home(128) DIM played(128) DIM game(128, 128) AS INTEGER FOR x = 1 TO 128 played(x) = 0 vis(x) = 0 home(x) = 0 FOR y = 1 TO 128 game(x, y) = 0 NEXT y NEXT x OPEN "schedul.out" FOR OUTPUT AS #1 FOR Day = 2 TO 20 STEP 2 FOR z = 1 TO 25000 v = INT((RND * (130)) + .4) h = INT((RND * (129)) + .6) PRINT v; " at "; h IF v < 1 THEN GOTO nextgame IF h < 1 THEN GOTO nextgame IF v > 128 THEN GOTO nextgame IF h > 128 THEN GOTO nextgame IF vis(v) = 4 THEN GOTO nextgame IF home(h) = 4 THEN GOTO nextgame IF played(v) = 1 THEN GOTO nextgame IF played(h) = 1 THEN GOTO nextgame IF game(v, h) = 1 THEN GOTO nextgame IF v < 9 AND h < 9 THEN GOTO nextgame IF v > 8 AND v < 17 AND h > 8 AND h < 17 THEN GOTO nextgame IF v > 16 AND v < 25 AND h > 16 AND h < 25 THEN GOTO nextgame IF v > 24 AND v < 33 AND h > 24 AND h < 33 THEN GOTO nextgame IF v > 32 AND v < 41 AND h > 32 AND h < 41 THEN GOTO nextgame IF v > 40 AND v < 49 AND h > 40 AND h < 49 THEN GOTO nextgame IF v > 48 AND v < 57 AND h > 48 AND h < 57 THEN GOTO nextgame IF v > 56 AND v < 65 AND h > 56 AND h < 65 THEN GOTO nextgame IF v > 64 AND v < 73 AND h > 64 AND h < 73 THEN GOTO nextgame IF v > 72 AND v < 81 AND h > 72 AND h < 81 THEN GOTO nextgame IF v > 80 AND v < 89 AND h > 80 AND h < 89 THEN GOTO nextgame IF v > 88 AND v < 97 AND h > 88 AND h < 97 THEN GOTO nextgame IF v > 96 AND v < 105 AND h > 96 AND h < 105 THEN GOTO nextgame IF v > 104 AND v < 113 AND h > 104 AND h < 113 THEN GOTO nextgame IF v > 112 AND v < 121 AND h > 112 AND h < 121 THEN GOTO nextgame IF v > 120 AND h > 120 THEN GOTO nextgame PRINT #1, "GAME day="; Day; CHR$(34); " time="; ; "1905"; ; "away="; ; v; "home="; ; h; ; " vis(v) = vis(v) + 1 home(h) = home(h) + 1 game(v, h) = game(v, h) + 1 played(v) = 1 played(h) = 1 games = games + 1 IF games = 56 THEN GOTO nextday nextgame: NEXT z nextday: FOR q = 1 TO 128 played(q) = 0 NEXT q games = 0 NEXT Day REM divisional games day = day + 2 OPEN "sched8.dat" FOR INPUT AS #2 DO WHILE NOT EOF(2) INPUT #2, v1, h1 IF v1 = 99 THEN GOTO REVERSE IF h1 = -1 THEN Day = Day + 2 ELSE INPUT #2, v2, h2 INPUT #2, v3, h3 INPUT #2, v4, h4 FOR divnum = 0 TO 120 STEP 8 PRINT #1, "GAME day="; ; Day; ; " time="; ; "1905"; ; "away="; ; v1 + divnum; ; "home="; ; h1 + divnum; ; "" PRINT #1, "GAME day="; ; Day; ; " time="; ; "1905"; ; "away="; ; v2 + divnum; ; "home="; ; h2 + divnum; ; "" PRINT #1, "GAME day="; ; Day; ; " time="; ; "1905"; ; "away="; ; v3 + divnum; ; "home="; ; h3 + divnum; ; "" PRINT #1, "GAME day="; ; Day; ; " time="; ; "1905"; ; "away="; ; v4 + divnum; ; "home="; ; h4 + divnum; ; "" NEXT divnum END IF LOOP REVERSE: CLOSE #2 OPEN "sched8.dat" FOR INPUT AS #2 DO WHILE NOT EOF(2) INPUT #2, h1, v1 IF h1 = 99 THEN GOTO DONE IF h1 = -1 THEN Day = Day + 2 ELSE INPUT #2, h2, v2 INPUT #2, h3, v3 INPUT #2, h4, v4 FOR divnum = 0 TO 120 STEP 8 PRINT #1, "GAME day="; ; Day; ; " time="; ; "1905"; ; "away="; ; v1 + divnum; ; "home="; ; h1 + divnum; ; " " PRINT #1, "GAME day="; ; Day; ; " time="; ; "1905"; ; "away="; ; v2 + divnum; ; "home="; ; h2 + divnum; ; " " PRINT #1, "GAME day="; ; Day; ; " time="; ; "1905"; ; "away="; ; v3 + divnum; ; "home="; ; h3 + divnum; ; " " PRINT #1, "GAME day="; ; Day; ; " time="; ; "1905"; ; "away="; ; v4 + divnum; ; "home="; ; h4 + divnum; ; " " NEXT divnum END IF LOOP DONE: CLOSE #2 REM MORE NON-DIVISIONAL GAMES FOR Day = 52 TO 72 STEP 2 FOR z = 1 TO 35000 v = INT((RND * (130)) + .4) h = INT((RND * (129)) + .6) PRINT v; " at "; h IF v < 1 THEN GOTO nextgam2 IF h < 1 THEN GOTO nextgam2 IF v > 128 THEN GOTO nextgam2 IF h > 128 THEN GOTO nextgam2 IF vis(v) = 8 THEN GOTO nextgam2 IF home(h) = 8 THEN GOTO nextgam2 IF played(v) = 1 THEN GOTO nextgam2 IF played(h) = 1 THEN GOTO nextgam2 IF game(v, h) = 1 THEN GOTO nextgam2 IF v < 9 AND h < 9 THEN GOTO nextgam2 IF v > 8 AND v < 17 AND h > 8 AND h < 17 THEN GOTO nextgam2 IF v > 16 AND v < 25 AND h > 16 AND h < 25 THEN GOTO nextgam2 IF v > 24 AND v < 33 AND h > 24 AND h < 33 THEN GOTO nextgam2 IF v > 32 AND v < 41 AND h > 32 AND h < 41 THEN GOTO nextgam2 IF v > 40 AND v < 49 AND h > 40 AND h < 49 THEN GOTO nextgam2 IF v > 48 AND v < 57 AND h > 48 AND h < 57 THEN GOTO nextgam2 IF v > 56 AND v < 65 AND h > 56 AND h < 65 THEN GOTO nextgam2 IF v > 64 AND v < 73 AND h > 64 AND h < 73 THEN GOTO nextgam2 IF v > 72 AND v < 81 AND h > 72 AND h < 81 THEN GOTO nextgam2 IF v > 80 AND v < 89 AND h > 80 AND h < 89 THEN GOTO nextgam2 IF v > 88 AND v < 97 AND h > 88 AND h < 97 THEN GOTO nextgam2 IF v > 96 AND v < 105 AND h > 96 AND h < 105 THEN GOTO nextgam2 IF v > 104 AND v < 113 AND h > 104 AND h < 113 THEN GOTO nextgam2 IF v > 112 AND v < 121 AND h > 112 AND h < 121 THEN GOTO nextgam2 IF v > 120 AND h > 120 THEN GOTO nextgam2 PRINT #1, "GAME day="; ; Day; " time="; "1905"; "away="; v; "home="; h; " " vis(v) = vis(v) + 1 home(h) = home(h) + 1 game(v, h) = game(v, h) + 1 played(v) = 1 played(h) = 1 games = games + 1 IF games = 56 THEN GOTO nextday2 nextgam2: NEXT z nextday2: FOR q = 1 TO 128 played(q) = 0 NEXT q games = 0 NEXT Day REM divisional games day = day + 2 OPEN "sched8.dat" FOR INPUT AS #2 DO WHILE NOT EOF(2) INPUT #2, v1, h1 IF v1 = 99 THEN GOTO REVERS2 IF h1 = -1 THEN Day = Day + 2 ELSE INPUT #2, v2, h2 INPUT #2, v3, h3 INPUT #2, v4, h4 FOR divnum = 0 TO 120 STEP 8 PRINT #1, "GAME day="; ; Day; ; " time="; ; "1905"; ; "away="; ; v1 + divnum; ; "home="; ; h1 + divnum; ; " " PRINT #1, "GAME day="; ; Day; ; " time="; ; "1905"; ; "away="; ; v2 + divnum; ; "home="; ; h2 + divnum; ; " " PRINT #1, "GAME day="; ; Day; ; " time="; ; "1905"; ; "away="; ; v3 + divnum; ; "home="; ; h3 + divnum; ; " " PRINT #1, "GAME day="; ; Day; ; " time="; ; "1905"; ; "away="; ; v4 + divnum; ; "home="; ; h4 + divnum; ; " " NEXT divnum END IF LOOP REVERS2: CLOSE #2 OPEN "sched8.dat" FOR INPUT AS #2 DO WHILE NOT EOF(2) INPUT #2, h1, v1 IF h1 = 99 THEN GOTO DONE2 IF h1 = -1 THEN Day = Day + 2 ELSE INPUT #2, h2, v2 INPUT #2, h3, v3 INPUT #2, h4, v4 FOR divnum = 0 TO 120 STEP 8 PRINT #1, "GAME day="; ; Day; ; " time="; ; "1905"; ; "away="; ; v1 + divnum; ; "home="; ; h1 + divnum; ; " " PRINT #1, "GAME day="; ; Day; ; " time="; ; "1905"; ; "away="; ; v2 + divnum; ; "home="; ; h2 + divnum; ; " " PRINT #1, "GAME day="; ; Day; ; " time="; ; "1905"; ; "away="; ; v3 + divnum; ; "home="; ; h3 + divnum; ; " " PRINT #1, "GAME day="; ; Day; ; " time="; ; "1905"; ; "away="; ; v4 + divnum; ; "home="; ; h4 + divnum; ; " " NEXT divnum END IF LOOP DONE2: CLOSE #1 CLOSE #2 OPEN "summary.out" FOR OUTPUT AS #3 FOR x = 1 TO 128 PRINT "Team #"; x; TAB(20); vis(x); TAB(30); home(x) PRINT #3, "team #"; x; TAB(20); vis(x); TAB(30); home(x) NEXT x CLOSE #3 For some reason this web-site doesn't display my PRINT statements correct? Could be the use of CHR$ command? could be the < and /> ? You should be able to figure out the print commands though... (Does all of this help?) I haven't spent a lot of time with this - was in a hurry to get my schedule imported - so after you run this program you will need to edit schedul.out and fix some spacing issues... I may go back one day and work on my print statements but busy working on 'weighting' my teams now to make some great teams, some good teams and some bad teams.....
__________________
@RHS_SID on Twitter - Go Cubs - BoSox - World Series - One Day ...#WhenItHappens Last edited by david limbaugh; 06-10-2006 at 11:11 PM. |
Bookmarks |
|
|