Playoff picture, calculating what-ifs

Temporary forum for the discussion of the Tuesday Morning project, to enhance the Madden 08 off-the-field experience.
User avatar
torontogrudlies
MVP
Posts: 837
Joined: Fri Jul 15, 2011 4:56 pm

Playoff picture, calculating what-ifs

Postby torontogrudlies » Tue Apr 24, 2012 5:54 pm

This will be needed in some form for the app. Being able to determine with some accuracy if a team is mathematically eliminated, or if they've clinched everything they're going to clinch, so they have the option of resting starters and looking at younger players.

When the in-game is saying "x-clinched playoff birth" (nice spelling there, EA, it's "berth"...) is it pulling this info from one of the fields, or computing it on the fly? In any case, I've seen instances where a team has clinched and the standings don't pick up on it.

I tried programming a script which would basically compute every possible outcome, but this resulted in millions of scenarios and the code would take a long time to run. So, wondering if there's a better technique, something we can look at when we get around week 14 or so.

This will also be nice because we would be able to watch how the playoff picture is shaping up, and which games are really important ones.

Playoff picture, calculating what-ifs

Sponsor

Sponsor
 

chipper
Rookie
Posts: 4
Joined: Tue May 01, 2012 3:38 am

Re: Playoff picture, calculating what-ifs

Postby chipper » Tue May 01, 2012 3:54 am

Saw this while searching internet. I don't want to violate any TOS so I'll leave the website name out, but there is something publicly available to do not only this but to provide "buffalo clinches if new york beats boston AND washington beats toledo". And no, there isn't any other known way to accomplish without going through every possibility, although there are a couple tricks that can sometimes be used to speed things up. Millions doesn't even begin to get close. Depending on league size, trillions and larger numbers of possibilities come into play with more than 20-30 games remaining in a season depending on whether ties are possible or not. Add tiebreakers and one realizes why the NFL only does this two weeks out. The only alternative is to do probability (running remainder of a season 10,000 or a million times with random results), which there are several programs available to do, which will give a reasonably accurate picture, but not a completely accurate one.

User avatar
torontogrudlies
MVP
Posts: 837
Joined: Fri Jul 15, 2011 4:56 pm

Re: Playoff picture, calculating what-ifs

Postby torontogrudlies » Tue May 01, 2012 2:23 pm

Are you talking about a spreadsheet or formula, or a complete, closed-source software? I need ideas on methodology to be used, which I'll then put into Visual Basic for this app. Feel free to name the URL in question... TOS/AUP would be more geared toward solicitation of unrelated services or products.

I've begun some programming on something...instead of running every possible scenario, mine is based upon the same logic used to find "magic numbers." I want to find out if Team A has clinched a playoff spot, so I loop through the teams which are ranked 7th thru 16th in conference standing, calculate their record if they win out, and compare them all against Team A's record should they not win anymore games. If none of them can get a better record than Team A, or match them with tiebreakers, Team A has clinched a playoff spot. Similar logic also to be run with each division leader, comparing them to the 2nd, 3rd and 4th place teams in their division.

The programming gets tricky to follow, because there end up being a bunch of nested loops and if-then logic for the different tiebreakers. I've gotten as far as comparing the head-to-head results and division/conference records, after that will be comparing records vs. common opponents. I think the in-game does some of this but perhaps stops after a couple levels; I've clinched but not had the x next to my team.

chipper
Rookie
Posts: 4
Joined: Tue May 01, 2012 3:38 am

Re: Playoff picture, calculating what-ifs

Postby chipper » Tue May 01, 2012 7:11 pm

My site is http://www.playoffcomputer.com.

You do not need to tell me how tricky the programming can get!

Forgive me if I don't give away too many secrets, but here's a couple of "gotchas" to watch out for if you're writing something.

1) If ties between opponents are any way possible, not only does that add a zillion more permutations, but it completely changes the approach needed and the individual team methodology you list might not be the correct way to go. I'll try to provide a somewhat sensible example:

Current Standings
Alphas 6-4-1
Bravos 6-5-0
Charlies 6-5-0
Deltas 3-7-1

Remaining Schedule
A vs D
B vs C

Two teams make playoffs

If I understood your approach correctly, to determine if the Alphas have clinched one of the top two spots, you would:
A) Run scenario that Bravos win out and Alphas lose out = A 6-5-1, B 7-5-0, C 6-6-0, D 4-7-1, result Alphas clinched.
B) Run scenario that Charlies win out and Alphas lose out = A 6-5-1, B 6-6-0, C 7-5-0, D 4-7-1, result Alphas clinched.
(Deltas winning out is included in above 2 scenarios by default)
And your conclusion would be that the Alphas have clinched one of the top two spots.

But that would be incorrect, if ties are a possibility, as Bravos and Charlies could tie and both finish 6-5-1, resulting in a potential 3 way tie. To further illustrate, pretend its a double-header of the matchups. Alphas could end up being 6-6-1 and Bravos and Charlies could both end up being 6-5-2, leaving Alphas without even a chance at tiebreaker.

I actually had this happen a couple years ago in a fantasy league. Declared one team clinched based on that approach, then had two competing teams tie, meaning they both remained in contention rather than one being eliminated with a loss...

2) H2H as a tiebreaker needs to be expanded and tweaked for specific tiebreaker rules and schedule. If the schedule is balanced, that is everybody plays each other the same number of times, its a little easier as you can just compare the teams records against each other. But if the schedule is not balanced, ie NFL, you can't compare H2H if there are 3 or more teams involved and they didn't all play each other the same number of times.

Good luck. Its an ambitious project. I've spent many years and mucho money so far...

User avatar
torontogrudlies
MVP
Posts: 837
Joined: Fri Jul 15, 2011 4:56 pm

Re: Playoff picture, calculating what-ifs

Postby torontogrudlies » Wed May 02, 2012 6:49 pm

This gives me a lot to consider.

One thought regarding calculating every possible outcome, it wouldn't have to be trillions of outcomes, because for the final week or two of the season, usually it's just intra conference. So I think we'd be talking about the possible outcomes of 8 games rather than 16.

I wasn't looking at ties, because I was looking at the worst case for the Alpha team, which is they lose out and the other team wins out. I think I can do enough so there won't be "false positives" (alphas are reported as clinching and then they get eliminated) although in rare cases a team might have clinched but the app misses it.

Anyway, we have great things afoot here. You should go to half.com, grab a copy of Madden 08, and come on board!

User avatar
torontogrudlies
MVP
Posts: 837
Joined: Fri Jul 15, 2011 4:56 pm

Re: Playoff picture, calculating what-ifs

Postby torontogrudlies » Wed May 02, 2012 10:28 pm

My latest experimentation does this:

Loops thru the 16 teams in a conference one by one (call them Team A). Compares each with the other teams in the conference, one at a time, assuming that the team being compared with (Team B) is going to win out.

If Team B can't catch Team A via record or tiebreakers, we increase a counter by 1. Once there are at least 10 teams who can't catch Team A, they've clinched a playoff spot.

We also have a counter for Team B which gets increased in this situation; when there are 6 or more teams which B has no way to catch, they're eliminated.

I can see a slight problem with the logic in that second part though...if there are 6 teams B can't catch, but one of them isn't a playoff contender due to tiebreakers, there could be another team in there which B could in fact catch. Work in progress.

User avatar
superben21
MVP
Posts: 622
Joined: Fri Aug 05, 2011 1:44 pm
Location: Ohio

Re: Playoff picture, calculating what-ifs

Postby superben21 » Thu May 03, 2012 8:53 am

You've probably already thought of this but what about cases where 6 teams could catch Team A if all 6 won out but since those teams have to play each other than in reality only 4 could catch Team A..... So they've clinched, however, if all the other 6 teams won out, which is impossible, then the chart wouldn't show those results. Hope that's kind of clear.
~ Superben21 | An active moderator at one point or another.

chipper
Rookie
Posts: 4
Joined: Tue May 01, 2012 3:38 am

Re: Playoff picture, calculating what-ifs

Postby chipper » Thu May 03, 2012 7:12 pm

Superben greatly simplified the long-winded point I was trying to make. Again, I don't know the exact approach you're taking, but your "worst-case" scenario for team A may not be team A losing out and team B winning out, it may be a tie between team B and team C. In my humble opinion, as somebody that has devoted way too much resources to this cause, to ignore ties (if they are a possibility) and to use a magic number approach (or similar) to get something close-to accurate is not as good as getting something completely accurate. To me, and the entire reason I spent the time and $ developing/website/marketing/etc.., is the goal to be able to provide that glimmer of hope to some team thinking they are out of it that if some crazy specific million-to-one scenario happens they are in, to give them that "false hope" for a week or two or three. And I spent a long time trying every method in the book to conclude the only way to do that is to figure out every scenario.

User avatar
torontogrudlies
MVP
Posts: 837
Joined: Fri Jul 15, 2011 4:56 pm

Re: Playoff picture, calculating what-ifs

Postby torontogrudlies » Thu May 03, 2012 11:37 pm

Yeah, I'm kinda seeing that. I used to make fun of EA for their inept playoff scenario logic, but I have a new appreciation for how complex it is.

Running trillions of possibilities is prohibitive for an app like this, however. Nobody is going to want to sit for hours while this runs, just so they can decide whether to rest their starting QB. So I need to find some sort of happy medium.

One thought was that there might be games which don't need to be computed. If the 2-12 team and the 3-11 team are playing, does it matter whether they win, lose or tie? Unfortunately, it can... after looking at stuff like head to head, division/conference records, and records in common games, we look at strength of victory and strength of schedule (w/l/t % of teams beat, and teams played, respectively).

Another possibility is to compute the divisions one at a time. Instead of dealing with 16 teams, we're mainly dealing with 4, although we'd still have to compute some of the other teams for the strength of victory/schedule.

chipper
Rookie
Posts: 4
Joined: Tue May 01, 2012 3:38 am

Re: Playoff picture, calculating what-ifs

Postby chipper » Fri May 04, 2012 1:53 am

You seem to be going through the same experiences, revelations, and frustrations I have already gone through. Again, not to run afoul of the law :roll: but did you see if our program does what you want to accomplish? Maybe save you the trouble of beating your head against the desk :mrgreen:

To answer your last thought, you can ignore games only if both teams in the specific matchup have a forgone conclusion. That is one way to reduce the permutations. But obviously you have to determine if there is a forgone conclusion first! (insert vicious circle here)


Return to “Tuesday Morning Manager”

Who is online

Users browsing this forum: No registered users and 1 guest