Sunday, August 31, 2008

The tXtFL Season Has Arrived!

The football season has finally arrived, and it feels like forever since I've worked on the tXtFL football simulator. This past Labor Day weekend I've finally had a chance to labor on tXtFL and work on an oft-requested feature: multi-game automation.

One of the tasks for any simulator is simply to figure out whether it's actually a simulator. In other words, it would be terrible news to find out that a football simulator never simulated anything close to reality, or even worse (or better, depending on how you look at it), if a football simulator is a better simulator of baseball or cricket.

tXtFL has simulated scores fairly accurately in recent versions and even came close to predicting the historic final Patriots game of the regular season last year. But it's hard to get a clear grasp of statistics with only a few simulations to compare against each real game, and the same model fell short of predicting the following Super Bowl upset. Of course, one could spend hours sitting on the Enter key to generate hundreds of games and then manually compile them for comparison against raw NFL data. But shouldn't there be an easier and more robust method?

It turns out that the first step to multi-game simulations was easier than expected and only involved centralization of code handling user input and a few automation functions. Now tXtFL can run games in full AI mode of the same two teams theoretically up to thousands of times. Games are played back-to-back and cycle with only initial user selection of teams.

The next steps will be to save that output, ideally in a format that could be fed into Matlab or R or other statistical software for a more thorough computational analysis. We could check individual player stats against historical data and also analyze its predictive power of games and seasons. Hopefully we can figure out how to run it on a cluster. And hopefully our simulated stats will eventually cluster around reality?