News for hackers. Stuff that matters.
Re:N.F.L. Playoff Simulator by mbostock on Saturday December 20, 2014 @02:05PM (#8777554)
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

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!

Re:N.F.L. Playoff Simulator by kenjackson on Saturday December 20, 2014 @02:38PM (#8777653)
This 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).
Re:N.F.L. Playoff Simulator by cpher on Saturday December 20, 2014 @02:46PM (#8777674)
This 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?
Re:N.F.L. Playoff Simulator by mbostock on Saturday December 20, 2014 @02:59PM (#8777725)
Thanks, 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).

Re:N.F.L. Playoff Simulator by AndyNemmity on Sunday December 21, 2014 @01:44AM (#8779159)
Nice, I run an online football game and it would be great to implement simulations for our games like this.
Re:N.F.L. Playoff Simulator by 1945 on Saturday December 20, 2014 @11:02PM (#8778895)
Great work, looking forward to see the implementation.
Re:N.F.L. Playoff Simulator by KurtMueller on Sunday December 21, 2014 @05:42PM (#8781235)
Hi Mike,

Why not the UI?