website statistics
I've found that opening up my models to the public can often be a very good thing. It gives me essential feedback I need to find bugs or mistakes. It also builds confidence in the models. They often point to unconventional or counterintuitive results, and unless people understand how they work the analysis is likely to be dismissed as a black box.

I've been trying to think of a way to make the new WOPR game simulator available as a useful tool. Simulations work because they can run thousands of times to produce an overall rate or probability of each relevant outcome, and this takes time. Some simulations can be pretty simple, but the WOPR isn't one of them. It's really complex and it puts a big load on the server when it runs. It can take some time for it to chew through thousands of simulated games. However, I'd still like to make it available in some form.

For starters, I'm going to open it up to everyone, at least temporarily, but it will only run a single game. That's of very little analytical use, but depending on the response I may be able to open it up for relatively small batches of iterations. It still is useful for the reasons I mentioned above. It will expose it to criticism and help find any bugs that still hide inside the code. Also, it will (hopefully) inspire some confidence. When it runs once, it outputs the play-by-play.

Don't expect the kind of play-by-play you might see on There are no players. There are only times, downs, distances, field positions, play types and outcomes. The outcomes include gains and losses, and turnovers if they occur. The sim doesn't care if a turnover is a fumble or interception. It just needs to know that a turnover occurred and where the ball ended up. There are a handful of similar simplifications that don't affect the game outcome, which is the thing we care about. But eventual enhancements can address any consideration we're interested in.

Each play has an associated note. It mentions significant outcomes and gives you a window into the simulated 'mindset', such as 2-minute offense or the fact that a team needs a TD to survive and a field goal isn't helpful. Stuff like that is part of what governs the play selections and play outcome distributions.

The user interface should be familiar. There are a few noticeable differences from the Win Probability Calculator though. Instead of analyzing things from the perspective of an offense, there are two teams--the Home and Visitor. There's no home field advantage built in (yet), but it allows you to select which team has possession.

You can also override the next play in the game. Usually, when I want to investigate something interesting, I reach into the code and tinker with things to force a certain event. For example, last week when I investigated the strategy of kicking a field goal as soon as an offense reached field goal range when down by 9 or 10, I had to trick the sim into kicking a field goal on 1st down. You can now do the same thing by using a drop down menu. So if you want to investigate the wisdom of taking an intentional safety in a certain situation, you can add 2 points to the defensive team and force the next play to be a free kick.

You can change the number of replications the sim will do with the "n" variable. But for now it's only going to run once, no matter how high you make it.

What I'd ask of you is that you look through the simulated game and see if you detect anything that doesn't make sense. Come back to this post and make note of anything in the comments. I'm not worried about interface items. If you want to break it by entering a negative number for a down or whatever, I'm not concerned about that. I'm more concerned with something like "Every time it kicks off after a field goal it's a touchback. I tried 20 times."

For now, you can find the WOPR simulation demo under the tools menu or use this direct link.

Leave your comments

Post comment as a guest


Comments (11)

Load Previous Comments
  • Guest - Daniel

    You have kneeldowns for -3 yards, aren't they almost always -1 yards?

  • Guest - Nathan

    This is awesome! One thing I noticed is that in the 2-minute drill, if the offense still has more than one timeout left, the sim seems to call its timeouts very liberally, even after plays that are presumably incomplete passes.

  • Guest - Brian Burke

    Thanks, gents.

    Kneel downs are most often -2 or -3 yds.

    Some 0yd passes will be short screens that are completed, but the shouldn't be very many of those in the 2min offense. I'll look into that.

  • Guest - Dave

    I just took a quick look through about 8 simulations, and I notices two things:
    - defense taking all 3 timeouts down by 24 within the last 30 seconds (this is correct in an optimal strategy sense, which may be the point, but perhaps not realistic)
    - and then this peculiar sequence, with the visitor down by 7:

    visitor at 4Q 1:00
    4Q 1:00 1-10-85 pass 17 timeout offense #3 need td 2min 34 41
    4Q 0:54 1-10-68 pass 5 spike need td 2min 34 41
    4Q 0:43 3-5-63 pass 0 need td 2min 34 41
    4Q 0:40 4-5-63 pass 23 spike need td 2min 34 41
    4Q 0:26 2-10-40 pass 15 spike need td 2min 34 41
    4Q 0:08 2-10-25 run 6 spike need td 2min 34 41

    A run with 8 seconds left, 25 yds from the goal line seems unlikely in that scenario. It was the final play.

  • Guest - James

    The forward-simulation is neat, but I'm curious as to the potential to work in reverse. If you work in reverse in a dynamic-programming framework, you could input a desired end state (final score difference, e.g.) and have an algorithm work backwards through the highest probability plays that lead back to your current game state. That should give you a list of "best chance" plays that have been selected in the past.

    In the forward simulation, you're drawing random plays and trying to find the combination in a monte-carlo sense (if I undestand WOPR correctly). Doing it backwards is closer to an explicit selection of the best plays that have been selected before.

  • Guest - chris

    Probably something like 80% of kneel downs are for -1 yard. Most of the rest are for no gain, there may be a couple that are for a -2 yard loss.

    A lot of 0 yard passes are passes batted down at the line of scrimmage.

  • Guest - Brian Burke

    Thanks, guys!

  • Guest - Ben

    4Q 1:00 1-10-22 run 5 need td 2min 17 21
    4Q 0:38 2-5-17 pass 0 spike need td 2min 17 21
    4Q 0:25 4-5-17 pass 12 spike need td 2min 17 21
    4Q 0:10 2-5-5 pass -10 spike need td 2min 17 21

    Just one of the may simulations I did with this format and it seems like there is a lot of spiking the ball when unnecessary. I think teams would pass towards the sidelines with no timeouts or just throw it away.

  • Guest - TapeyBeercone

    This is amazing Brian. What a great tool.

    A couple things I've seen:

    I also noticed some peculiar run plays in the 2 minute offense.Are some of these run plays simulating QB scrambles?

    I notice that by default when a team is down by 3 or less late the game, the team will continue to drive until it gets to the opponent's 35 regardless of time left. So the simulator always goes for it on 4th and long in the last minute or even tosses a hail mary on the last play instead of trying a 55 yarder. I believe many teams in the NFL would go for the long field goal in those situations.

    Thanks for allowing us to look under WOPR's hood!

  • Guest - john

    My Talking Tom was released in the year 2013 and this game app became a sensation with more than 11 million downloads worlwide and that to in a span of 10 days after its launch My kids enjoy <a href="/">my talking tom</a> game on my mobile