4 ms·
Thanks for posting this. The most enjoyable part of this project for me was implementing the NFL’s incredibly elaborate tie-breaking procedures in code: taking
by mbostock 12y ago
Thanks for posting this.
The most enjoyable part of this project for me was implementing the NFL’s incredibly elaborate tie-breaking procedures in code: taking a plain English description of the rules (that requires some interpretation) and porting it to JavaScript.
http://www.nfl.com/standings/tiebreakingprocedures http://www.nfl.com/standings/tiebreakingprocedures
We should be open-sourcing the simulator implementation (the model, but not the UI) soon so you can see how it works.
There was also a fun moment when I realized I could make the simulator 10x faster by computing only the seed of the selected team, rather than the full order of teams in the playoffs. This avoided a lot unnecessary sorting and tie-breaking!
- kenjackson 12y agoThis is a great project. Well executed, and looks like a blast to work on. I love the breakdown of what would be required for the Seahawks to miss the playoffs if they split their final two (it requires the Packers and Lions to tie their final game -- among other things).
- cpher 12y agoThis is awesome! Kudos to you and the team (I assume you had help?). Yeah, I'm sure the tie breaking procedures drove you crazy. Imagine the rules committee meetings when they discussed all of them. :) How did you manage the complexity of the rules in your mind? I'm curious as to how you went from rules => mental model/entities => code. Did you use a formal process?
- mbostock 12y agoThanks, and yes, this was a collaboration with Kevin Quealy and Shan Carter. The development process was incremental: first create a simple representation of the league (conferences, divisions, teams) and schedule (games, outcomes), then implement the necessary metrics (win percentage, strength-of-victory, etc.) and filters (e.g., head-to-head, common games), then finally the tie-breaking algorithm itself. The incremental approach let me test the parts independently and reduce the amount of hair-pulling debugging unlikely scenarios. Though, there was still plenty of that… Fortunately the NFL has an official playoff computer I could use to test my implementation (for a single, complete scenario).
- 1945 12y agoGreat work, looking forward to see the implementation.
- AndyNemmity 12y agoNice, I run an online football game and it would be great to implement simulations for our games like this.
- KurtMueller 12y agoHi Mike, Why not the UI?