Welcome to

Magenic Technologies Community Blog

Sign in | Join | Help

Aaron's Technology Musings

Who let this guy on the podium?

F# Business Intelligence Case Study - XBox Live Trueskill

Some time ago, I speculated that F# should be the lingua-franca of BI.

Well, had I done a little research, I would have found out that people are already doing BI using F#, namely Microsoft.  On a recent podcast of The Thirsty Developer (to be published soon), some colleagues and I were talking to some members of our local evangelism team when Jason Bock told me that TrueSkill was implemented using F#. To which, I reply... that sure sounds like Business Intelligence - or something like it!

Since I am making yet another audacious claim, perhaps an explanation of what TrueSkill is would be helpful. 

If you play XBox 360 and Halo, you are probably familiar with the concept of TrueSkill, which is used to measure how you compare against the bell curve distribution of other players of a given game.

As for the BI part, the analysis task of TrueSkill is to go over the following:

* Multiple terabytes of matchmaking log data

* Data spread over 11,000 text files.

* ETL'd into SQL Server

* Use of F# to do calculations on this massive database to determine TrueSkill rankings for players

We are probably not talking about simple averages and things you would do with a cube here.  The resulting solution, as I was able to ascertain from a blog post by Don Syme, was about 100 lines of F# code to create a production version of this that runs as an ongoing task.

Now, if we replace customer records with XBOX Live log entries, I think we are onto something here - especially for more complex and/or scientific scenarios.  Imagine, rather than TrueSkill, we used this to estimate, say "TrueLikelihoodToUpgradeFlights" so we could help airlines deploy better upsell opportunities.

But the bigger point - one pretty much demonstrated by this whole scenario, is that there is no reason - none.  at.  all - that BI has to be a database technology.  BI can come from anywhere, and the best tool for doing the job in BI is functional languages, due to how functional languages makes the task of writing massivley paralellizable code a great deal simpler than other imperative languages do.  Sometimes that language is SQL, and it's database oriented BI variants - and sometimes, as in this case, its F#.

It is high time we stop treating business intelligence and software development as if they are different things.  They really aren't.

Update: Ralf Herbrich from Microsoft has provided some more links for some of the background:

* Slides and presentations of an ICFP 2007 talk by Phillip Trelford on the application of F# for TrueSkill ()

* A presentation of the mathematics and tools used in the TrueSkill analyses at KDD ()

* An F# implementation of TrueSkill at our blog

Published Sunday, September 07, 2008 4:36 PM by aarone

Filed under: ,

Comments

# re: F# Business Intelligence Case Study - XBox Live Trueskill @ Tuesday, September 09, 2008 2:44 PM

As a side note, have you heard of VSLab? http://www.codeplex.com/vslab ...drool...

Jason Bock

# re: F# Business Intelligence Case Study - XBox Live Trueskill @ Wednesday, September 10, 2008 11:30 AM

Good god - VSLab is droolworthy!  Looks like we are well on our way to an open source visualization tool.

aarone

# re: F# Business Intelligence Case Study - XBox Live Trueskill @ Wednesday, September 10, 2008 4:11 PM

hmm, could you provide a functioning code example to help demonstrate this use in BI?

Thanks

Pat

# re: F# Business Intelligence Case Study - XBox Live Trueskill @ Wednesday, September 10, 2008 4:41 PM

Pat - following the link from my post to Don Syme's blog post should give you a much richer example than I possibly could in a blog comment.

aarone

# re: F# Business Intelligence Case Study - XBox Live Trueskill @ Thursday, September 11, 2008 12:00 AM

Aaron, Great posting. I am one of the researchers at Microsoft Research who has been carrying out these analyses on TrueSkill, in particular for Halo 3. There are a few more details available online, namely: * Slides and presentations of an ICFP 2007 talk by Phillip Trelford on the application of F# for TrueSkill (http://portal.acm.org/citation.cfm?id=1362702.1362709&coll=ACM&dl=ACM&type=series&idx=SERIES824&part=series&WantType=Proceedings&title=ICFP&CFID=://search.live.com/results.aspx?q=icfp+2007+trelford&CFTOKEN=search.live.com/results.aspx?q=icfp+2007+trelford) * A presentation of the mathematics and tools used in the TrueSkill analyses at KDD (http://www.kdd.org/kdd2008/program.html#graepel); we will soon make these slides available publically. * An F# implementation of TrueSkill at our blog (http://blogs.technet.com/apg/archive/2008/06/16/trueskill-in-f.aspx). Enjoy, Ralf

Ralf Herbrich

# re: F# Business Intelligence Case Study - XBox Live Trueskill @ Thursday, September 11, 2008 12:15 PM

Thanks Ralf.  I have updated the blog with the links - great resources you have there!

aarone

# One step closer to F# for Business Intelligence @ Thursday, December 11, 2008 11:21 PM

I have been beating this drum for some time now, but the latest post from Don Syme confirms the trend.

Aaron's Technology Musings

New Comments to this post are disabled
Powered by Community Server, by Telligent Systems