<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/atom10full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><feed xmlns="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearch/1.1/" xmlns:georss="http://www.georss.org/georss" xmlns:thr="http://purl.org/syndication/thread/1.0" xmlns:gd="http://schemas.google.com/g/2005" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" gd:etag="W/&quot;CkUGRn0yeCp7ImA9Wx5QEE0.&quot;"><id>tag:blogger.com,1999:blog-6800934446457898793</id><updated>2010-08-28T08:57:07.390-04:00</updated><title>Moserware</title><subtitle type="html">Jeff Moser's software development adventures.</subtitle><link rel="http://schemas.google.com/g/2005#feed" type="application/atom+xml" href="http://www.moserware.com/feeds/posts/default" /><link rel="alternate" type="text/html" href="http://www.moserware.com/" /><link rel="next" type="application/atom+xml" href="http://www.blogger.com/feeds/6800934446457898793/posts/default?start-index=4&amp;max-results=3&amp;redirect=false&amp;v=2" /><author><name>Jeff Moser</name><uri>http://www.blogger.com/profile/16074905903060665396</uri><email>noreply@blogger.com</email></author><generator version="7.00" uri="http://www.blogger.com">Blogger</generator><openSearch:totalResults>43</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>3</openSearch:itemsPerPage><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/atom+xml" href="http://feeds.feedburner.com/Moserware" /><feedburner:info uri="moserware" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><geo:lat>39.95645</geo:lat><geo:long>-86.008729</geo:long><feedburner:emailServiceId>Moserware</feedburner:emailServiceId><feedburner:feedburnerHostname>http://feedburner.google.com</feedburner:feedburnerHostname><entry gd:etag="W/&quot;A0INQXY8eyp7ImA9WxBbGU8.&quot;"><id>tag:blogger.com,1999:blog-6800934446457898793.post-793968235021421709</id><published>2010-03-18T08:33:00.006-04:00</published><updated>2010-03-18T12:26:30.873-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-03-18T12:26:30.873-04:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="trueskill" /><title>Computing Your Skill</title><content type="html">&lt;p&gt;&lt;strong&gt;Summary&lt;/strong&gt;: I describe how the &lt;a href="http://research.microsoft.com/en-us/projects/trueskill/"&gt;TrueSkill algorithm&lt;/a&gt; works using concepts you're already familiar with. TrueSkill is used on &lt;a href="http://www.xbox.com/en-US/LIVE/" title="I'm actually not a gamer myself, I just like the math of their ranking algorithm :-)"&gt;Xbox Live&lt;/a&gt; to rank and match players and it serves as a great way to understand how statistical machine learning is actually applied today. I&amp;#8217;ve also created an &lt;a href="http://github.com/moserware/Skills"&gt;open source project&lt;/a&gt; where I implemented TrueSkill three different times in increasing complexity and capability. In addition, I've created a &lt;a href="http://dl.dropbox.com/u/1083108/Moserware/Skill/The%20Math%20Behind%20TrueSkill.pdf" title="It's over 40 pages because I had a fun time with the equation editor."&gt;detailed supplemental math paper&lt;/a&gt; that works out equations that I gloss over here. Feel free to jump to sections that look interesting and ignore ones that seem boring. Don't worry if this post seems a bit long, there are &lt;em&gt;lots&lt;/em&gt; of pictures.&lt;/p&gt;&lt;h4&gt;Introduction&lt;/h4&gt;&lt;p&gt;It seemed easy enough: I wanted to create a database to track the skill levels of my coworkers in &lt;a href="http://en.wikipedia.org/wiki/Chess"&gt;chess&lt;/a&gt; and &lt;a href="http://en.wikipedia.org/wiki/Table_football"&gt;foosball&lt;/a&gt;. I already knew that I wasn&amp;#8217;t very good at foosball and would bring down better players. I was curious if an algorithm could do a better job at creating well-balanced matches. I also wanted to see if I was improving at chess. I knew I needed to have an easy way to collect results from everyone and then use an algorithm that would keep getting better with &lt;a title="Peter Norvig's 'Theorizing From Data' talk is fantastic, I highly recommend it." href="http://www.facebook.com/techtalks#/video/video.php?v=644326502463"&gt;more&lt;/a&gt; &lt;a title="Microsoft Research put out this interesting book on how massive amounts of data will dominate scientific discoveries." href="http://research.microsoft.com/en-us/collaboration/fourthparadigm/"&gt;data&lt;/a&gt;. I was looking for a way to compress all that data and distill it down to some simple knowledge of how skilled people are. Based on some &lt;a title="I think the lasting legacy of the Netflix prize is that if you make something interesting and put it online, it shouldn't be a surprise that you can get PhDs to work on it for a dollar an hour or less. There's probably a deep lesson there for most tech companies." href="http://bits.blogs.nytimes.com/2009/09/21/netflix-awards-1-million-prize-and-starts-a-new-contest/?ref=technology"&gt;previous&lt;/a&gt; &lt;a title="If you haven't seen it yet, you should check out the PBS NOVA episode that covered this." href="http://www.pbs.org/wgbh/nova/darpa/"&gt;things&lt;/a&gt; that I had heard about, this seemed like a good fit for &amp;#8220;&lt;a href="http://tv.theiet.org/technology/infopro/turing-2010.cfm" title="If you want a friendly introduction to machine learning, especially how it's applied at Microsoft, then Christopher Bishop's 2010 Turing lecture is a fantastic high level overview."&gt;machine learning&lt;/a&gt;.&amp;#8221;&lt;/p&gt;&lt;p&gt;But, there&amp;#8217;s a problem.&lt;/p&gt;&lt;p&gt;Machine learning is a &lt;em&gt;hot&lt;/em&gt; area in Computer Science&amp;#8212; but it&amp;#8217;s intimidating. Like most subjects, there&amp;#8217;s &lt;a href="http://measuringmeasures.com/blog/2010/3/12/learning-about-machine-learning-2nd-ed.html"&gt;a lot&lt;/a&gt; &lt;a title="There are lots of machine learning resources out there, unfortunately most of them scare off beginners." href="http://news.ycombinator.com/item?id=1055042"&gt;to learn&lt;/a&gt; to be an expert in the field. I didn&amp;#8217;t need to go very deep; I just needed to understand enough to solve my problem. I found a link to &lt;a href="http://research.microsoft.com/apps/pubs/default.aspx?id=67956"&gt;the paper&lt;/a&gt; describing the TrueSkill algorithm and I read it several times, but it didn&amp;#8217;t make sense. It was only 8 pages long, but it seemed beyond my capability to understand. I felt dumb. Even so, I was too stubborn to give up. Jamie Zawinski &lt;a title="The quote comes from Coders @ Work" href="http://books.google.com/books?id=nneBa6-mWfgC&amp;amp;printsec=frontcover&amp;amp;dq=coders+at+work&amp;amp;ei=hVFeS6CSI5G2NJadyPQC&amp;amp;cd=1#v=onepage&amp;amp;q=%22Not%20knowing%20something%20doesn%27t%20mean%20you%27re%20dumb%22&amp;amp;f=false"&gt;said it well&lt;/a&gt;:&lt;/p&gt;&lt;blockquote&gt;&lt;br /&gt;    &amp;#8220;Not knowing something doesn&amp;#8217;t mean you&amp;#8217;re dumb&amp;#8212; it just means you don&amp;#8217;t know it.&amp;#8221;&lt;br /&gt;  &lt;/blockquote&gt;&lt;p&gt;I learned that the problem isn&amp;#8217;t the difficulty of the ideas themselves, but rather that the ideas make too big of a jump from &lt;a title="If you're like most people, then top of your math career was calculus. Although it has interesting concepts, you probably don't use it anymore. You would have been far better off learning more about statistics to handle all the data you're faced with. Arthur Benjamin's 2009 TED talk goes into this." href="http://www.ted.com/talks/arthur_benjamin_s_formula_for_changing_math_education.html"&gt;the math&lt;/a&gt; that &lt;a title="We spend way too much tyime learning how calculate, long-divide, integrate by parts, yadda yadda, instead of learning why you'd want to do that or what it's actually useful for. In the era of Moore's law, you can bank on computers getting better at doing computational grunt work, but it's sad that you can't depend on the education system teaching kids how to take advantage of all that power. Although *slightly* biased towards using tools like Mathematica, this talk by Conrad Wolfram shares a similar viewpoint." href="http://www.youtube.com/watch?v=TsvPE1EqwQ8"&gt;we typically learn&lt;/a&gt; &lt;a href="http://news.ycombinator.com/item?id=1058584" title="To prove this, start talking about even concepts in this blog post at your next party and look at the reaction."&gt;in school&lt;/a&gt;. This is sad because underneath the apparent complexity lies some beautiful concepts. In hindsight, the algorithm seems relatively simple, but it took me several months to arrive at that conclusion. My hope is that I can short-circuit the haphazard and slow process I went through and take you directly to the beauty of &lt;em&gt;understanding&lt;/em&gt; what&amp;#8217;s inside the gem that is the TrueSkill algorithm.&lt;/p&gt;&lt;h4&gt;Skill &amp;#8776; Probability of Winning&lt;/h4&gt;&lt;p&gt;&lt;a href="http://en.wikipedia.org/wiki/File:Osaka07_D2A_Torri_Edwards.jpg"&gt;&lt;img alt="Women runners in the 100 meter dash." style="border:0; border:0; float:right; margin: 10px 0px; width: 320px; display: inline; height: 260px; border:0;" id="BLOGGER_PHOTO_ID_5432537170014363586" name="BLOGGER_PHOTO_ID_5432537170014363586" src="http://3.bp.blogspot.com/_Zfbv3mHcYrc/S2Q_xffP38I/AAAAAAAAKYo/YcgBWcpjYtI/s320/100M_dash_Osaka07_D2A_Torri_Edwards.jpg" title="World Athletics Championships 2007 in Osaka. Photo from Wikipedia by Eckhard Pecher. Used under the Creative Commons Attribution 2.5 Generic License" /&gt;&lt;/a&gt;Skill is tricky to measure. Being good at something takes &lt;a href="http://www.moserware.com/2008/03/what-does-it-take-to-become-grandmaster.html"&gt;deliberate practice&lt;/a&gt; and sometimes a bit of luck. How do you measure that in a person? You could just ask someone if they&amp;#8217;re skilled, but this would only give a rough approximation since people tend to be &lt;a title="It's worth reading about the overconfidence effect if you haven't done it before" href="http://en.wikipedia.org/wiki/Overconfidence_effect"&gt;overconfident&lt;/a&gt; in their ability. Perhaps a better question is &amp;#8220;what would the &lt;a title="for example, meters, seconds, etc." href="http://en.wikipedia.org/wiki/Units_of_measurement"&gt;units&lt;/a&gt; of skill be?&amp;#8221; For something like the 100 meter dash, you could just average the number of seconds of several recent sprints. However, for a game like chess, it&amp;#8217;s harder because all that&amp;#8217;s really important is if you win, lose, or draw.&lt;/p&gt;&lt;p&gt;It might make sense to just tally the total number of wins and losses, but this wouldn&amp;#8217;t be fair to people that played a lot (or a little). Slightly better is to record the percent of games that you win. However, this wouldn&amp;#8217;t be fair to people that &lt;a title="Jeff Atwood discussed the concept further." href="http://www.codinghorror.com/blog/archives/000961.html"&gt;beat up on far worse players&lt;/a&gt; or players who got decimated but maybe learned a thing or two. The goal of most games is to win, but if you win &lt;em&gt;too&lt;/em&gt; much, then you&amp;#8217;re probably not challenging yourself. Ideally, if all players won about half of their games, we&amp;#8217;d say things are balanced. In this ideal scenario, everyone would have a near 50% win ratio, making it impossible to compare using that metric.&lt;/p&gt;&lt;p&gt;Finding universal units of skill is too hard, so we&amp;#8217;ll just give up and not use &lt;em&gt;any&lt;/em&gt; units. The only thing we really care about is roughly who&amp;#8217;s better than whom and by how much. One way of doing this is coming up with a &lt;a title="There's a lot of cool stuff you can do with scales, specifically things like the Thurstone Case V and Bradley-Terry models, but there just wasn't enough space to cover these in detail, so I'm only going to passively mention them here, but encourage you to check them out." href="http://en.wikipedia.org/wiki/Scale_%28social_sciences%29"&gt;scale&lt;/a&gt; where each person has a unit-less number expressing their rating that you could use for comparison. If a player has a skill rating much higher than someone else, we&amp;#8217;d expect them to win if they played each other.&lt;/p&gt;&lt;p&gt;The key idea is that a single skill number is meaningless. What&amp;#8217;s important is how that number compares with others. This is an important point worth repeating: &lt;strong&gt;skill only makes sense if it&amp;#8217;s relative to something else&lt;/strong&gt;. We&amp;#8217;d like to come up with a system that gives us numbers that are useful for comparing a person&amp;#8217;s skill. In particular, we&amp;#8217;d like to have a skill rating system that we could use to predict the probability of winning, losing, or drawing in matches based on a numerical rating.&lt;/p&gt;&lt;p&gt;We&amp;#8217;ll spend the rest of our time coming up with a system to calculate and update these skill numbers with the assumption that they can be used to determine the probability of an outcome.&lt;/p&gt;&lt;h4&gt;What Exactly is Probability Anyway?&lt;/h4&gt;&lt;p&gt;You can learn about probability if you&amp;#8217;re willing to flip a coin&amp;#8212; &lt;em&gt;a lot&lt;/em&gt;. You flip a few times:&lt;/p&gt;&lt;a href="http://www.flickr.com/photos/matthiasxc/3600131465/"&gt;&lt;img alt="Heads" style="border:0; border:0; width: 240px; height: 240px" id="BLOGGER_PHOTO_ID_5431258503464036242" name="BLOGGER_PHOTO_ID_5431258503464036242" src="http://2.bp.blogspot.com/_Zfbv3mHcYrc/S1-01TZLJ5I/AAAAAAAAKXg/kXFh6ZAiC-U/s400/pennyheads.jpg" title="Photo by matthiasxc on Flickr. Used under the Creative Commons Attribution License" /&gt;&lt;/a&gt;&lt;a href="http://www.flickr.com/photos/matthiasxc/3600131465/"&gt;&lt;img alt="Heads" style="border:0; width: 240px; height: 240px" id="BLOGGER_PHOTO_ID_5431258503464036242" name="BLOGGER_PHOTO_ID_5431258503464036242" src="http://2.bp.blogspot.com/_Zfbv3mHcYrc/S1-01TZLJ5I/AAAAAAAAKXg/kXFh6ZAiC-U/s400/pennyheads.jpg" title="Photo by matthiasxc on Flickr. Used under the Creative Commons Attribution License" /&gt;&lt;/a&gt;&lt;a href="http://www.flickr.com/photos/matthiasxc/3600942160/in/photostream/"&gt;&lt;img alt="Tails" style="border:0; width: 239px; height: 240px" id="BLOGGER_PHOTO_ID_5431259976545222946" name="BLOGGER_PHOTO_ID_5431259976545222946" src="http://4.bp.blogspot.com/_Zfbv3mHcYrc/S1-2LDDGQSI/AAAAAAAAKXo/MuDWpGPPW3A/s400/pennytails_matthiasxc.jpg" title="Photo by matthiasxc on Flickr. Used under the Creative Commons Attribution License" /&gt;&lt;/a&gt;&lt;p&gt;Heads, heads, tails!&lt;/p&gt;&lt;p&gt;Each flip has a &lt;a title="It turns out that flipping a coin is actually biased towards the side that is face up when you flip it." href="http://www.codingthewheel.com/archives/the-coin-flip-a-fundamentally-unfair-proposition"&gt;seemingly&lt;/a&gt; random outcome. However, &amp;#8220;random&amp;#8221; usually means that you haven&amp;#8217;t looked long enough to see a pattern emerge. If we take the total number of heads and divide it by the total number of flips, we see a very definite pattern emerge:&lt;/p&gt;&lt;a href="http://4.bp.blogspot.com/_Zfbv3mHcYrc/S1-2xT-xuBI/AAAAAAAAKXw/xxEPk9xd4Bo/s1600-h/headspercentage.png"&gt;&lt;img style="border:0;" id="BLOGGER_PHOTO_ID_5431260633925531666" name="BLOGGER_PHOTO_ID_5431260633925531666" src="http://4.bp.blogspot.com/_Zfbv3mHcYrc/S1-2xT-xuBI/AAAAAAAAKXw/xxEPk9xd4Bo/s576/headspercentage.png" /&gt;&lt;/a&gt;&lt;p&gt;But you knew that it was going to be a 50-50 chance &lt;em&gt;in the long run&lt;/em&gt;. When saying something is random, we often mean it&amp;#8217;s bounded within some range. &lt;a title="Photo is 'Wee!' by 'M i x y' on Flickr. Used under the Creative Commons Attribution License." href="http://www.flickr.com/photos/ladymixy-uk/4063190403/"&gt;&lt;img style="border:0; margin: 10px 0px 0px 15px; width: 320px; display: inline; height: 213px" id="BLOGGER_PHOTO_ID_5432550112612764338" name="BLOGGER_PHOTO_ID_5432550112612764338" align="right" src="http://4.bp.blogspot.com/_Zfbv3mHcYrc/S2RLi2bKyrI/AAAAAAAAKYw/brunlUsQIQA/s320/target_ladymixy_uk.jpg" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;It turns out that a better metaphor is to think of a bullseye that archers shoot at. Each arrow will land somewhere near that center. It would be extraordinary to see an arrow hit the bullseye exactly. Most of the arrows will seem to be randomly scattered around it. Although &amp;#8220;random,&amp;#8221; it&amp;#8217;s far more likely that arrows will be near the target than, for example, way out in the woods (well, except if &lt;em&gt;I&lt;/em&gt; was the archer).&lt;/p&gt;&lt;p&gt;This isn&amp;#8217;t a new metaphor; the Greek word &amp;#963;&amp;#964;&amp;#972;&amp;#967;&amp;#959;&amp;#962; (stochos) refers to a stick set up to aim at. It&amp;#8217;s where statisticians get the word &lt;a title="besides, stow chass tick is just fun to pronounce" href="http://blogs.wnyc.org/radiolab/2009/06/15/stochasticity/"&gt;stochastic&lt;/a&gt;: a fancy, but slightly more correct word than random. The distribution of arrows brings up another key point:&lt;/p&gt;&lt;p&gt;&lt;strong&gt;All things are possible, but not all things are &lt;em&gt;probable&lt;/em&gt;.&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;Probability has &lt;a title="This is a great talk about the history of probability by Keith Devlin. This specific point comes up around the 5 minute mark." href="http://www.youtube.com/watch?v=3pRM4v0O29o#t=5m00s"&gt;changed how ordinary people think&lt;/a&gt;, a feat that rarely happens in mathematics. The very idea that you could understand &lt;em&gt;anything&lt;/em&gt; about future outcomes is such a big leap in thought that it &lt;a title="This is the book that is described in the video of the previous link. It's a quick read and interesting to see how mathematics is really developed." href="http://www.amazon.com/gp/product/0465009107?ie=UTF8&amp;amp;tag=moserware-20&amp;amp;linkCode=as2&amp;amp;camp=1789&amp;amp;creative=390957&amp;amp;creativeASIN=0465009107"&gt;baffled Blaise Pascal&lt;/a&gt;, one of the best mathematicians in history.&lt;/p&gt;&lt;p&gt;In the summer of 1654, Pascal exchanged a &lt;a title="You can read the letters here" href="http://www.york.ac.uk/depts/maths/histstat/pascal.pdf"&gt;series of letters&lt;/a&gt; with &lt;a href="http://en.wikipedia.org/wiki/Pierre_de_Fermat"&gt;Pierre de Fermat&lt;/a&gt;, another brilliant mathematician, concerning an &amp;#8220;unfinished game.&amp;#8221; Pascal wanted to know how to divide money among gamblers if they have to leave before the game is finished. Splitting the money fairly required some notion of the probability of outcomes if the game would have been played until the end. This problem gave birth to the field of probability and laid the foundation for lots of fun things like life insurance, casino games, and scary &lt;a title="Warren Buffet calls them financial weapons of mass destruction" href="http://en.wikipedia.org/wiki/Derivative_%28finance%29"&gt;financial derivatives&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;But probability is more general than predicting the future&amp;#8212; it&amp;#8217;s a measure of your ignorance of something. It doesn&amp;#8217;t matter if the event is set to happen in the future or if it happened months ago. All that matters is that &lt;em&gt;you lack knowledge in something&lt;/em&gt;. Just because we lack knowledge doesn&amp;#8217;t mean we can&amp;#8217;t do anything useful, but we&amp;#8217;ll have to do a lot more coin flips to see it.&lt;/p&gt;&lt;h4&gt;Aggregating Observations&lt;/h4&gt;&lt;p&gt;The real magic happens when we aggregate a lot of observations. What would happen if you flipped a coin 1000 times and counted the number of heads? Lots of things are possible, but in my case I got 505 heads. That&amp;#8217;s about half, so it&amp;#8217;s not surprising. I can graph this by creating a bar chart and put all the possible outcomes (getting 0 to 1000 heads) on the bottom and the total number of times that I got that particular count of heads on the vertical axis. For 1 outcome of 505 total heads it would look like this:&lt;/p&gt;&lt;a href="http://2.bp.blogspot.com/_Zfbv3mHcYrc/S2EMQZLJ1SI/AAAAAAAAKX4/bZXU0-gOScw/s1600-h/totalheads1.png"&gt;&lt;img style="border:0;" id="BLOGGER_PHOTO_ID_5431636101360637218" name="BLOGGER_PHOTO_ID_5431636101360637218" src="http://2.bp.blogspot.com/_Zfbv3mHcYrc/S2EMQZLJ1SI/AAAAAAAAKX4/bZXU0-gOScw/s576/totalheads1.png" /&gt;&lt;/a&gt;&lt;p&gt;Not too exciting. But what if we did it again? This time I got 518 heads. I can add that to the chart:&lt;/p&gt;&lt;a href="http://2.bp.blogspot.com/_Zfbv3mHcYrc/S2EMqwPrFwI/AAAAAAAAKYA/6_zLD6matE4/s1600-h/totalheads2.png"&gt;&lt;img style="border:0;" id="BLOGGER_PHOTO_ID_5431636554230208258" name="BLOGGER_PHOTO_ID_5431636554230208258" src="http://2.bp.blogspot.com/_Zfbv3mHcYrc/S2EMqwPrFwI/AAAAAAAAKYA/6_zLD6matE4/s576/totalheads2.png" /&gt;&lt;/a&gt;&lt;p&gt;Doing it 8 more times gave me 489, 515, 468, 508, 492, 475, 511, and once again, I got 505. The chart now looks like this:&lt;/p&gt;&lt;a href="http://4.bp.blogspot.com/_Zfbv3mHcYrc/S2EM_2oh3mI/AAAAAAAAKYI/x7ytLC1LFeo/s1600-h/totalheads10.png"&gt;&lt;img style="border:0;" id="BLOGGER_PHOTO_ID_5431636916722327138" name="BLOGGER_PHOTO_ID_5431636916722327138" src="http://4.bp.blogspot.com/_Zfbv3mHcYrc/S2EM_2oh3mI/AAAAAAAAKYI/x7ytLC1LFeo/s576/totalheads10.png" /&gt;&lt;/a&gt;&lt;p&gt;And after a billion times, a total of one &lt;em&gt;trillion&lt;/em&gt; flips, I got this:&lt;/p&gt;&lt;a href="http://3.bp.blogspot.com/_Zfbv3mHcYrc/S2RUBHvAW5I/AAAAAAAAKY4/2erLR25Cpyc/s1600-h/totalheads1e9.png"&gt;&lt;img style="border:0;" id="BLOGGER_PHOTO_ID_5432559428748467090" title="In case you're wondering, I used a cryptographically strong random number generator and kept all my two CPU cores busy for a few hours running it as an idle job." name="BLOGGER_PHOTO_ID_5432559428748467090" src="http://3.bp.blogspot.com/_Zfbv3mHcYrc/S2RUBHvAW5I/AAAAAAAAKY4/2erLR25Cpyc/s576/totalheads1e9.png" /&gt;&lt;/a&gt;&lt;p&gt;In all the flips, I never got less than 407 total heads and I never got more than 600. Just for fun, we can zoom in on this region:&lt;/p&gt;&lt;a href="http://3.bp.blogspot.com/_Zfbv3mHcYrc/S2RUR_oRMCI/AAAAAAAAKZA/xytGIDIXH5I/s1600-h/totalheads1e9_zoomed.png"&gt;&lt;img style="border:0;" id="BLOGGER_PHOTO_ID_5432559718630502434" name="BLOGGER_PHOTO_ID_5432559718630502434" src="http://3.bp.blogspot.com/_Zfbv3mHcYrc/S2RUR_oRMCI/AAAAAAAAKZA/xytGIDIXH5I/s576/totalheads1e9_zoomed.png" /&gt;&lt;/a&gt;&lt;p&gt;As we do more sets of flips, the &lt;a title="The jagged edges are actually part of a Binomial Distribution. This is discussed more in the accompanying math paper to this article." href="http://en.wikipedia.org/wiki/Binomial_distribution"&gt;jagged edges&lt;/a&gt; smooth out to give us the famous &amp;#8220;&lt;a href="http://en.wikipedia.org/wiki/Normal_distribution"&gt;bell curve&lt;/a&gt;&amp;#8221; that you&amp;#8217;ve probably seen before. Math guys love to refer to it as a &amp;#8220;&lt;a href="http://en.wikipedia.org/wiki/Gaussian_function"&gt;Gaussian&lt;/a&gt;&amp;#8221; curve because it was used by the German mathematician Carl Gauss in 1809 to investigate errors in astronomical data. He came up with an exact formula of what to expect if we flipped a coin an infinite number of times (so that we don&amp;#8217;t have to). This is such a famous result that you can see the curve and its equation if you look closely at the middle of an old 10 Deutsche Mark banknote bearing Gauss&amp;#8217;s face:&lt;/p&gt;&lt;a href="http://1.bp.blogspot.com/_Zfbv3mHcYrc/S2L0-j7yViI/AAAAAAAAKYg/HhzizCzK2wI/s1600-h/10_DM_Gauss_Cropped.jpg"&gt;&lt;img style="border:0;" id="BLOGGER_PHOTO_ID_5432173456197309986" title="I wonder: what is the probability of having a mathematician on (legal) USA currency?" name="BLOGGER_PHOTO_ID_5432173456197309986" src="http://1.bp.blogspot.com/_Zfbv3mHcYrc/S2L0-j7yViI/AAAAAAAAKYg/HhzizCzK2wI/s576/10_DM_Gauss_Cropped.jpg" /&gt;&lt;/a&gt;&lt;p&gt;Don&amp;#8217;t miss the forest from all the flippin&amp;#8217; trees. The curve is showing you the density of all possible outcomes. By density, I mean how tall the curve gets at a certain point. For example, in counting the total number of heads out of 1000 flips, I expected that 500 total heads would be the most popular outcome and indeed it was. I saw 25,224,637 out of a billion sets that had exactly 500 heads. This works out to about 2.52% of all outcomes. In contrast, if we look at the bucket for 450 total heads, I only saw this happen 168,941 times, or roughly 0.016% of the time. This confirms your observation that the curve is denser, that is, &lt;em&gt;taller&lt;/em&gt; at the mean of 500 than further away at 450.&lt;/p&gt;&lt;p&gt;This confirms the key point: &lt;strong&gt;all things are possible, but outcomes are not all equally probable&lt;/strong&gt;. There are &lt;a title="Here's a This American Life episode dedicated to longshots" href="http://www.thisamericanlife.org/Radio_Episode.aspx?episode=398"&gt;longshots&lt;/a&gt;. Professional athletes &lt;a title="It's interesting to read Gladwell's description of the difference between these two." href="http://www.gladwell.com/2000/2000_08_21_a_choking.htm"&gt;panic or &amp;#8216;choke&amp;#8217;&lt;/a&gt;. The &lt;a title="Ok, so Kasparov might have had a simple mistake in the last game, but given enough time with Moore's law, it was going to happen eventually, it just so happened that it was him." href="http://en.wikipedia.org/wiki/Deep_Blue_%E2%80%93_Kasparov,_1997,_Game_6"&gt;world&amp;#8217;s best chess players have bad days&lt;/a&gt;. Additionally, tales about underdogs &lt;a title="I think the best part about Mine That Bird winning the Kentucky Derby in 2009 is that it took the TV announcer about 10 seconds to get the horse's name once it took the lead at the end." href="http://www.youtube.com/watch?v=Hv8x9x5A49s"&gt;make us smile&lt;/a&gt;&amp;#8212; the longer the odds the better. Unexpected outcomes happen, but there&amp;#8217;s still a lot of predictability out there.&lt;/p&gt;&lt;p&gt;It&amp;#8217;s not just coin flips. The bell curve shows up in lots of places like casino games, to the thickness of tree bark, to the measurements of a person&amp;#8217;s IQ. Lots of people have looked at the world and have come up with Gaussian models. It&amp;#8217;s easy to think of the world as one big, bell shaped playground.&lt;/p&gt;&lt;p&gt;But the real world isn&amp;#8217;t always Gaussian. History books are full of &amp;#8220;&lt;a title="The story goes that people used to use the phrase 'black swan' to have the same meaning as 'when pigs fly' until black swans were actually discovered to exist." href="http://www.amazon.com/gp/product/1400063515?ie=UTF8&amp;amp;tag=moserware-20&amp;amp;linkCode=as2&amp;amp;camp=1789&amp;amp;creative=390957&amp;amp;creativeASIN=1400063515"&gt;Black Swan&lt;/a&gt;&amp;#8221; events. Stock market crashes and the invention of the computer are statistical outliers that Gaussian models tend not to predict well, but these events shock the world and forever change it. This type of reality isn&amp;#8217;t covered by the bell curve, what Black Swan author &lt;a href="http://www.fooledbyrandomness.com/"&gt;Nassim Teleb&lt;/a&gt; calls the &amp;#8220;&lt;a href="http://books.google.com/books?id=YdOYmYA2TJYC&amp;amp;lpg=PA229&amp;amp;dq=%22the%20bell%20curve%20that%20great%20intellectual%20fraud%22&amp;amp;pg=PA229#v=onepage&amp;amp;q=%22the%20bell%20curve%20that%20great%20intellectual%20fraud%22&amp;amp;f=false"&gt;Great Intellectual Fraud&lt;/a&gt;.&amp;#8221; These events would have such low probability that no one would predict them actually happening. There&amp;#8217;s a different view of randomness that is a fascinating playground of &lt;a href="http://en.wikipedia.org/wiki/Beno%C3%AEt_Mandelbrot"&gt;Beno&amp;#238;t Mandelbrot&lt;/a&gt; &lt;a href="http://www.amazon.com/gp/product/0465043577/ref=pd_lpo_k2_dp_sr_1?pf_rd_p=486539851&amp;amp;pf_rd_s=lpo-top-stripe-1&amp;amp;pf_rd_t=201&amp;amp;pf_rd_i=0465043550&amp;amp;pf_rd_m=ATVPDKIKX0DER&amp;amp;pf_rd_r=1J3P8AMPM2MT0QD3S5K3#noop"&gt;and his fractals&lt;/a&gt; that better explain some of these events, but we will ignore all of this to keep things simple. We&amp;#8217;ll acknowledge that the Gaussian view of the world isn&amp;#8217;t &lt;em&gt;always&lt;/em&gt; right, no more than a map of the world is the actual terrain.&lt;/p&gt;&lt;p&gt;The Gaussian worldview assumes everything will typically be some average value and then treats everything else as increasingly less likely &amp;#8220;errors&amp;#8221; as you exponentially drift away from the center (Gauss used the curve to measure &lt;em&gt;errors&lt;/em&gt; in astronomical data after all). However, it&amp;#8217;s not fair to treat real observations from the world as &amp;#8220;errors&amp;#8221; any more than it is to say that a person is an &amp;#8220;error&amp;#8221; from the &amp;#8220;average human&amp;#8221; that is half male and half female. Some of these same problems can come up treating a person as having skill that is Gaussian. Disclaimers aside, we&amp;#8217;ll go along with George Box&amp;#8217;s &lt;a title="See the bottom of page 61 here, although he said it much earlier, at least in 1987. I first heard of this quote in a talk by Peter Norvig on the usefulness of even poor models given lots of data." href="http://books.google.com/books?id=63v--IZrNtsC&amp;amp;lpg=PA61&amp;amp;dq=%22all%20models%20are%20wrong%22%20george%20box&amp;amp;pg=PA61#v=onepage&amp;amp;q=&amp;amp;f=false"&gt;view&lt;/a&gt; that &amp;#8220;all models are wrong, but some models are useful.&amp;#8221;&lt;/p&gt;&lt;h4&gt;Gaussian Basics&lt;/h4&gt;&lt;p&gt;Gaussian curves are completely described by two values:&lt;/p&gt;&lt;ol&gt;&lt;li&gt;The mean (average) value which is often represented by the Greek letter &amp;#956; (mu)&lt;/li&gt;&lt;li&gt;The standard deviation, represented by the Greek letter &amp;#963; (sigma). This indicates how far apart the data is spread out.&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;In counting the total number heads in 1000 flips, the mean was 500 and the standard deviation was &lt;a title="I go into this in more details in the accompanying math paper." href="http://www.wolframalpha.com/input/?i=sqrt%281000*.5*%281-.5%29%29"&gt;about 16&lt;/a&gt;. In general, 68% of the outcomes will be within &amp;#177; 1 standard deviation (e.g. 484-516 in the experiment), 95% within 2 standard deviations (e.g. 468-532) and 99.7% within 3 standard deviations (452-548):&lt;/p&gt;&lt;a title="I got the idea for this diagram from the Wikipedia article on the normal distribution. However, the color and look didn't match the rest of the post, so I recreated it in Excel." href="http://4.bp.blogspot.com/_Zfbv3mHcYrc/S5LAgkPdWsI/AAAAAAAAKgI/o3kJX5ccxWU/s1600-h/NormalDistributionWithPercentages.png"&gt;&lt;img style="border:0;" id="BLOGGER_PHOTO_ID_5445626565161212610" name="BLOGGER_PHOTO_ID_5445626565161212610" src="http://4.bp.blogspot.com/_Zfbv3mHcYrc/S5LAgkPdWsI/AAAAAAAAKgI/o3kJX5ccxWU/s576/NormalDistributionWithPercentages.png" /&gt;&lt;/a&gt;&lt;p&gt;An important takeaway is that the bell curve allows for &lt;em&gt;all&lt;/em&gt; possibilities, but each possibility is most definitely not equally likely. The bell curve gives us a model to calculate how likely something should be given an average value and a spread. Notice how outcomes sharply become less probable as we drift further away from the mean value.&lt;/p&gt;&lt;p&gt;While we&amp;#8217;re looking at the Gaussian curve, it&amp;#8217;s important to look at -3&amp;#963; away from the mean on the left side. As you can see, &lt;em&gt;most&lt;/em&gt; of the area under the curve is to the right of this point. I mention this because &lt;strong&gt;the TrueSkill algorithm uses the -3&amp;#963; mark as a (very) conservative estimate for your skill&lt;/strong&gt;. You&amp;#8217;re probably better than this conservative estimate, but you&amp;#8217;re most likely not worse than this value. Therefore, it&amp;#8217;s a stable number for comparing yourself to others and is useful for use in sorting a leaderboard.&lt;/p&gt;&lt;h4&gt;3D Bell Curves: Multivariate Gaussians&lt;/h4&gt;&lt;p&gt;A non-intuitive observation is that Gaussian distributions can occur in more than the two dimensions that we&amp;#8217;ve seen so far. You can sort of think of a Gaussian in three dimensions as a mountain. Here&amp;#8217;s an example:&lt;/p&gt;&lt;a href="http://3.bp.blogspot.com/_Zfbv3mHcYrc/S4sa2VEcR-I/AAAAAAAAKe8/tLV8OSenBS8/s1600-h/Gaussian_3D_Circular.png"&gt;&lt;img style="border:0;" id="BLOGGER_PHOTO_ID_5443474095278409698" title="In case you're wondering, I used GNU Plot to make this. See the accompanying math paper for more details." name="BLOGGER_PHOTO_ID_5443474095278409698" src="http://3.bp.blogspot.com/_Zfbv3mHcYrc/S4sa2VEcR-I/AAAAAAAAKe8/tLV8OSenBS8/s720/Gaussian_3D_Circular.png" /&gt;&lt;/a&gt;&lt;p&gt;In this plot, taller regions represent higher probabilities. As you can see, not all things are equally probable. The most probable value is the mean value that is right in the middle and then things sharply decline away from it.&lt;/p&gt;&lt;p&gt;In maps of &lt;em&gt;real&lt;/em&gt; mountains, you often see a 2D contour plot where each line represents a different elevation (e.g. every 100 feet):&lt;/p&gt;&lt;a title="I took this snapshot from the 7.5-Minute Series Topographic Map of Pikes Peak Quadrangle from the U.S. Geological Survey (USGS). My wife and I went to Pikes Peak the day we landed in Colorado from Indianapolis. One thing is certain: I felt those elevation lines :). For best experiences, acclimate yourself for a few days and then go." href="http://4.bp.blogspot.com/_Zfbv3mHcYrc/S5XJiVAPfoI/AAAAAAAAKgg/hPMzakmsZEo/s1600-h/PikesPeakTopoMap.png"&gt;&lt;img style="border:0;" id="BLOGGER_PHOTO_ID_5446480915965378178" name="BLOGGER_PHOTO_ID_5446480915965378178" src="http://4.bp.blogspot.com/_Zfbv3mHcYrc/S5XJiVAPfoI/AAAAAAAAKgg/hPMzakmsZEo/s640/PikesPeakTopoMap.png" /&gt;&lt;/a&gt;&lt;p&gt;The closer the lines on the map, the sharper the inclines. You can do something similar for 2D representations of 3D Gaussians. In textbooks, you often just see 2D representation that looks like this:&lt;/p&gt;&lt;a href="http://2.bp.blogspot.com/_Zfbv3mHcYrc/S4segBlQOSI/AAAAAAAAKfE/OQNx_Zcg9FA/s1600-h/Gaussian_2D_Contour.png"&gt;&lt;img style="border:0;" id="BLOGGER_PHOTO_ID_5443478110136711458" title="It's unfortunate that most books never show the 3D perspective, it's much easier to see where it comes from." name="BLOGGER_PHOTO_ID_5443478110136711458" src="http://2.bp.blogspot.com/_Zfbv3mHcYrc/S4segBlQOSI/AAAAAAAAKfE/OQNx_Zcg9FA/s640/Gaussian_2D_Contour.png" /&gt;&lt;/a&gt;&lt;p&gt;This is called an &amp;#8220;isoprobability contour&amp;#8221; plot. It&amp;#8217;s just a fancy way of saying &amp;#8220;things that have the same probability will be the same color.&amp;#8221; Note that it&amp;#8217;s still in three dimensions. In this case, the third dimension is color intensity instead of the height you saw on a surface plot earlier. I like to think of contour plots as treasure maps for playing the &amp;#8220;you&amp;#8217;re getting warmer...&amp;#8221; game. In this case, black means &amp;#8220;you&amp;#8217;re cold,&amp;#8221; red means &amp;#8220;you&amp;#8217;re getting warmer...,&amp;#8221; and yellow means &amp;#8220;you&amp;#8217;re on fire!&amp;#8221; which corresponds to the highest probability.&lt;/p&gt;&lt;p&gt;See? Now you understand Gaussians and know that &amp;#8220;&lt;a href="http://en.wikipedia.org/wiki/Multivariate_normal_distribution"&gt;multivariate Gaussians&lt;/a&gt;&amp;#8221; aren&amp;#8217;t as scary as they sound.&lt;/p&gt;&lt;h4&gt;Let&amp;#8217;s Talk About Chess&lt;/h4&gt;&lt;a title="'Chess Set' by Alan Light on Wikipedia, retouched by Andre Riemann. Licensed under the Creative Commons Attribution ShareAlike 3.0 License." href="http://en.wikipedia.org/wiki/File:ChessSet.jpg"&gt;&lt;img style="border:0; margin: 0px 0px 5px 10px; display: inline" id="BLOGGER_PHOTO_ID_5446484220132842210" name="BLOGGER_PHOTO_ID_5446484220132842210" align="right" src="http://3.bp.blogspot.com/_Zfbv3mHcYrc/S5XMip_J2uI/AAAAAAAAKgo/n0AB8I5DVLg/s160/ChessSet.jpg" /&gt;&lt;/a&gt;&lt;p&gt;There&amp;#8217;s still more to learn, but we&amp;#8217;ll pick up what we need along the way. We already have enough tools to do something useful. To warm up, let&amp;#8217;s talk about chess because ratings are well-defined there.&lt;/p&gt;&lt;p&gt;In chess, a bright beginner is expected to have a rating around 1000. Keep in mind that ratings have no units; it&amp;#8217;s just a number that is only meaningful when compared to someone else&amp;#8217;s number. By &lt;a href="http://www.chessbase.com/newsdetail.asp?newsid=4326" title="This 200 point class tradition was established by the Harkness system developed in the early 1950's. It was a popular precursor to the Elo system that we'll cover shortly."&gt;tradition&lt;/a&gt;, a difference of 200 indicates the better ranked player is expected to win 75% of the time. Again, nothing is special about the number 200, it was just chosen to be the difference needed to get a 75% win ratio and effectively defines a &amp;#8220;class&amp;#8221; of player.&lt;/p&gt;&lt;p&gt;I&amp;#8217;ve slowly been practicing and have a rating around 1200. This means that if I play a bright beginner with a rating of 1000, I&amp;#8217;m expected to win three out of four games.&lt;/p&gt;&lt;p&gt;We can start to visualize a match between me and bright beginner by drawing two bell curves that have a mean of 1000 and 1200 respectively with both having a standard deviation of 200:&lt;/p&gt;&lt;a href="http://4.bp.blogspot.com/_Zfbv3mHcYrc/S2Tx3mUnG9I/AAAAAAAAKZo/N3CZWIlhjoI/s1600-h/bell_curves_of_bright_beginner_vs_jeff_before.png"&gt;&lt;img style="border:0;" id="BLOGGER_PHOTO_ID_5432732987997756370" name="BLOGGER_PHOTO_ID_5432732987997756370" src="http://4.bp.blogspot.com/_Zfbv3mHcYrc/S2Tx3mUnG9I/AAAAAAAAKZo/N3CZWIlhjoI/s576/bell_curves_of_bright_beginner_vs_jeff_before.png" /&gt;&lt;/a&gt;&lt;p&gt;The above graph shows what the ratings represent: they&amp;#8217;re an indicator of how we&amp;#8217;re &lt;em&gt;expected&lt;/em&gt; to perform if we play a game. The most likely performance is exactly what the rating is (the mean value). One non-obvious point is that you can &lt;a title="This subtraction idea is also covered more in the accompanying math paper." href="http://mathworld.wolfram.com/NormalDifferenceDistribution.html"&gt;subtract two bell curves and get another bell curve&lt;/a&gt;. The new center is the difference of the means and the resulting curve is a bit wider than the previous curves. By taking my skill curve (red) and subtracting the beginner&amp;#8217;s curve (blue), you&amp;#8217;ll get this resulting curve (purple):&lt;/p&gt;&lt;a href="http://4.bp.blogspot.com/_Zfbv3mHcYrc/S2TvsakEvuI/AAAAAAAAKZg/1caIpEXPH0Q/s1600-h/bell_curves_difference.png"&gt;&lt;img style="border:0;" id="BLOGGER_PHOTO_ID_5432730596839571170" name="BLOGGER_PHOTO_ID_5432730596839571170" src="http://4.bp.blogspot.com/_Zfbv3mHcYrc/S2TvsakEvuI/AAAAAAAAKZg/1caIpEXPH0Q/s576/bell_curves_difference.png" /&gt;&lt;/a&gt;&lt;p&gt;Note that it&amp;#8217;s centered at 1200 - 1000 = 200. Although interesting to look on its own, it gives some useful information. This curve is representing all possible game outcomes between me and the beginner. The middle shows that I&amp;#8217;m expected to be 200 points better. The far left side shows that there is a tiny chance that the beginner has a game where he plays as if he&amp;#8217;s 700 points better than I am. The far right shows that there is a tiny chance that I&amp;#8217;ll play as if I&amp;#8217;m 1100 points better. The curve actually goes on forever in both ways, but the expected probability for those outcomes is so small that it&amp;#8217;s effectively zero.&lt;/p&gt;&lt;p&gt;As a player, you really only care about one very specific point on this curve: zero. Since I have a higher rating, I&amp;#8217;m interested in all possible outcomes where the difference is positive. These are the outcomes where I&amp;#8217;m expected to outperform the beginner. On the other hand, the beginner is keeping his eye on everything to the left of zero. These are the outcomes where the performance difference is negative, implying that he outperforms me.&lt;/p&gt;&lt;a href="http://1.bp.blogspot.com/_Zfbv3mHcYrc/S2XY9WNERII/AAAAAAAAKZw/nNzg4ZvrpQM/s1600-h/performance_difference_shaded_to_zero.png"&gt;&lt;img style="border:0;" id="BLOGGER_PHOTO_ID_5432987073936376962" name="BLOGGER_PHOTO_ID_5432987073936376962" src="http://1.bp.blogspot.com/_Zfbv3mHcYrc/S2XY9WNERII/AAAAAAAAKZw/nNzg4ZvrpQM/s576/performance_difference_shaded_to_zero.png" /&gt;&lt;/a&gt;&lt;p&gt;We can plug a few numbers into &lt;a title="For example: Wolfram Alpha or Excel" href="http://www.wolframalpha.com/input/?i=CDF%5BNormalDistribution%5B200%2C+200+*+Sqrt%5B2%5D%5D%2C+0%5D"&gt;a calculator&lt;/a&gt; and see that there is about a 24% probability that the performance difference will be negative, implying the beginner wins, and a 76% chance that the difference will be positive, meaning that I win. This is roughly the 75% that we were expecting for a 200 point difference.&lt;/p&gt;&lt;p&gt;This has been a bit too concrete for my particular match with a beginner. We can generalize it by creating another curve where the horizontal axis represents the difference in player ratings and the vertical axis represents the total probability of winning given that rating difference:&lt;/p&gt;&lt;a href="http://2.bp.blogspot.com/_Zfbv3mHcYrc/S2X1k7iXRTI/AAAAAAAAKaA/UEwV2FQA5Hk/s1600-h/cdf_chess_given_rating_difference.png"&gt;&lt;img style="border:0;" id="BLOGGER_PHOTO_ID_5433018540298290482" name="BLOGGER_PHOTO_ID_5433018540298290482" src="http://2.bp.blogspot.com/_Zfbv3mHcYrc/S2X1k7iXRTI/AAAAAAAAKaA/UEwV2FQA5Hk/s640/cdf_chess_given_rating_difference.png" /&gt;&lt;/a&gt;&lt;p&gt;As expected, having two players with equal ratings, and thus a rating difference of 0, implies the odds of winning are 50%. Likewise, if you look at the -200 mark, you see the curve is at the 24% that we calculated earlier. Similarly, +200 is at the 76% mark. This also shows that outcomes on the far left side are quite unlikely. For example, the odds of me winning a game against &lt;a href="http://en.wikipedia.org/wiki/Magnus_Carlsen" title="Since Kasparov stopped playing professionally, Magnus is the top guy. Not surprisingly, Kasparov is now Magnus's teacher."&gt;Magnus Carlsen&lt;/a&gt;, who is at the top of the &lt;a title="The 19 year old Magnus was at the top of the FIDE leaderboard at the time of this writing (March 2010)" href="http://ratings.fide.com/top.phtml?list=men"&gt;chess leaderboard&lt;/a&gt; with a rating of 2813, would be at the -1613 mark (1200 - 2813) on this chart and have a probability near one in a &lt;em&gt;billion&lt;/em&gt;. I won&amp;#8217;t hold my breath. (Actually, most chess groups use a slightly different curve, but the ideas are the same. See the &lt;a href="http://dl.dropbox.com/u/1083108/Moserware/Skill/The%20Math%20Behind%20TrueSkill.pdf"&gt;accompanying math paper&lt;/a&gt; for details.)&lt;/p&gt;&lt;p&gt;All of these curves were probabilities of what &lt;em&gt;might&lt;/em&gt; happen, not what &lt;em&gt;actually&lt;/em&gt; happened. In actuality, let&amp;#8217;s say I lost the game by some silly blunder (oops!). The question that the beginner wants to know is how much his rating will go up. It also makes sense that my rating will go down as a punishment for the loss. The harder question is just &lt;em&gt;how much&lt;/em&gt; should the ratings change?&lt;/p&gt;&lt;p&gt;By winning, the beginner demonstrated that he was probably better than the 25% winning probability we thought he would have. One way of updating ratings is to imagine that each player bets a certain amount of his rating on each game. The amount of the bet is determined by the probability of the outcome. In addition, we decide how dramatic the ratings change should be for an individual game. If you believe the most recent game should count 100%, then you&amp;#8217;d expect my rating to go down a lot and his to go up a lot. The decision of how much the most recent game should count leads to what chess guys call the multiplicative &amp;#8220;K-factor.&amp;#8221;&lt;/p&gt;&lt;p&gt;The K-Factor is what we multiply a probability by to get the total amount of a rating change. It reflects the maximum possible change in a person&amp;#8217;s rating. A reasonable choice of a weight is that the most recent game counts about 7% which leads to a K-factor of 24. New players tend to have more fluctuations than well-established players, so new players might get a K-Factor of 32 while grand masters have a K-factor around 10. Here&amp;#8217;s how the K-Factor changes with respect to how much the latest game should count:&lt;/p&gt;&lt;a href="http://4.bp.blogspot.com/_Zfbv3mHcYrc/S5ZZF5xos8I/AAAAAAAAKg0/K4Whs0yA79Y/s1600-h/KFactorAlphaImpact.png"&gt;&lt;img style="border:0;" id="BLOGGER_PHOTO_ID_5446638757294420930" name="BLOGGER_PHOTO_ID_5446638757294420930" src="http://4.bp.blogspot.com/_Zfbv3mHcYrc/S5ZZF5xos8I/AAAAAAAAKg0/K4Whs0yA79Y/s576/KFactorAlphaImpact.png" /&gt;&lt;/a&gt;&lt;p&gt;Using a K-Factor of 24 means that my rating will now be lowered to 1182 and the beginner&amp;#8217;s will rise to 1018. Our curves are now closer together:&lt;/p&gt;&lt;a href="http://1.bp.blogspot.com/_Zfbv3mHcYrc/S5ZfF6pBUwI/AAAAAAAAKg8/mW6ndagfFDI/s1600-h/BeginnerVsJeffAfterUpdate.png"&gt;&lt;img style="border:0;" id="BLOGGER_PHOTO_ID_5446645354596487938" name="BLOGGER_PHOTO_ID_5446645354596487938" src="http://1.bp.blogspot.com/_Zfbv3mHcYrc/S5ZfF6pBUwI/AAAAAAAAKg8/mW6ndagfFDI/s576/BeginnerVsJeffAfterUpdate.png" /&gt;&lt;/a&gt;&lt;p&gt;Note that our standard deviations never change. Here are the probabilities if we were to play again:&lt;/p&gt;&lt;p&gt;&lt;a href="http://1.bp.blogspot.com/_Zfbv3mHcYrc/S5aDq4_xYXI/AAAAAAAAKhE/RSM0V6uki_Y/s1600-h/performance_difference_shaded_to_zero_after.png"&gt;&lt;img style="border:0;" id="BLOGGER_PHOTO_ID_5446685572228800882" name="BLOGGER_PHOTO_ID_5446685572228800882" src="http://1.bp.blogspot.com/_Zfbv3mHcYrc/S5aDq4_xYXI/AAAAAAAAKhE/RSM0V6uki_Y/s576/performance_difference_shaded_to_zero_after.png" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;This method is known as the &lt;a href="http://en.wikipedia.org/wiki/Elo_rating_system"&gt;Elo rating system&lt;/a&gt;, named after &lt;a href="http://en.wikipedia.org/wiki/Arpad_Elo"&gt;Arpad Elo&lt;/a&gt;, the chess enthusiast who created it. It&amp;#8217;s relatively simple to implement and most games that calculate skill end here.&lt;/p&gt;&lt;h4&gt;I Thought You Said You&amp;#8217;d Talk About TrueSkill?&lt;/h4&gt;&lt;p&gt;Everything so far has just been prerequisites to the main event; the TrueSkill paper assumes you&amp;#8217;re already familiar with it. It was all sort of new to me, so it took awhile to get comfortable with the Elo ideas. Although the Elo model will get you far, there are a few notable things it doesn&amp;#8217;t handle well:&lt;/p&gt;&lt;ol&gt;&lt;li&gt;&lt;strong&gt;Newbies&lt;/strong&gt; - In the Elo system, you&amp;#8217;re typically assigned a &amp;#8220;provisional&amp;#8221; rating for the first 20 games. These games tend to have a higher K-factor associated with them in order to let the algorithm determine your skill faster before it&amp;#8217;s slowed down by a non-provisional (and smaller) K-factor. We would like an algorithm that converges quickly onto a player&amp;#8217;s true skill (get it?) to not waste their time having unbalanced matches. This means the algorithm should start giving reasonable approximations of skill within 5-10 games.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Teams&lt;/strong&gt; - Elo was explicitly designed for two players. Efforts to adapt it to work for multiple people on multiple teams have primarily been unsophisticated hacks. One such approach is to treat teams as individual players that duel against the other players on the opposing teams and then apply the average of the duels. This is the &amp;#8220;duelling heuristic&amp;#8221; mentioned in the TrueSkill paper. I implemented it in the &lt;a href="http://github.com/moserware/Skills"&gt;accompanying project&lt;/a&gt;. It&amp;#8217;s ok, but seems a bit too hackish and doesn&amp;#8217;t converge well.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Draws&lt;/strong&gt; - Elo treats draws as a half win and half loss. This doesn&amp;#8217;t seem fair because draws can tell you a lot. Draws imply you were evenly paired whereas a win indicates you&amp;#8217;re better, but unsure how much better. Likewise, a loss indicates you did worse, but you don&amp;#8217;t really know how much worse. So it seems that a draw is important to explicitly model.&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;The TrueSkill algorithm generalizes Elo by keeping track of two variables: your average (mean) skill &lt;em&gt;and&lt;/em&gt; the system&amp;#8217;s uncertainty about that estimate (your standard deviation). It does this instead of relying on a something like a fixed K-factor. Essentially, this gives the algorithm a dynamic k-factor. This addresses the newbie problem because it removes the need to have &amp;#8220;provisional&amp;#8221; games. In addition, it addresses the other problems in a nice statistical manner. Tracking these two values are so fundamental to the algorithm that Microsoft researchers informally referred to it as the &amp;#956;&amp;#963; (mu-sigma) system until the marketing guys gave it the name TrueSkill.&lt;/p&gt;&lt;p&gt;We&amp;#8217;ll go into the details shortly, but it&amp;#8217;s helpful to get a quick visual overview of what TrueSkill does. Let&amp;#8217;s say we have Eric, an experienced player that has played a lot and established his rating over time. In addition, we have newbie: Natalia.&lt;/p&gt;&lt;p&gt;Here&amp;#8217;s what their skill curves might look like before a game:&lt;/p&gt;&lt;a href="http://2.bp.blogspot.com/_Zfbv3mHcYrc/S5cJKZ6voeI/AAAAAAAAKhM/BW_oakG7pRU/s1600-h/TrueSkillCurvesBeforeExample.png"&gt;&lt;img style="border:0;" id="BLOGGER_PHOTO_ID_5446832348688523746" name="BLOGGER_PHOTO_ID_5446832348688523746" src="http://2.bp.blogspot.com/_Zfbv3mHcYrc/S5cJKZ6voeI/AAAAAAAAKhM/BW_oakG7pRU/s576/TrueSkillCurvesBeforeExample.png" /&gt;&lt;/a&gt;&lt;p&gt;And after Natalia wins:&lt;/p&gt;&lt;a href="http://4.bp.blogspot.com/_Zfbv3mHcYrc/S5cJlUXV0LI/AAAAAAAAKhU/F-1jRnH7mHk/s1600-h/TrueSkillCurvesAfterExample.png"&gt;&lt;img style="border:0;" id="BLOGGER_PHOTO_ID_5446832811054321842" name="BLOGGER_PHOTO_ID_5446832811054321842" src="http://4.bp.blogspot.com/_Zfbv3mHcYrc/S5cJlUXV0LI/AAAAAAAAKhU/F-1jRnH7mHk/s576/TrueSkillCurvesAfterExample.png" /&gt;&lt;/a&gt;&lt;p&gt;Notice how Natalia&amp;#8217;s skill curve becomes narrower and taller (i.e. makes a big update) while Eric&amp;#8217;s curve barely moves. This shows that the TrueSkill algorithm thinks that she&amp;#8217;s probably better than Eric, but doesn&amp;#8217;t how much better. Although TrueSkill is a little more confident about Natalia&amp;#8217;s mean after the game (i.e. it&amp;#8217;s now taller in the middle), it&amp;#8217;s still very uncertain. Looking at her updated bell curve shows that her skill could be between 15 and 50.&lt;/p&gt;&lt;p&gt;The rest of this post will explain how calculations like this occurred and how much more complicated scenarios can occur. But to understand it well enough to implement it, we&amp;#8217;ll need to learn a couple of new things.&lt;/p&gt;&lt;h4&gt;Bayesian Probability&lt;/h4&gt;&lt;a href="http://www.amazon.com/gp/product/B00000IWDR?ie=UTF8&amp;amp;tag=moserware-20&amp;amp;linkCode=as2&amp;amp;camp=1789&amp;amp;creative=390957&amp;amp;creativeASIN=B00000IWDR"&gt;&lt;/a&gt;&lt;p&gt;Most basic statistics classes focus on frequencies of events occurring. For example, the probability of getting a red marble when randomly drawing from a jar that has 3 red marbles and 7 blue marbles is 30%. Another example is that the probability of rolling two dice and getting a total of 7 is &lt;a href="http://www.wolframalpha.com/input/?i=probability+getting+7+two+dice"&gt;about 17%&lt;/a&gt;. The key idea in both of these examples is that you can count each type of outcome and then compute the &lt;em&gt;frequency&lt;/em&gt; directly. Although helpful in calculating your odds at casino games, &amp;#8220;frequentist&amp;#8221; thinking is not that helpful with many practical applications, like finding your skill in a team.&lt;/p&gt;&lt;p&gt;A different approach is to think of probability as degree of belief in something. The basic idea is that you have some &lt;strong&gt;prior belief&lt;/strong&gt; and then you observe some &lt;strong&gt;evidence&lt;/strong&gt; that updates your belief leaving you with an updated &lt;strong&gt;posterior&lt;/strong&gt; belief. As you might expect, learning about new evidence will typically make you more certain about your belief.&lt;/p&gt;&lt;p&gt;Let&amp;#8217;s assume that you&amp;#8217;re trying to find a treasure on a map. The treasure could be anywhere on the map, but you have a hunch that it&amp;#8217;s probably around the center of the map and increasingly less likely as you move away from the center. We could track the probability of finding the treasure using the 3D multivariate Gaussian we saw earlier:&lt;/p&gt;&lt;a href="http://3.bp.blogspot.com/_Zfbv3mHcYrc/S4sa2VEcR-I/AAAAAAAAKe8/tLV8OSenBS8/s1600-h/Gaussian_3D_Circular.png"&gt;&lt;img style="border:0;" id="BLOGGER_PHOTO_ID_5443474095278409698" name="BLOGGER_PHOTO_ID_5443474095278409698" src="http://3.bp.blogspot.com/_Zfbv3mHcYrc/S4sa2VEcR-I/AAAAAAAAKe8/tLV8OSenBS8/s576/Gaussian_3D_Circular.png" /&gt;&lt;/a&gt;&lt;p&gt;Now, let&amp;#8217;s say that after studying a book about the treasure, you&amp;#8217;ve learned that there&amp;#8217;s a strong likelihood that treasure is somewhere along the diagonal line on the map. Perhaps this was based on some secret clue. Your clue information doesn&amp;#8217;t necessarily mean the treasure will be &lt;em&gt;exactly&lt;/em&gt; on that line, but rather that the treasure will most-likely be near it. The &lt;strong&gt;likelihood function&lt;/strong&gt; might look like this in 3D:&lt;/p&gt;&lt;a href="http://2.bp.blogspot.com/_Zfbv3mHcYrc/S4smc_4B1DI/AAAAAAAAKfM/cw28slVmK4E/s1600-h/Gaussian_3D_Likelihood.png"&gt;&lt;img style="border:0;" id="BLOGGER_PHOTO_ID_5443486854232003634" name="BLOGGER_PHOTO_ID_5443486854232003634" src="http://2.bp.blogspot.com/_Zfbv3mHcYrc/S4smc_4B1DI/AAAAAAAAKfM/cw28slVmK4E/s576/Gaussian_3D_Likelihood.png" /&gt;&lt;/a&gt;&lt;p&gt;We&amp;#8217;d like to use our &lt;em&gt;prior&lt;/em&gt; information and this new &lt;em&gt;likelihood&lt;/em&gt; information to come up with a better &lt;em&gt;posterior&lt;/em&gt; guess of the treasure. It turns out that we can just multiply the prior and likelihood to obtain a posterior distribution that looks like this:&lt;/p&gt;&lt;a href="http://4.bp.blogspot.com/_Zfbv3mHcYrc/S4snAilcqWI/AAAAAAAAKfU/KQgGACxlMkk/s1600-h/Gaussian_3D_Posterior.png"&gt;&lt;img style="border:0;" id="BLOGGER_PHOTO_ID_5443487464844732770" name="BLOGGER_PHOTO_ID_5443487464844732770" src="http://4.bp.blogspot.com/_Zfbv3mHcYrc/S4snAilcqWI/AAAAAAAAKfU/KQgGACxlMkk/s576/Gaussian_3D_Posterior.png" /&gt;&lt;/a&gt;&lt;p&gt;This is giving us a smaller and more concentrated area to look at.&lt;/p&gt;&lt;p&gt;If you look at most textbooks, you typically just see this information using 2D isoprobability contour plots that we learned about earlier. Here&amp;#8217;s the same information in 2D:&lt;/p&gt;&lt;p&gt;Prior:&lt;/p&gt;&lt;a href="http://1.bp.blogspot.com/_Zfbv3mHcYrc/S4snWvA5YrI/AAAAAAAAKfc/J31SDnp-09s/s1600-h/Gaussian_2D_Prior.png"&gt;&lt;img style="border:0;" id="BLOGGER_PHOTO_ID_5443487846138208946" name="BLOGGER_PHOTO_ID_5443487846138208946" src="http://1.bp.blogspot.com/_Zfbv3mHcYrc/S4snWvA5YrI/AAAAAAAAKfc/J31SDnp-09s/s576/Gaussian_2D_Prior.png" /&gt;&lt;/a&gt;&lt;p&gt;Likelihood:&lt;/p&gt;&lt;a href="http://2.bp.blogspot.com/_Zfbv3mHcYrc/S4sneX0nRNI/AAAAAAAAKfk/_N5AAMmuIO4/s1600-h/Gaussian_2D_Likelihood.png"&gt;&lt;img style="border:0;" id="BLOGGER_PHOTO_ID_5443487977351627986" name="BLOGGER_PHOTO_ID_5443487977351627986" src="http://2.bp.blogspot.com/_Zfbv3mHcYrc/S4sneX0nRNI/AAAAAAAAKfk/_N5AAMmuIO4/s576/Gaussian_2D_Likelihood.png" /&gt;&lt;/a&gt;&lt;p&gt;Posterior:&lt;/p&gt;&lt;a href="http://1.bp.blogspot.com/_Zfbv3mHcYrc/S4snj-YISVI/AAAAAAAAKfs/eAZD78TsGKs/s1600-h/Gaussian_2D_Posterior.png"&gt;&lt;img style="border:0;" id="BLOGGER_PHOTO_ID_5443488073600485714" name="BLOGGER_PHOTO_ID_5443488073600485714" src="http://1.bp.blogspot.com/_Zfbv3mHcYrc/S4snj-YISVI/AAAAAAAAKfs/eAZD78TsGKs/s576/Gaussian_2D_Posterior.png" /&gt;&lt;/a&gt;&lt;p&gt;For fun, let&amp;#8217;s say we found additional information saying the treasure is along the other diagonal with the following likelihood:&lt;/p&gt;&lt;a href="http://1.bp.blogspot.com/_Zfbv3mHcYrc/S5hDR3bT4xI/AAAAAAAAKhc/BOoitWBwmPU/s1600-h/Gaussian_2D_Likelihood_Opposite_Direction.png"&gt;&lt;img style="border:0;" id="BLOGGER_PHOTO_ID_5447177723519951634" name="BLOGGER_PHOTO_ID_5447177723519951634" src="http://1.bp.blogspot.com/_Zfbv3mHcYrc/S5hDR3bT4xI/AAAAAAAAKhc/BOoitWBwmPU/s576/Gaussian_2D_Likelihood_Opposite_Direction.png" /&gt;&lt;/a&gt;&lt;p&gt;To incorporate this information, we&amp;#8217;re able to &lt;a title="The fancy term for the being able to do this is called the 'conjugate prior' since the prior and posterior are 'conjoined' like twins. That is, they're of the same class of function." href="http://en.wikipedia.org/wiki/Conjugate_prior"&gt;take our last posterior and make that the prior for the next iteration&lt;/a&gt; using the new likelihood information to get this updated posterior:&lt;/p&gt;&lt;a href="http://4.bp.blogspot.com/_Zfbv3mHcYrc/S5hDivDzF3I/AAAAAAAAKhs/8i9SWy-SNhs/s1600-h/Gaussian_2D_Posterior_Updated.png"&gt;&lt;img style="border:0;" id="BLOGGER_PHOTO_ID_5447178013331625842" name="BLOGGER_PHOTO_ID_5447178013331625842" src="http://4.bp.blogspot.com/_Zfbv3mHcYrc/S5hDivDzF3I/AAAAAAAAKhs/8i9SWy-SNhs/s576/Gaussian_2D_Posterior_Updated.png" /&gt;&lt;/a&gt;&lt;p&gt;This is a much more focused estimate than our original belief! We could iterate the procedure and potentially get an even smaller search area.&lt;/p&gt;&lt;p&gt;&lt;a title="Thomas Bayes (c. 1702 - 17 April 1761)" href="http://en.wikipedia.org/wiki/Thomas_Bayes"&gt;&lt;img style="border:0;" id="BLOGGER_PHOTO_ID_5435310499900212850" name="BLOGGER_PHOTO_ID_5435310499900212850" align="right" src="http://3.bp.blogspot.com/_Zfbv3mHcYrc/S24aGiaAxnI/AAAAAAAAKas/PY0bAN-PDpM/s220/Thomas_Bayes.gif" /&gt;&lt;/a&gt;And that&amp;#8217;s basically all there is to it. In TrueSkill, the buried treasure that we look for is a person&amp;#8217;s skill. This approach to probability is called &amp;#8220;Bayesian&amp;#8221; because it was discovered by a Presbyterian minister in the 1700&amp;#8217;s named &lt;a title="More precisely, it was Bayes' friend Richard Price who found this unpublished paper after Bayes' death and saw that it was useful and then decided to publish it." href="http://en.wikipedia.org/wiki/Thomas_Bayes"&gt;Thomas Bayes&lt;/a&gt; who liked to dabble in math.&lt;/p&gt;&lt;p&gt;The central ideas to Bayesian statistics are the prior, the likelihood, and the posterior. There&amp;#8217;s detailed math that goes along with this and is in the &lt;a href="http://dl.dropbox.com/u/1083108/Moserware/Skill/The%20Math%20Behind%20TrueSkill.pdf"&gt;accompanying paper&lt;/a&gt;, but understanding these basic ideas is more important:&lt;/p&gt;&lt;blockquote&gt;&lt;p&gt;&amp;#8220;When you understand something, then you can find the math to express that understanding. The math doesn&amp;#8217;t provide the understanding.&amp;#8221;&amp;#8212; &lt;a href="http://www.reddit.com/r/programming/comments/bblt4/lamport_when_you_understand_something_then_you/"&gt;Lamport&lt;/a&gt;&lt;/p&gt;&lt;/blockquote&gt;&lt;p&gt;Bayesian methods have only recently become popular in the computer age because computers can quickly iterate through several tedious rounds of priors and posteriors. Bayesian methods have historically been popular inside of Microsoft Research (where TrueSkill was invented). Way &lt;a href="http://people.cs.ubc.ca/~murphyk/Bayes/la.times.html"&gt;back in 1996&lt;/a&gt;, Bill Gates considered Bayesian statistics to be Microsoft Research&amp;#8217;s secret sauce.&lt;/p&gt;&lt;p&gt;As we&amp;#8217;ll see later on, we can use the Bayesian approach to calculate a person&amp;#8217;s skill. In general, it&amp;#8217;s highly useful to update your belief based off previous evidence (e.g. your performance in previous games). This &lt;em&gt;usually&lt;/em&gt; works out well. However, sometimes &amp;#8220;&lt;a href="http://www.amazon.com/gp/product/1400063515?ie=UTF8&amp;amp;tag=moserware-20&amp;amp;linkCode=as2&amp;amp;camp=1789&amp;amp;creative=390957&amp;amp;creativeASIN=1400063515"&gt;Black Swans&lt;/a&gt;&amp;#8221; are present. For example, &lt;a title="In general, this is called the Problem of Inductive Knowledge and is discussed in the book." href="http://books.google.com/books?id=gWW4SkJjM08C&amp;amp;lpg=PR2&amp;amp;dq=black%20swan&amp;amp;pg=PA40#v=onepage&amp;amp;q=&amp;amp;f=false"&gt;a turkey&lt;/a&gt; using Bayesian inference would have a very specific posterior distribution of the kindness of a farmer who feeds it every day for 1000 days only to be surprised by a Thanksgiving event that was so many standard deviations away from the turkey&amp;#8217;s mean belief that he never would have saw it coming. Skill has similar potential for a &amp;#8220;Thanksgiving&amp;#8221; event where an average player beats the best player in the world. We&amp;#8217;ll acknowledge that small possibility, but ignore it to simplify things (and give the unlikely winner a great story for the rest of his life).&lt;/p&gt;&lt;p&gt;TrueSkill claims that it is Bayesian, so you can be sure that there is going to be a concept of a prior and a likelihood in it&amp;#8212; and there is. We&amp;#8217;re getting closer, but we still need to learn a few more details.&lt;/p&gt;&lt;h4&gt;The Marginalized, but Not Forgotten Distribution&lt;/h4&gt;&lt;p&gt;&lt;a title="'Running against the light' by clairity on Flickr. Used under the Creative Commons Attribution License" href="http://www.flickr.com/photos/clairity/145758101/"&gt;&lt;img style="border:0; margin: 0px 0px 0px 10px; width: 400px; display: inline; height: 300px" id="BLOGGER_PHOTO_ID_5435222701540710050" name="BLOGGER_PHOTO_ID_5435222701540710050" align="right" src="http://1.bp.blogspot.com/_Zfbv3mHcYrc/S23KQAB5FqI/AAAAAAAAKak/Ugc3ijWuvYI/s400/clarity_man_running_at_crosswalk.jpg" /&gt;&lt;/a&gt;Next we need to learn about &amp;#8220;&lt;a href="http://en.wikipedia.org/wiki/Marginal_distribution"&gt;marginal distributions&lt;/a&gt;&amp;#8221;, often just called &amp;#8220;marginals.&amp;#8221; Marginals are a way of distilling information to focus on what you care about. Imagine you have a table of sales for each month for the past year. Let&amp;#8217;s say that you only care about total sales for the year. You could take out your calculator and add up all the sales in each month to get the total aggregate sales for the year. Since you care about this number and it wasn&amp;#8217;t in the original report, you could add it in the &lt;em&gt;margin&lt;/em&gt; of the table. That&amp;#8217;s roughly where &amp;#8220;margin-al&amp;#8221; got its name.&lt;/p&gt;&lt;p&gt;Wikipedia has a great &lt;a title="This illustration came from the article on Marginal distribution that helped me finally get marginals" href="http://en.wikipedia.org/wiki/Marginal_distribution"&gt;illustration&lt;/a&gt; on the topic: consider a guy that ignores his mom&amp;#8217;s advice and &lt;em&gt;never&lt;/em&gt; looks both ways when crossing the street. Even worse, he&amp;#8217;s too engrossed in listening to his iPod that he doesn&amp;#8217;t look &lt;em&gt;any&lt;/em&gt; way, he just always crosses.&lt;/p&gt;&lt;p&gt;What&amp;#8217;s the probability of him getting hit by a car at a specific intersection? Let&amp;#8217;s simplify things by saying that it just depends on whether the light is red, yellow, or green.&lt;/p&gt;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Light State&lt;/td&gt;&lt;td&gt;Red&lt;/td&gt;&lt;td&gt;Yellow&lt;/td&gt;&lt;td&gt;Green&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Probability of getting hit given light state&lt;/td&gt;&lt;td&gt;1%&lt;/td&gt;&lt;td&gt;9%&lt;/td&gt;&lt;td&gt;90%&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;p&gt;This is helpful, but it doesn&amp;#8217;t tell us what we want. We also need to know how long the light stays a given color&lt;/p&gt;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Light color&lt;/td&gt;&lt;td&gt;Red&lt;/td&gt;&lt;td&gt;Yellow&lt;/td&gt;&lt;td&gt;Green&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;% Time in Color&lt;/td&gt;&lt;td&gt;60%&lt;/td&gt;&lt;td&gt;10%&lt;/td&gt;&lt;td&gt;30%&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;p&gt;There&amp;#8217;s a bunch of probability data here that&amp;#8217;s a bit overwhelming. If we join the probabilities together, we&amp;#8217;ll have a &amp;#8220;joint distribution&amp;#8221; that&amp;#8217;s just a big complicated system that tells us &lt;em&gt;too much&lt;/em&gt; information.&lt;/p&gt;&lt;p&gt;We can start to distill this information down by calculating the probability of getting hit given each light state:&lt;/p&gt;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt; &lt;/td&gt;&lt;td&gt;Red&lt;/td&gt;&lt;td&gt;Yellow&lt;/td&gt;&lt;td&gt;Green&lt;/td&gt;&lt;td&gt;Total&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Probability of Getting Hit&lt;/td&gt;&lt;td&gt;1%*60% = 0.6%&lt;/td&gt;&lt;td&gt;9%*10% = 0.9%&lt;/td&gt;&lt;td&gt;90%*30% = 27%&lt;/td&gt;&lt;td&gt;28.5%&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;p&gt;In the right &lt;em&gt;margin&lt;/em&gt; of the table we get the value that really matters to this guy. There&amp;#8217;s a 28.5% &lt;em&gt;marginal probability&lt;/em&gt; of getting hit if the guy never looks for cars and just always crosses the street. We obtained it by &amp;#8220;summing out&amp;#8221; the individual components. That is, we simplified the problem by eliminating variables and we eliminated variables by just focusing on the total rather than the parts.&lt;/p&gt;&lt;p&gt;This idea of marginalization is very general. The central question in this article is &amp;#8220;computing your skill,&amp;#8221; but your skill is complicated. When using Bayesian statistics, we often can&amp;#8217;t observe something directly, so we have to come up with a probability distribution that&amp;#8217;s more complicated and then &amp;#8220;marginalize&amp;#8221; it to get the distribution that we really want. We&amp;#8217;ll need to marginalize your skill by doing a similar &amp;#8220;summing-out&amp;#8221; procedure as we did for the reckless guy above.&lt;/p&gt;&lt;p&gt;But before we do that, we need to learn another technique to make calculations simpler.&lt;/p&gt;&lt;h4&gt;What&amp;#8217;s a Factor Graph, and Why Do I Care?&lt;/h4&gt;&lt;p&gt;Remember your algebra class when you worked with expressions like this?&lt;/p&gt;&lt;a href="http://3.bp.blogspot.com/_Zfbv3mHcYrc/S43UlXqqNeI/AAAAAAAAKf4/NCcMQ--IOcU/s1600-h/equation_not_factored.png"&gt;&lt;img style="border:0;" id="BLOGGER_PHOTO_ID_5444241263033988578" name="BLOGGER_PHOTO_ID_5444241263033988578" src="http://3.bp.blogspot.com/_Zfbv3mHcYrc/S43UlXqqNeI/AAAAAAAAKf4/NCcMQ--IOcU/s640/equation_not_factored.png" /&gt;&lt;/a&gt;&lt;p&gt;Your teacher showed you that you could simplify this by &amp;#8220;factor-ing&amp;#8221; out w, like this:&lt;/p&gt;&lt;a href="http://3.bp.blogspot.com/_Zfbv3mHcYrc/S4rSsD2a2kI/AAAAAAAAKds/i6ehQ1bdg_c/s1600-h/expression_factored.png"&gt;&lt;img style="border:0;" id="BLOGGER_PHOTO_ID_5443394754020301378" name="BLOGGER_PHOTO_ID_5443394754020301378" src="http://3.bp.blogspot.com/_Zfbv3mHcYrc/S4rSsD2a2kI/AAAAAAAAKds/i6ehQ1bdg_c/s576/expression_factored.png" /&gt;&lt;/a&gt;&lt;p&gt;We often factor expressions to make them easier to understand and to simplify calculations. Let&amp;#8217;s replace the variables above with w=4, x=1, y=2, and z=3.&lt;/p&gt;&lt;p&gt;Let&amp;#8217;s say the numbers on our calculator are circles and the operators are squares. We could come up with an &amp;#8220;&lt;a href="http://msdn.microsoft.com/en-us/library/bb397951.aspx"&gt;expression tree&lt;/a&gt;&amp;#8221; to describe the calculation like this:&lt;/p&gt;&lt;a href="http://2.bp.blogspot.com/_Zfbv3mHcYrc/S4rMBS94shI/AAAAAAAAKdU/qdxmo3QhFK0/s1600-h/factor_graph_complicated_factorization.png"&gt;&lt;img style="border:0;" id="BLOGGER_PHOTO_ID_5443387422274007570" name="BLOGGER_PHOTO_ID_5443387422274007570" src="http://2.bp.blogspot.com/_Zfbv3mHcYrc/S4rMBS94shI/AAAAAAAAKdU/qdxmo3QhFK0/s576/factor_graph_complicated_factorization.png" /&gt;&lt;/a&gt;&lt;p&gt;You can tell how tedious this computation is by counting 11 &amp;#8220;buttons&amp;#8221; we&amp;#8217;d have to push. We could also factor it like this&lt;/p&gt;&lt;a href="http://1.bp.blogspot.com/_Zfbv3mHcYrc/S4rQpZ8baSI/AAAAAAAAKdc/kacyqjdOm28/s1600-h/factor_graph_complicated_simplified.png"&gt;&lt;img style="border:0;" id="BLOGGER_PHOTO_ID_5443392509388220706" name="BLOGGER_PHOTO_ID_5443392509388220706" src="http://1.bp.blogspot.com/_Zfbv3mHcYrc/S4rQpZ8baSI/AAAAAAAAKdc/kacyqjdOm28/s576/factor_graph_complicated_simplified.png" /&gt;&lt;/a&gt;&lt;p&gt;This &amp;#8220;factorization&amp;#8221; has a total of 7 buttons, a savings of 4 buttons. It might not seem like much here, but factorizing is a big idea.&lt;/p&gt;&lt;p&gt;We face a similar problem of how to factor things when we&amp;#8217;re looking to simplify a complicated probability distribution. We&amp;#8217;ll soon see how your skill is composed of several &amp;#8220;factors&amp;#8221; in a joint distribution. We can simplify computations based on how variables are related to these factors. We&amp;#8217;ll break up the joint distribution into a bunch of factors on a graph. &lt;strong&gt;This graph that links factors and variables is called a &amp;#8220;factor graph.&amp;#8221;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;The key idea about a factor graph is that we represent the marginal conditional probabilities as variables and then represent each major function of those variables as a &amp;#8220;factor.&amp;#8221; We&amp;#8217;ll take advantage of how the graph &amp;#8220;factorizes&amp;#8221; and imagine that each factor is a node on a network that&amp;#8217;s optimized for efficiency. A key efficiency trick is that factor nodes send &amp;#8220;messages&amp;#8221; to other nodes. These messages help simplify further marginal computations. The &amp;#8220;message passing&amp;#8221; is very important and thus will be highlighted with arrows in the upcoming graphs; gray arrows represent messages going &amp;#8220;down&amp;#8221; the graph and black show messages coming &amp;#8220;up&amp;#8221; the graph.&lt;/p&gt;&lt;p&gt;The accompanying &lt;a href="http://github.com/moserware/Skills"&gt;code&lt;/a&gt; and &lt;a href="http://dl.dropbox.com/u/1083108/Moserware/Skill/The%20Math%20Behind%20TrueSkill.pdf"&gt;math paper&lt;/a&gt; go into details about exactly how this happens, but it&amp;#8217;s important to realize the high level idea first. That is, we want to look at all the factors that go into creating the likelihood function for updating a person&amp;#8217;s skill based on a game outcome. Representing this information in a factor graph helps us see how things are related.&lt;/p&gt;&lt;p&gt;Now we have all the foundational concepts that we&amp;#8217;re ready for the main event: the TrueSkill factor graph!&lt;/p&gt;&lt;h4&gt;Enough Chess, Let&amp;#8217;s Rank Something Harder!&lt;/h4&gt;&lt;p&gt;The TrueSkill algorithm is Bayesian because it&amp;#8217;s composed of a prior multiplied by a likelihood. I&amp;#8217;ve highlighted these two components in the sample factor graph from the TrueSkill paper that looks scary at first glance:&lt;/p&gt;&lt;a href="http://1.bp.blogspot.com/_Zfbv3mHcYrc/S5vdXDRz9UI/AAAAAAAAKiU/Y5oPcSl4eck/s1600-h/TrueSkillFullFactorgraph.png"&gt;&lt;img style="border:0;" id="BLOGGER_PHOTO_ID_5448191562321491266" name="BLOGGER_PHOTO_ID_5448191562321491266" src="http://1.bp.blogspot.com/_Zfbv3mHcYrc/S5vdXDRz9UI/AAAAAAAAKiU/Y5oPcSl4eck/s720/TrueSkillFullFactorgraph.png" /&gt;&lt;/a&gt;&lt;p&gt;This factor graph shows the outcome of a match that had 3 teams all playing against each other. The first team (on the left) only has one player, but this player was able to defeat both of the other teams. The second team (in the middle) had two players and this team tied the third team (on the right) that had just one player.&lt;/p&gt;&lt;p&gt;In TrueSkill, we just care about a player&amp;#8217;s marginal skill. However, as is often the case with Bayesian models, we have to explicitly model other things that impact the variable we care about. We&amp;#8217;ll briefly cover each factor (more details are in the &lt;a href="http://github.com/moserware/Skills"&gt;code&lt;/a&gt; and &lt;a href="http://dl.dropbox.com/u/1083108/Moserware/Skill/The%20Math%20Behind%20TrueSkill.pdf"&gt;math paper&lt;/a&gt;).&lt;/p&gt;&lt;h4&gt;Factor #1: What Do We Already Know About Your Skill?&lt;/h4&gt;&lt;a href="http://4.bp.blogspot.com/_Zfbv3mHcYrc/S4rh00sIxBI/AAAAAAAAKe0/dVIZsc_f6wk/s1600-h/Layer1_priors.png"&gt;&lt;img style="border:0;" id="BLOGGER_PHOTO_ID_5443411397243880466" name="BLOGGER_PHOTO_ID_5443411397243880466" src="http://4.bp.blogspot.com/_Zfbv3mHcYrc/S4rh00sIxBI/AAAAAAAAKe0/dVIZsc_f6wk/s576/Layer1_priors.png" /&gt;&lt;/a&gt;&lt;p&gt;The first factor starts the whole process. It&amp;#8217;s where we get a player&amp;#8217;s previous skill level from somewhere (e.g. a player database). At this point, we add some uncertainty to your skill&amp;#8217;s standard deviation to keep game dynamics interesting and prevent the standard deviation from hitting zero since the rest of algorithm will make it smaller (since the whole point is to learn about you and become more certain).&lt;/p&gt;&lt;p&gt;There is a factor and a variable for each player. Each factor is a function that remembers a player&amp;#8217;s previous skill. Each variable node holds the current value of a player&amp;#8217;s skill. I say &amp;#8220;current&amp;#8221; because this is the value that we&amp;#8217;ll want to know about after the whole algorithm is completed. Note that the message arrow on the factor only goes one way; we never go back to the prior factor. It just gets things going. However, we will come back to the variable.&lt;/p&gt;&lt;p&gt;But we&amp;#8217;re getting ahead of ourselves.&lt;/p&gt;&lt;h4&gt;Factor #2: How Are You Going To Perform?&lt;/h4&gt;&lt;a href="http://2.bp.blogspot.com/_Zfbv3mHcYrc/S4raUAX5XAI/AAAAAAAAKeM/VVg3AgoHFK8/s1600-h/Layer2_likelihood.png"&gt;&lt;img style="border:0;" id="BLOGGER_PHOTO_ID_5443403136863132674" name="BLOGGER_PHOTO_ID_5443403136863132674" src="http://2.bp.blogspot.com/_Zfbv3mHcYrc/S4raUAX5XAI/AAAAAAAAKeM/VVg3AgoHFK8/s576/Layer2_likelihood.png" /&gt;&lt;/a&gt;&lt;p&gt;Next, we add in beta (&amp;#946;). You can think of beta as the number of skill points to guarantee about an 80% chance of winning. The TrueSkill inventors &lt;a title="This occurred during a GameFest 2007 presentation. Although this talk gets cut short due to an audio problem, it's pretty good at giving an overview." href="http://www.microsoft.com/downloads/details.aspx?FamilyID=1acc9bf7-920d-477b-a7b1-4945b3cb04dd&amp;amp;DisplayLang=en"&gt;refer&lt;/a&gt; to beta as defining the length of a &amp;#8220;skill chain.&amp;#8221;&lt;/p&gt;&lt;p&gt;&lt;a title="The faceless people and chain in this picture came from the Open Clip Art project and are in the public domain. The idea for this image came from Ralf Herbrich's 2007 GameFest presentation that I linked to in the previous link." href="http://1.bp.blogspot.com/_Zfbv3mHcYrc/S5locWxUbTI/AAAAAAAAKiE/q0A0x8O_KSQ/s1600-h/BetaSkillChainIllustration.png"&gt;&lt;img style="border:0;" id="BLOGGER_PHOTO_ID_5447500060639391026" name="BLOGGER_PHOTO_ID_5447500060639391026" src="http://1.bp.blogspot.com/_Zfbv3mHcYrc/S5locWxUbTI/AAAAAAAAKiE/q0A0x8O_KSQ/s640/BetaSkillChainIllustration.png" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;The skill chain is composed of the worst player on the far left and the best player on the far right. Each subsequent person on the skill chain is &amp;#8220;beta&amp;#8221; points better and has an 80% win probability against the weaker player. This means that a small beta value indicates a high-skill game (e.g. &lt;a href="http://en.wikipedia.org/wiki/Go_%2528game%2529"&gt;Go&lt;/a&gt;) since smaller differences in points lead to the 80%:20% ratio. Likewise, a game based on chance (e.g. &lt;a href="http://en.wikipedia.org/wiki/Uno_%2528card_game%2529"&gt;Uno&lt;/a&gt;) is a low-skill game that would have a higher beta and smaller skill chain.&lt;/p&gt;&lt;p&gt;Factor #3: How is Your Team Going to Perform?&lt;/p&gt;&lt;a href="http://1.bp.blogspot.com/_Zfbv3mHcYrc/S4rcFykRwGI/AAAAAAAAKeU/leCuvBNE-lI/s1600-h/Layer3_team_sum.png"&gt;&lt;img style="border:0;" id="BLOGGER_PHOTO_ID_5443405091662053474" name="BLOGGER_PHOTO_ID_5443405091662053474" src="http://1.bp.blogspot.com/_Zfbv3mHcYrc/S4rcFykRwGI/AAAAAAAAKeU/leCuvBNE-lI/s576/Layer3_team_sum.png" /&gt;&lt;/a&gt;&lt;p&gt;Now we&amp;#8217;re ready for one of the most controversial aspects of TrueSkill: computing the performance of a team as a whole. In TrueSkill, we assume the team&amp;#8217;s performance is the sum of each team member&amp;#8217;s performance. I say that it&amp;#8217;s &amp;#8220;controversial&amp;#8221; because some members of the team probably work harder than others. Additionally, sometimes special dynamics occur that make the sum greater than the parts. However, we&amp;#8217;ll fight the urge to make it much more complicated and heed &lt;a title="See page 452, second column, item a" href="http://www.forecastingprinciples.com/files/pdf/Makridakia-The%20M3%20Competition.pdf"&gt;Makridakis&amp;#8217;s advice&lt;/a&gt;:&lt;/p&gt;&lt;blockquote&gt;&lt;p&gt;&amp;#8220;Statistically sophisticated or complex methods do not necessarily provide more accurate forecasts than simpler ones&amp;#8221;&lt;/p&gt;&lt;/blockquote&gt;&lt;p&gt;One cool thing about this factor is that you can weight each team member&amp;#8217;s contribution by the amount of time that they played. For example, if two players are on a team but each player only played half of the time (e.g. &lt;a href="http://en.wiktionary.org/wiki/tag_team"&gt;a tag team&lt;/a&gt;), then we would treat them differently than if these two players played the entire time. This is officially known as &amp;#8220;partial play.&amp;#8221; Xbox game titles report the percentage of time a player was active in a game under the &amp;#8220;X_PROPERTY_PLAYER_PARTIAL_PLAY_PERCENTAGE&amp;#8221; property that is recorded for each player (it defaults to 100%). This information is used by TrueSkill to perform a fairer update. I implemented this feature in the &lt;a href="http://github.com/moserware/Skills"&gt;accompanying source code&lt;/a&gt;.&lt;/p&gt;&lt;h4&gt;Factor #4: How&amp;#8217;d Your Team Compare?&lt;/h4&gt;&lt;p&gt;Next, we compare team performances in pairs. We do this by subtracting team performances to come up with pairwise differences:&lt;/p&gt;&lt;a href="http://3.bp.blogspot.com/_Zfbv3mHcYrc/S5venQ1MtsI/AAAAAAAAKic/LWYIxzYoKUo/s1600-h/Layer4_Team_Diff.png"&gt;&lt;img style="border:0;" id="BLOGGER_PHOTO_ID_5448192940349109954" name="BLOGGER_PHOTO_ID_5448192940349109954" src="http://3.bp.blogspot.com/_Zfbv3mHcYrc/S5venQ1MtsI/AAAAAAAAKic/LWYIxzYoKUo/s576/Layer4_Team_Diff.png" /&gt;&lt;/a&gt;&lt;p&gt;This is similar to what we did earlier with Elo and subtracting curves to get a new curve.&lt;/p&gt;&lt;h4&gt;Factor #5: How Should We Interpret the Team Differences?&lt;/h4&gt;&lt;p&gt;The bottom of the factor graph contains a comparison factor based on the team performance differences we just calculated:&lt;/p&gt;&lt;p&gt;&lt;a href="http://2.bp.blogspot.com/_Zfbv3mHcYrc/S5vVGmEepLI/AAAAAAAAKiM/Yt8B7bB7sBA/s1600-h/Layer5_Diff_Comparison.png"&gt;&lt;img style="border:0;" id="BLOGGER_PHOTO_ID_5448182483510011058" name="BLOGGER_PHOTO_ID_5448182483510011058" src="http://2.bp.blogspot.com/_Zfbv3mHcYrc/S5vVGmEepLI/AAAAAAAAKiM/Yt8B7bB7sBA/s400/Layer5_Diff_Comparison.png" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;The comparison depends on whether the pairwise difference was considered a &amp;#8220;win&amp;#8221; or a &amp;#8220;draw.&amp;#8221; Obviously, this depends on the rules of the game. It&amp;#8217;s important to realize that TrueSkill only cares about these two types of results. TrueSkill doesn&amp;#8217;t care if you won by a little or a lot, the only thing that matters is if you won. Additionally, in TrueSkill we imagine that there is a buffer of space called a &amp;#8220;draw margin&amp;#8221; where performances are equivalent. For example, in Olympic swimming, two swimmers can &amp;#8220;draw&amp;#8221; because their times are equivalent to 0.01 seconds even though the times differ by several thousandths of a second. In this case, the &amp;#8220;draw margin&amp;#8221; is relatively small around 0.005 seconds. Draws are very common in chess at the grandmaster level, so the draw margin would be much greater there.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;The output of the comparison factor directly relates to how much your skill&amp;#8217;s mean and standard deviation will change&lt;/strong&gt;.&lt;/p&gt;&lt;p&gt;The exact math involved in this factor &lt;a title="Ok, so it's quite complicated" href="http://research.microsoft.com/apps/pubs/default.aspx?id=74554"&gt;is complicated&lt;/a&gt;, but the core idea is simple:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Expected outcomes cause small updates because the algorithm already had a good guess of your skill.&lt;/li&gt;&lt;li&gt;Unexpected outcomes (upsets) cause larger updates to make the algorithm more likely to predict the outcome in the future.&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;The &lt;a href="http://dl.dropbox.com/u/1083108/Moserware/Skill/The%20Math%20Behind%20TrueSkill.pdf"&gt;accompanying math paper&lt;/a&gt; goes into detail, but conceptually you can think of the performance difference as a number on the bottom (x-axis) of a graph. It represents the difference between the expected winner and the expected loser. A large negative number indicates a big upset (e.g. an underdog won) and a large positive number means the expected person won. The exact update of your skill&amp;#8217;s mean will depend on the probability of a draw, but you can get a feel for it by looking at this graph:&lt;/p&gt;&lt;a href="http://1.bp.blogspot.com/_Zfbv3mHcYrc/S5v-xI1fggI/AAAAAAAAKik/DBq_48qmtzE/s1600-h/VWinFunctionWithDrawProbabilities.png"&gt;&lt;img style="border:0;" id="BLOGGER_PHOTO_ID_5448228294373638658" name="BLOGGER_PHOTO_ID_5448228294373638658" src="http://1.bp.blogspot.com/_Zfbv3mHcYrc/S5v-xI1fggI/AAAAAAAAKik/DBq_48qmtzE/s576/VWinFunctionWithDrawProbabilities.png" /&gt;&lt;/a&gt;&lt;p&gt;Similarly, the update to a skill&amp;#8217;s standard deviation (i.e. uncertainty) depends on how expected the outcome was. An expected outcome shrinks the uncertainty by a small amount (e.g. we already knew it was going to happen). Likewise, an unexpected outcome shrinks the standard deviation more because it was new information that we didn&amp;#8217;t already have:&lt;/p&gt;&lt;p&gt;&lt;a href="http://2.bp.blogspot.com/_Zfbv3mHcYrc/S5v_HtoWDdI/AAAAAAAAKis/kz1N8gQmRAQ/s1600-h/WWinFunctionWithDrawProbabilities.png"&gt;&lt;img style="border:0;" id="BLOGGER_PHOTO_ID_5448228682207727058" name="BLOGGER_PHOTO_ID_5448228682207727058" src="http://2.bp.blogspot.com/_Zfbv3mHcYrc/S5v_HtoWDdI/AAAAAAAAKis/kz1N8gQmRAQ/s576/WWinFunctionWithDrawProbabilities.png" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;One problem with this comparison factor is that we use some fancy math that just makes an approximation (a good approximation, but still an approximation). We&amp;#8217;ll refine the approximation in the next step.&lt;/p&gt;&lt;h4&gt;The Inner Schedule: Iterate, Iterate, Iterate!&lt;/h4&gt;&lt;p&gt;We can make a better approximation of the team difference factors by passing around the messages that keep getting updated in the following loop:&lt;/p&gt;&lt;a href="http://4.bp.blogspot.com/_Zfbv3mHcYrc/S4rfGRP2SvI/AAAAAAAAKes/M6g1XAbhOzw/s1600-h/Layer_Iterate_Inner.png"&gt;&lt;img style="border:0;" id="BLOGGER_PHOTO_ID_5443408398432750322" name="BLOGGER_PHOTO_ID_5443408398432750322" src="http://4.bp.blogspot.com/_Zfbv3mHcYrc/S4rfGRP2SvI/AAAAAAAAKes/M6g1XAbhOzw/s576/Layer_Iterate_Inner.png" /&gt;&lt;/a&gt;&lt;p&gt;After a few iterations of this loop, the changes will be less dramatic and we&amp;#8217;ll arrive at stable values for each marginal.&lt;/p&gt;&lt;h4&gt;Enough Already! Give Me My New Rating!&lt;/h4&gt;&lt;p&gt;Once the inner schedule has stabilized the values at the bottom of the factor graph, we can reverse the direction of each factor and propagate messages back up the graph. These reverse messages are represented by black arrows in the graph of each factor. &lt;strong&gt;Each player&amp;#8217;s new skill rating will be the value of player&amp;#8217;s skill marginal variable once messages have reached the top of the factor graph.&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;By default, we give everyone a &amp;#8220;full&amp;#8221; skill update which is the result of the above procedure. However, there are times when a game title might want to not make the match outcome count much because of less optimal playing conditions (e.g. there was a lot of network lag during the game). Games can do this with a &amp;#8220;partial update&amp;#8221; that is just a way to apply only a fraction of the full update. Game titles specify this via the X_PROPERTY_PLAYER_SKILL_UPDATE_WEIGHTING_FACTOR variable. I implemented this feature in the &lt;a href="http://github.com/moserware/Skills/blob/master/Skills/PartialPlay.cs"&gt;accompanying source code&lt;/a&gt; and describe it in the &lt;a href="http://dl.dropbox.com/u/1083108/Moserware/Skill/The%20Math%20Behind%20TrueSkill.pdf"&gt;math paper&lt;/a&gt;.&lt;/p&gt;&lt;h4&gt;Results&lt;/h4&gt;&lt;p&gt;There are some more details left, but we&amp;#8217;ll stop for now. The &lt;a href="http://dl.dropbox.com/u/1083108/Moserware/Skill/The%20Math%20Behind%20TrueSkill.pdf"&gt;accompanying math paper&lt;/a&gt; and &lt;a href="http://github.com/moserware/Skills"&gt;source code&lt;/a&gt; fill in most of the missing pieces. One of the best ways to learn the details is to implement TrueSkill yourself. Feel free to create a port of the &lt;a href="http://github.com/moserware/Skills"&gt;accompanying project&lt;/a&gt; in your favorite language and share it with the world. Writing your own implementation will help solidify all the concepts presented here.&lt;/p&gt;&lt;p&gt;The most rewarding part of implementing the TrueSkill algorithm is to see it work well in practice. My coworkers have commented on how it&amp;#8217;s almost &amp;#8220;eerily&amp;#8221; accurate at computing the right skill for everyone relatively quickly. After several months of playing foosball, the top of the leaderboard (sorted by TrueSkill: the mean minus 3 standard deviations) was very stable. Recently, a very good player started playing and is now the #2 player. Here&amp;#8217;s a graph of the most recent changes in TrueSkill for the top 5 (of around 40) foosball players:&lt;/p&gt;&lt;a href="http://3.bp.blogspot.com/_Zfbv3mHcYrc/S51C7AczIRI/AAAAAAAAKi0/8NcEXy98hrw/s1600-h/MostRecentFoosballTrueSkill.png"&gt;&lt;img style="border:0;" id="BLOGGER_PHOTO_ID_5448584705688674578" name="BLOGGER_PHOTO_ID_5448584705688674578" src="http://3.bp.blogspot.com/_Zfbv3mHcYrc/S51C7AczIRI/AAAAAAAAKi0/8NcEXy98hrw/s720/MostRecentFoosballTrueSkill.png" /&gt;&lt;/a&gt;&lt;p&gt;(Note: Look how quickly the system detected how good this new #2 player is even though his win ratio is right at 50%)&lt;/p&gt;&lt;p&gt;Another interesting aspect of implementing TrueSkill is that it has raised an awareness of ratings among players. People that otherwise wouldn&amp;#8217;t have played together now occasionally play each other because they know they&amp;#8217;re similarly matched and will have a good game. One advantage of TrueSkill is that it&amp;#8217;s not that big of a deal to lose to a much better player, so it&amp;#8217;s still ok to have unbalanced games. In addition, having ratings has been a good way to judge if you&amp;#8217;re improving in ability with a new shot technique in foosball or learning more chess theory.&lt;/p&gt;&lt;h4&gt;Fun Things from Here&lt;/h4&gt;&lt;p&gt;The obvious direction to go from here is to add more games to the system and see if TrueSkill handles them equally well. Given that TrueSkill is the default ranking system on Xbox live, this will probably work out well. Another direction is to see if there&amp;#8217;s a big difference in TrueSkill based on position in a team (e.g. midfield vs. goalie in foosball). Given TrueSkill&amp;#8217;s sound statistics based on ranking and matchmaking, you might even have some success in using it to decide between to several options. You could have each option be a &amp;#8220;player&amp;#8221; and decide each &amp;#8220;match&amp;#8221; based on your personal whims of the day. If nothing else, this would be an interesting way to pick your next vacation spot or even your child&amp;#8217;s name.&lt;/p&gt;&lt;p&gt;If you broaden the scope of your search to using the ideas that we&amp;#8217;ve learned along the way, there&amp;#8217;s a lot more applications. Microsoft&amp;#8217;s &lt;a href="http://videolectures.net/nipsworkshops09_graepel_pmlca/"&gt;AdPredictor&lt;/a&gt; (i.e. the part that delivers relevant ads on &lt;a href="http://www.bing.com/"&gt;Bing&lt;/a&gt;) was created by the TrueSkill team and uses similar math, but is a different application.&lt;/p&gt;&lt;p&gt;As for me, it was rewarding to work with an algorithm that has fun social applications as well as picking up machine learning tidbits along the way. It&amp;#8217;s too bad all of that didn&amp;#8217;t help me hit the top of any of the leaderboards.&lt;/p&gt;&lt;p&gt;Oh well, it&amp;#8217;s been a fun journey. I&amp;#8217;d love to hear if you dived into the algorithm after reading this and would especially appreciate any updates to &lt;a href="http://github.com/moserware/Skills"&gt;my code&lt;/a&gt; or other language forks.&lt;/p&gt;&lt;p&gt;Links:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://dl.dropbox.com/u/1083108/Moserware/Skill/The%20Math%20Behind%20TrueSkill.pdf"&gt;The Math Behind TrueSkill&lt;/a&gt; - A math-filled paper that fills in some of the details left out of this post.&lt;/li&gt;&lt;li&gt;&lt;a href="http://github.com/moserware/Skills"&gt;Moserware.Skills&lt;/a&gt; Project on GitHub - My full implementation of Elo and TrueSkill in C#. Please feel free to create your own language forks.&lt;/li&gt;&lt;li&gt;Microsoft's online &lt;a href="http://research.microsoft.com/en-us/projects/trueskill/calculators.aspx"&gt;TrueSkill Calculators&lt;/a&gt; - Allows you to play with the algorithm without having to download anything. My implementation matches the results of these calculators.&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;em&gt;Special thanks to &lt;a href="http://research.microsoft.com/en-us/people/rherb/"&gt;Ralf Herbrich&lt;/a&gt;, &lt;a href="http://research.microsoft.com/en-us/um/people/minka/"&gt;Tom Minka&lt;/a&gt;, and &lt;a href="http://research.microsoft.com/en-us/people/thoreg/"&gt;Thore Graepel&lt;/a&gt; on the &lt;a href="http://research.microsoft.com/en-us/projects/trueskill/"&gt;TrueSkill&lt;/a&gt; team at &lt;a href="http://research.microsoft.com/en-us/labs/cambridge/default.aspx"&gt;Microsoft Research Cambridge&lt;/a&gt; for their help in answering many of my detailed questions about their fascinating algorithm.&lt;/em&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6800934446457898793-793968235021421709?l=www.moserware.com' alt='' /&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/Moserware?a=zcZYX8VKjXI:qXcDZh1hAWE:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/Moserware?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/Moserware?a=zcZYX8VKjXI:qXcDZh1hAWE:63t7Ie-LG7Y"&gt;&lt;img src="http://feeds.feedburner.com/~ff/Moserware?d=63t7Ie-LG7Y" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/Moserware?a=zcZYX8VKjXI:qXcDZh1hAWE:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/Moserware?i=zcZYX8VKjXI:qXcDZh1hAWE:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/Moserware?a=zcZYX8VKjXI:qXcDZh1hAWE:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/Moserware?i=zcZYX8VKjXI:qXcDZh1hAWE:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/Moserware?a=zcZYX8VKjXI:qXcDZh1hAWE:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/Moserware?i=zcZYX8VKjXI:qXcDZh1hAWE:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/Moserware?a=zcZYX8VKjXI:qXcDZh1hAWE:4cEx4HpKnUU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/Moserware?i=zcZYX8VKjXI:qXcDZh1hAWE:4cEx4HpKnUU" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/Moserware/~4/zcZYX8VKjXI" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.moserware.com/feeds/793968235021421709/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=6800934446457898793&amp;postID=793968235021421709" title="59 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6800934446457898793/posts/default/793968235021421709?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6800934446457898793/posts/default/793968235021421709?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Moserware/~3/zcZYX8VKjXI/computing-your-skill.html" title="Computing Your Skill" /><author><name>Jeff Moser</name><uri>http://www.blogger.com/profile/16074905903060665396</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="08376966494433799517" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://3.bp.blogspot.com/_Zfbv3mHcYrc/S2Q_xffP38I/AAAAAAAAKYo/YcgBWcpjYtI/s72-c/100M_dash_Osaka07_D2A_Torri_Edwards.jpg" height="72" width="72" /><thr:total>59</thr:total><feedburner:origLink>http://www.moserware.com/2010/03/computing-your-skill.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DUAAQHY4fSp7ImA9WxBQEEg.&quot;"><id>tag:blogger.com,1999:blog-6800934446457898793.post-3391668541957239551</id><published>2009-09-22T08:12:00.013-04:00</published><updated>2010-01-09T12:22:21.835-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-01-09T12:22:21.835-05:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="aes" /><title>A Stick Figure Guide to the Advanced Encryption Standard (AES)</title><content type="html">&lt;p&gt;&lt;strong&gt;(A play in 4 acts. Please feel free to exit along with the stage character that best represents you. Take intermissions as you see fit. Click on the stage if you have a hard time seeing it. If you get bored, you can &lt;a href="http://github.com/moserware/AES-Illustrated"&gt;jump to the code&lt;/a&gt;. Most importantly, enjoy the show!)&lt;/strong&gt;&lt;/p&gt;&lt;h4&gt;Act 1: Once Upon a Time...&lt;/h4&gt;&lt;a href="http://1.bp.blogspot.com/_Zfbv3mHcYrc/SreSw8cwljI/AAAAAAAABh8/6T7C6TTD23k/s1600-h/aes_act_1_scene_01_intro_1100.png"&gt;&lt;img style="BORDER-BOTTOM: 3px solid; BORDER-LEFT: 3px solid; MARGIN: 5px; BORDER-TOP: 3px solid; BORDER-RIGHT: 3px solid" id="BLOGGER_PHOTO_ID_5383933249102845490" title="I handle petabytes of data every day. From encrypting juicy Top Secret intelligence to boring packets bound for your WiFi router, I do it all!" alt="intro" src="http://3.bp.blogspot.com/_Zfbv3mHcYrc/SreS30GKZdI/AAAAAAAABiE/mSpYbOwJdYI/s576/aes_act_1_scene_01_intro_576.png" width="576" height="452" /&gt;&lt;/a&gt;&lt;a href="http://1.bp.blogspot.com/_Zfbv3mHcYrc/SreXYmXZLaI/AAAAAAAABiU/9MDEFDxuy0c/s1600-h/aes_act_1_scene_02_sad_1100.png"&gt;&lt;img style="BORDER-BOTTOM: 2px solid; BORDER-LEFT: 2px solid; MARGIN: 5px; BORDER-TOP: 2px solid; BORDER-RIGHT: 2px solid" id="BLOGGER_PHOTO_ID_5383938328416038306" title="...and still no one seems to care about me or my story." alt="sad" src="http://3.bp.blogspot.com/_Zfbv3mHcYrc/SreXTuW_GRI/AAAAAAAABiM/G12QhPMZ-sA/s576/aes_act_1_scene_02_sad_576.png" width="576" height="451" /&gt;&lt;/a&gt;&lt;a href="http://1.bp.blogspot.com/_Zfbv3mHcYrc/SreaC72AzpI/AAAAAAAABic/HV22hMCw1Xk/s1600-h/aes_act_1_scene_03_cinderella_1100.png"&gt;&lt;img style="BORDER-BOTTOM: 3px solid; BORDER-LEFT: 3px solid; MARGIN: 5px; BORDER-TOP: 3px solid; BORDER-RIGHT: 3px solid;" id="BLOGGER_PHOTO_ID_5383941254759370386" title="I've got a better-than-Cinderella story as I made my way to become king of the block cipher world." alt="aes act 1 scene 03 cinderella" src="http://4.bp.blogspot.com/_Zfbv3mHcYrc/SreaGzm7SzI/AAAAAAAABik/y61pDCtEc14/s576/aes_act_1_scene_03_cinderella_576.png" width="576" height="451" /&gt;&lt;/a&gt;&lt;a href="http://4.bp.blogspot.com/_Zfbv3mHcYrc/SreaMsUYC-I/AAAAAAAABis/4mM-xbLIB4A/s1600-h/aes_act_1_scene_04_started_1100.png"&gt;&lt;img style="BORDER-BOTTOM: 3px solid; BORDER-LEFT: 3px solid; MARGIN: 5px; BORDER-TOP: 3px solid; BORDER-RIGHT: 3px solid;" id="BLOGGER_PHOTO_ID_5383941422390447074" title="Whoah! You're still there. You want to hear it? Well let's get started..." alt="aes act 1 scene 04 started" src="http://2.bp.blogspot.com/_Zfbv3mHcYrc/SreaP3IJd9I/AAAAAAAABi0/8KsDJBsVsHY/s576/aes_act_1_scene_04_started_576.png" width="576" height="452" /&gt;&lt;/a&gt;&lt;a href="http://1.bp.blogspot.com/_Zfbv3mHcYrc/SrebavzxZHI/AAAAAAAABi8/KJhKmQTtqi4/s1600-h/aes_act_1_scene_05_judge_1100.png"&gt;&lt;img style="BORDER-BOTTOM: 3px solid; BORDER-LEFT: 3px solid; MARGIN: 5px; BORDER-TOP: 3px solid; BORDER-RIGHT: 3px solid;" id="BLOGGER_PHOTO_ID_5383942763357234290" title="Once upon a time, there was no good way for people outside secret agencies to judge good crypto." alt="aes act 1 scene 05 judge" src="http://3.bp.blogspot.com/_Zfbv3mHcYrc/Srebd8FiQTI/AAAAAAAABjE/ko_6ZVc0VCE/s576/aes_act_1_scene_05_judge_576.png" width="576" height="451" /&gt;&lt;/a&gt;&lt;a href="http://2.bp.blogspot.com/_Zfbv3mHcYrc/Sreh0fsDjRI/AAAAAAAABjM/bNXFrxuBY8Y/s1600-h/aes_act_1_scene_06_nbs_decree_1100.png"&gt;&lt;img style="BORDER-BOTTOM: 3px solid; BORDER-LEFT: 3px solid; MARGIN: 5px; BORDER-TOP: 3px solid; BORDER-RIGHT: 3px solid;" id="BLOGGER_PHOTO_ID_5383949802776268050" title="A decree went throughout the land to find a good, secure, algorithm." alt="aes act 1 scene 06 nbs decree" src="http://2.bp.blogspot.com/_Zfbv3mHcYrc/Sreh3pxeGEI/AAAAAAAABjU/x9pSOij_v0g/s576/aes_act_1_scene_06_nbs_decree_576.png" width="576" height="451" /&gt;&lt;/a&gt;&lt;a href="http://4.bp.blogspot.com/_Zfbv3mHcYrc/SrektFJi7oI/AAAAAAAABjc/wp0BKrW50h0/s1600-h/aes_act_1_scene_07_lucifer_1100.png"&gt;&lt;img style="BORDER-BOTTOM: 3px solid; BORDER-LEFT: 3px solid; MARGIN: 5px; BORDER-TOP: 3px solid; BORDER-RIGHT: 3px solid;" id="BLOGGER_PHOTO_ID_5383952973928001154" title="One worth competitor named Lucifer came forward." alt="aes act 1 scene 07 lucifer" src="http://1.bp.blogspot.com/_Zfbv3mHcYrc/SrekwCKLfiI/AAAAAAAABjk/YkvZ6MJM8m4/s576/aes_act_1_scene_07_lucifer_576.png" width="576" height="451" /&gt;&lt;/a&gt;&lt;a href="http://3.bp.blogspot.com/_Zfbv3mHcYrc/SremXGo1_9I/AAAAAAAABjs/iaUL3R8V0AQ/s1600-h/aes_act_1_scene_08_anoint_des_1100.png"&gt;&lt;img style="BORDER-BOTTOM: 3px solid; BORDER-LEFT: 3px solid; MARGIN: 5px; BORDER-TOP: 3px solid; BORDER-RIGHT: 3px solid;" id="BLOGGER_PHOTO_ID_5383954795393843154" title="After being modified by the National Security Agency (NSA), he was anointed as the Data Encryption Standard (DES)." alt="aes act 1 scene 08 anoint des" src="http://1.bp.blogspot.com/_Zfbv3mHcYrc/Srema9SorhI/AAAAAAAABj0/iW5CoFAljm4/s576/aes_act_1_scene_08_anoint_des_576.png" width="576" height="451" /&gt;&lt;/a&gt;&lt;a href="http://3.bp.blogspot.com/_Zfbv3mHcYrc/SreoBBfhLJI/AAAAAAAABj8/bg2juCimsl0/s1600-h/aes_act_1_scene_09_des_ruled_1100.png"&gt;&lt;img style="BORDER-BOTTOM: 3px solid; BORDER-LEFT: 3px solid; MARGIN: 5px; BORDER-TOP: 3px solid; BORDER-RIGHT: 3px solid;" id="BLOGGER_PHOTO_ID_5383956615078685842" title="DES ruled in the land for over 20 years. Academics studied him intently. For the first time, there was something specific to look at. The modern field of cryptography was born." alt="aes act 1 scene 09 des ruled" src="http://1.bp.blogspot.com/_Zfbv3mHcYrc/SreoEVHylOI/AAAAAAAABkE/D3BlZJplBs0/s576/aes_act_1_scene_09_des_ruled_576.png" width="576" height="451" /&gt;&lt;/a&gt;&lt;a href="http://4.bp.blogspot.com/_Zfbv3mHcYrc/SreoJQaJCmI/AAAAAAAABkM/g3HmEDLRJws/s1600-h/aes_act_1_scene_10_des_defeated_1100.png"&gt;&lt;img style="BORDER-BOTTOM: 3px solid; BORDER-LEFT: 3px solid; MARGIN: 5px; BORDER-TOP: 3px solid; BORDER-RIGHT: 3px solid;" id="BLOGGER_PHOTO_ID_5383956756521618018" title="Over the years, many attackers challenged DES. He was defeated in several battles." alt="aes act 1 scene 10 des defeated" src="http://4.bp.blogspot.com/_Zfbv3mHcYrc/SreoosgwcwI/AAAAAAAABkk/OORabbgG05I/s576/aes_act_1_scene_10_des_defeated_576.png" width="576" height="451" /&gt;&lt;/a&gt;&lt;a href="http://1.bp.blogspot.com/_Zfbv3mHcYrc/SreojET_QBI/AAAAAAAABkc/knYwS6AsM04/s1600-h/aes_act_1_scene_11_triple_des_1100.png"&gt;&lt;img style="BORDER-BOTTOM: 3px solid; BORDER-LEFT: 3px solid; MARGIN: 5px; BORDER-TOP: 3px solid; BORDER-RIGHT: 3px solid;" id="BLOGGER_PHOTO_ID_5383957199951183890" title="The only way to stop the attacks was to use DES 3 times in a row to form Triple-DES. This worked, but it was awfully slow." alt="aes act 1 scene 11 triple des" src="http://4.bp.blogspot.com/_Zfbv3mHcYrc/SreoM07nHpI/AAAAAAAABkU/cmHIixESoNU/s576/aes_act_1_scene_11_triple_des_576.png" width="576" height="451" /&gt;&lt;/a&gt;&lt;a href="http://4.bp.blogspot.com/_Zfbv3mHcYrc/Sreqlu0gkOI/AAAAAAAABks/TFPgQMW2KJI/s1600-h/aes_act_1_scene_12_nist_decree_1100.png"&gt;&lt;img style="BORDER-BOTTOM: 3px solid; BORDER-LEFT: 3px solid; MARGIN: 5px; BORDER-TOP: 3px solid; BORDER-RIGHT: 3px solid;" id="BLOGGER_PHOTO_ID_5383959444744868066" title="Another decree went out..." alt="aes act 1 scene 12 nist decree" src="http://3.bp.blogspot.com/_Zfbv3mHcYrc/SreqpMKl22I/AAAAAAAABk0/JlrAPzZ-Fpk/s576/aes_act_1_scene_12_nist_decree_576.png" width="576" height="451" /&gt;&lt;/a&gt;&lt;a href="http://2.bp.blogspot.com/_Zfbv3mHcYrc/SreqryYxgTI/AAAAAAAABk8/gkd3ibNVQyc/s1600-h/aes_act_1_scene_13_rallied_1100.png"&gt;&lt;img style="BORDER-BOTTOM: 3px solid; BORDER-LEFT: 3px solid; MARGIN: 5px; BORDER-TOP: 3px solid; BORDER-RIGHT: 3px solid;" id="BLOGGER_PHOTO_ID_5383959548781494578" title="This call rallied the crypto wizards to develop something better." alt="aes act 1 scene 13 rallied" src="http://4.bp.blogspot.com/_Zfbv3mHcYrc/SreqvBB6jOI/AAAAAAAABlE/HoDrD09dNcE/s576/aes_act_1_scene_13_rallied_576.png" width="576" height="451" /&gt;&lt;/a&gt;&lt;a href="http://3.bp.blogspot.com/_Zfbv3mHcYrc/SrezP7Vek8I/AAAAAAAABlM/vY8BCz_xZ_M/s1600-h/aes_act_1_scene_14_rijndael_1100.png"&gt;&lt;img style="BORDER-BOTTOM: 3px solid; BORDER-LEFT: 3px solid; MARGIN: 5px; BORDER-TOP: 3px solid; BORDER-RIGHT: 3px solid;" id="BLOGGER_PHOTO_ID_5383968965751903170" title="My creators, Vincent Rijmen and Joan Daemen, were among these crypto wizards. They combined their last names to give me my birth name: Rijndael." alt="aes act 1 scene 14 rijndael" src="http://2.bp.blogspot.com/_Zfbv3mHcYrc/SrezSe1jN_I/AAAAAAAABlU/zmex1ObPq_0/s576/aes_act_1_scene_14_rijndael_576.png" width="576" height="450" /&gt;&lt;/a&gt;&lt;a href="http://1.bp.blogspot.com/_Zfbv3mHcYrc/SrezVYrKN3I/AAAAAAAABlc/QV7SKeqbjYw/s1600-h/aes_act_1_scene_15_vote_1100.png"&gt;&lt;img style="BORDER-BOTTOM: 3px solid; BORDER-LEFT: 3px solid; MARGIN: 5px; BORDER-TOP: 3px solid; BORDER-RIGHT: 3px solid;" id="BLOGGER_PHOTO_ID_5383969059526817650" title="Everyone got together to vote and..." alt="aes act 1 scene 15 vote" src="http://1.bp.blogspot.com/_Zfbv3mHcYrc/SrezYYaiEqI/AAAAAAAABlk/EnnaS0_dByk/s576/aes_act_1_scene_15_vote_576.png" width="576" height="451" /&gt;&lt;/a&gt;&lt;a href="http://2.bp.blogspot.com/_Zfbv3mHcYrc/SrezjnfyXnI/AAAAAAAABls/cq-87oH48Tg/s1600-h/aes_act_1_scene_16_won_1100.png"&gt;&lt;img style="BORDER-BOTTOM: 3px solid; BORDER-LEFT: 3px solid; MARGIN: 5px; BORDER-TOP: 3px solid; BORDER-RIGHT: 3px solid;" id="BLOGGER_PHOTO_ID_5383969304023817842" title="I won!!" alt="aes act 1 scene 16 won" src="http://2.bp.blogspot.com/_Zfbv3mHcYrc/SrezmZC_RaI/AAAAAAAABl0/eZom1yqlqyk/s576/aes_act_1_scene_16_won_576.png" width="576" height="451" /&gt;&lt;/a&gt;&lt;a href="http://2.bp.blogspot.com/_Zfbv3mHcYrc/SrezpTQzCZI/AAAAAAAABl8/vLXzCa29fbk/s1600-h/aes_act_1_scene_17_intel_1100.png"&gt;&lt;img style="BORDER-BOTTOM: 3px solid; BORDER-LEFT: 3px solid; MARGIN: 5px; BORDER-TOP: 3px solid; BORDER-RIGHT: 3px solid;" id="BLOGGER_PHOTO_ID_5383969401671453074" title="...and now I'm the new king of the crypto world. You can find me everywhere. Intel is even putting native instructions for me in their next chip to make me smokin' fast!" alt="aes act 1 scene 17 intel" src="http://3.bp.blogspot.com/_Zfbv3mHcYrc/SrezsnkniJI/AAAAAAAABmE/FiEq39lvg4A/s576/aes_act_1_scene_17_intel_576.png" width="576" height="451" /&gt;&lt;/a&gt;&lt;a href="http://4.bp.blogspot.com/_Zfbv3mHcYrc/SrezvgPsZPI/AAAAAAAABmM/Di0qeLpgzN0/s1600-h/aes_act_1_scene_18_crypto_question_1100.png"&gt;&lt;img style="BORDER-BOTTOM: 3px solid; BORDER-LEFT: 3px solid; MARGIN: 5px; BORDER-TOP: 3px solid; BORDER-RIGHT: 3px solid;" id="BLOGGER_PHOTO_ID_5383969508235699442" title="AES: Any questions? Audience guy: Nice story and all, but how does crypto work?" alt="aes act 1 scene 18 crypto question" src="http://3.bp.blogspot.com/_Zfbv3mHcYrc/Srezy1AWA4I/AAAAAAAABmU/7v0_FToHszM/s576/aes_act_1_scene_18_crypto_question_576.png" width="576" height="450" /&gt;&lt;/a&gt;&lt;h4&gt;Act 2: Crypto Basics&lt;/h4&gt;&lt;a href="http://4.bp.blogspot.com/_Zfbv3mHcYrc/Srez-RG1xYI/AAAAAAAABmc/5P3Sv4i4_-Y/s1600-h/aes_act_2_scene_01_three_big_ideas_1100.png"&gt;&lt;img style="BORDER-BOTTOM: 3px solid; BORDER-LEFT: 3px solid; MARGIN: 5px; BORDER-TOP: 3px solid; BORDER-RIGHT: 3px solid;" id="BLOGGER_PHOTO_ID_5383969761870071170" title="Great question! You only need to know 3 big ideas to understand crypto." alt="aes act 2 scene 01 three big ideas" src="http://4.bp.blogspot.com/_Zfbv3mHcYrc/Sre0BdetXbI/AAAAAAAABmk/4_E39WHoZsg/s576/aes_act_2_scene_01_three_big_ideas_576.png" width="576" height="450" /&gt;&lt;/a&gt;&lt;a href="http://2.bp.blogspot.com/_Zfbv3mHcYrc/Sre0EOHgkDI/AAAAAAAABms/zSZ1XbA1VsQ/s1600-h/aes_act_2_scene_02_confusion_1100.png"&gt;&lt;img style="BORDER-BOTTOM: 3px solid; BORDER-LEFT: 3px solid; MARGIN: 5px; BORDER-TOP: 3px solid; BORDER-RIGHT: 3px solid;" id="BLOGGER_PHOTO_ID_5383969864146784306" title="Big Idea #1: Confusion - It's a good idea to obscure the relationship between your real message and your encrypted message. An example of this confusion is the trusty ol' Caesar Cipher." alt="aes act 2 scene 02 confusion" src="http://1.bp.blogspot.com/_Zfbv3mHcYrc/Sre0HxR0naI/AAAAAAAABm0/UUFLdLSoG-4/s576/aes_act_2_scene_02_confusion_576.png" width="576" height="451" /&gt;&lt;/a&gt;&lt;a href="http://3.bp.blogspot.com/_Zfbv3mHcYrc/Sre0O-cq9bI/AAAAAAAABm8/A-LklM2NcaE/s1600-h/aes_act_2_scene_03_diffusion_1100.png"&gt;&lt;img style="BORDER-BOTTOM: 3px solid; BORDER-LEFT: 3px solid; MARGIN: 5px; BORDER-TOP: 3px solid; BORDER-RIGHT: 3px solid;" id="BLOGGER_PHOTO_ID_5383970048919139762" title="Big Idea #2: Diffusion - It's also a good idea to spread out the message. An example of this diffusion is a simple column transposition." alt="aes act 2 scene 03 diffusion" src="http://1.bp.blogspot.com/_Zfbv3mHcYrc/Sre0RCS7xmI/AAAAAAAABnE/Yc89z95EcUc/s576/aes_act_2_scene_03_diffusion_576.png" width="576" height="451" /&gt;&lt;/a&gt;&lt;a href="http://4.bp.blogspot.com/_Zfbv3mHcYrc/Sre0TwXbu3I/AAAAAAAABnM/aQaV1plxGLc/s1600-h/aes_act_2_scene_04_key_secrecy_1100.png"&gt;&lt;img style="BORDER-BOTTOM: 3px solid; BORDER-LEFT: 3px solid; MARGIN: 5px; BORDER-TOP: 3px solid; BORDER-RIGHT: 3px solid;" id="BLOGGER_PHOTO_ID_5383970131038419826" title="Big Idea #3: Secrecy Only in the Key - After thousands of years, we learned that it's a bad idea to assume that no one knows how your method works. Someone will eventually find that out." alt="aes act 2 scene 04 key secrecy" src="http://1.bp.blogspot.com/_Zfbv3mHcYrc/Sre0Wr9lsOI/AAAAAAAABnU/znXvOAQzq5s/s576/aes_act_2_scene_04_key_secrecy_576.png" width="576" height="451" /&gt;&lt;/a&gt;&lt;a href="http://1.bp.blogspot.com/_Zfbv3mHcYrc/Sre0d0HMFdI/AAAAAAAABnc/UruwdeuJ9dQ/s1600-h/aes_act_2_scene_05_aes_details_question_1100.png"&gt;&lt;img style="BORDER-BOTTOM: 3px solid; BORDER-LEFT: 3px solid; MARGIN: 5px; BORDER-TOP: 3px solid; BORDER-RIGHT: 3px solid;" id="BLOGGER_PHOTO_ID_5383970303842719186" title="AES: Does that answer your question? Some audience guy: That helps, but was too general. How do *you* work?" alt="aes act 2 scene 05 aes details question" src="http://1.bp.blogspot.com/_Zfbv3mHcYrc/Sre0glnhckI/AAAAAAAABnk/iwQQLLDCFGg/s576/aes_act_2_scene_05_aes_details_question_576.png" width="576" height="451" /&gt;&lt;/a&gt;&lt;h4&gt;Act 3: Details&lt;/h4&gt;&lt;a href="http://2.bp.blogspot.com/_Zfbv3mHcYrc/Sre5EW2PL9I/AAAAAAAABns/t0Ij3L_3_WE/s1600-h/aes_act_3_scene_01_sign_this_1100.png"&gt;&lt;img style="BORDER-BOTTOM: 3px solid; BORDER-LEFT: 3px solid; MARGIN: 5px; BORDER-TOP: 3px solid; BORDER-RIGHT: 3px solid;" id="BLOGGER_PHOTO_ID_5383975364048400338" title="AES: I'd be happy to tell you how I work, but you have to sign this first. Some audience guy: Uh... what's that?" alt="aes act 3 scene 01 sign this" src="http://3.bp.blogspot.com/_Zfbv3mHcYrc/Sre5G6jmPiI/AAAAAAAABn0/42lBdxsNIgQ/s576/aes_act_3_scene_01_sign_this_576.png" width="576" height="451" /&gt;&lt;/a&gt;&lt;a href="http://2.bp.blogspot.com/_Zfbv3mHcYrc/Sre5JqBKZyI/AAAAAAAABn8/Op-n-e0JVaA/s1600-h/aes_act_3_scene_02_agreement_1100.png"&gt;&lt;img style="BORDER-BOTTOM: 3px solid; BORDER-LEFT: 3px solid; MARGIN: 5px; BORDER-TOP: 3px solid; BORDER-RIGHT: 3px solid;" id="BLOGGER_PHOTO_ID_5383975455093843746" title="Foot-Shooting Prevention Agreement: I, (your name), promise that once I see how simple AES really is, I will *not* implement it in production code even though it would be really fun. This agreement shall be in effect until the undersigned creates a meaningful interpretive dance that compares and contrasts cache-based, timing, and other side channel attacks and their countermeasures. (Signature) (Date)" alt="aes act 3 scene 02 agreement" src="http://4.bp.blogspot.com/_Zfbv3mHcYrc/Sre5MXZdxnI/AAAAAAAABoE/KzWFtoYJbKU/s576/aes_act_3_scene_02_agreement_576.png" width="576" height="735" /&gt;&lt;/a&gt;&lt;a href="http://2.bp.blogspot.com/_Zfbv3mHcYrc/Sre5R1EZ6rI/AAAAAAAABoM/lCULPyge7s0/s1600-h/aes_act_3_scene_03_state_matrix_1100.png"&gt;&lt;img style="BORDER-BOTTOM: 3px solid; BORDER-LEFT: 3px solid; MARGIN: 5px; BORDER-TOP: 3px solid; BORDER-RIGHT: 3px solid;" id="BLOGGER_PHOTO_ID_5383975595499186866" title="I take your data and load it into this 4x4 square." alt="aes act 3 scene 03 state matrix" src="http://4.bp.blogspot.com/_Zfbv3mHcYrc/Sre5UDRyYjI/AAAAAAAABoU/80Y_v-1wtaE/s576/aes_act_3_scene_03_state_matrix_576.png" width="576" height="451" /&gt;&lt;/a&gt;&lt;a href="http://1.bp.blogspot.com/_Zfbv3mHcYrc/Sre5XUQitTI/AAAAAAAABoc/cHg1Js96QOM/s1600-h/aes_act_3_scene_04_initial_round_1100.png"&gt;&lt;img style="BORDER-BOTTOM: 3px solid; BORDER-LEFT: 3px solid; MARGIN: 5px; BORDER-TOP: 3px solid; BORDER-RIGHT: 3px solid;" id="BLOGGER_PHOTO_ID_5383975689770939698" title="The initial round has me xor each input byte with the corresponding byte of the first round key." alt="aes act 3 scene 04 initial round" src="http://2.bp.blogspot.com/_Zfbv3mHcYrc/Sre5bKfgxDI/AAAAAAAABok/L1y5soBDwzs/s576/aes_act_3_scene_04_initial_round_576.png" width="576" height="451" /&gt;&lt;/a&gt;&lt;a href="http://3.bp.blogspot.com/_Zfbv3mHcYrc/Sre-FxdOh9I/AAAAAAAABos/oJTOPzQJ3uY/s1600-h/aes_act_3_scene_05_xor_tribute_1100.png"&gt;&lt;img style="BORDER-BOTTOM: 3px solid; BORDER-LEFT: 3px solid; MARGIN: 5px; BORDER-TOP: 3px solid; BORDER-RIGHT: 3px solid;" id="BLOGGER_PHOTO_ID_5383980885929265106" title="A Tribute to XOR: There's a simple reason why I use xor to apply the key and in other spots: it's fast and cheap - a quick bit flipper. It uses minimal hardware and can be done in parallel since no pesky carry bits are needed." alt="aes act 3 scene 05 xor tribute" src="http://4.bp.blogspot.com/_Zfbv3mHcYrc/Sre-JbSxGnI/AAAAAAAABo0/ZA-urw9iKc4/s576/aes_act_3_scene_05_xor_tribute_576.png" width="576" height="451" /&gt;&lt;/a&gt;&lt;a href="http://4.bp.blogspot.com/_Zfbv3mHcYrc/Sre-OTUh6KI/AAAAAAAABo8/SCuODQhdNEk/s1600-h/aes_act_3_scene_06_key_expansion_part_1_1100.png"&gt;&lt;img style="BORDER-BOTTOM: 3px solid; BORDER-LEFT: 3px solid; MARGIN: 5px; BORDER-TOP: 3px solid; BORDER-RIGHT: 3px solid;" id="BLOGGER_PHOTO_ID_5383981032458545314" title="Key Expansion: Part 1 - I need lots of keys for use in later rounds. I derive all of them from the initial key using a simple mixing technique that's really fast. Despite its critics, it's good enough." alt="aes act 3 scene 06 key expansion part 1" src="http://3.bp.blogspot.com/_Zfbv3mHcYrc/Sre-Q4FGxMI/AAAAAAAABpE/0rzg2OB8130/s576/aes_act_3_scene_06_key_expansion_part_1_576.png" width="576" height="451" /&gt;&lt;/a&gt;&lt;a href="http://4.bp.blogspot.com/_Zfbv3mHcYrc/SrfCCTI1ZPI/AAAAAAAABpM/MG0cyNuft_Q/s1600-h/aes_act_3_scene_07_key_expansion_part_2a_1100.png"&gt;&lt;img style="BORDER-BOTTOM: 3px solid; BORDER-LEFT: 3px solid; MARGIN: 5px; BORDER-TOP: 3px solid; BORDER-RIGHT: 3px solid;" id="BLOGGER_PHOTO_ID_5383985224297571570" title="Key Expansion: Part 2a - 1. I take the last column of the previous round key and move the top byte to the bottom. 2. Next, I run each byte through a substitution box that will map it to something else." alt="aes act 3 scene 07 key expansion part 2a" src="http://2.bp.blogspot.com/_Zfbv3mHcYrc/SrfCEuX65LI/AAAAAAAABpU/c-e6crEOfdQ/s576/aes_act_3_scene_07_key_expansion_part_2a_576.png" width="576" height="451" /&gt;&lt;/a&gt;&lt;a href="http://4.bp.blogspot.com/_Zfbv3mHcYrc/SrfCHbNRXeI/AAAAAAAABpc/uCSy-XDw6eI/s1600-h/aes_act_3_scene_08_key_expansion_part_2b_1100.png"&gt;&lt;img style="BORDER-BOTTOM: 3px solid; BORDER-LEFT: 3px solid; MARGIN: 5px; BORDER-TOP: 3px solid; BORDER-RIGHT: 3px solid;" id="BLOGGER_PHOTO_ID_5383985312363011554" title="Key Expansion: Part 2b - 3. I then xor the column with a round constant that is different for each round. 4. Finally, I xor it with the first column of the previous round key." alt="aes act 3 scene 08 key expansion part 2b" src="http://1.bp.blogspot.com/_Zfbv3mHcYrc/SrfCJnH9RPI/AAAAAAAABpk/bXs6-41QZpg/s576/aes_act_3_scene_08_key_expansion_part_2b_576.png" width="576" height="451" /&gt;&lt;/a&gt;&lt;a href="http://1.bp.blogspot.com/_Zfbv3mHcYrc/SrfCOWZulEI/AAAAAAAABps/nE7uxkd35wE/s1600-h/aes_act_3_scene_09_key_expansion_part_3_1100.png"&gt;&lt;img style="BORDER-BOTTOM: 3px solid; BORDER-LEFT: 3px solid; MARGIN: 5px; BORDER-TOP: 3px solid; BORDER-RIGHT: 3px solid;" id="BLOGGER_PHOTO_ID_5383985431332164674" title="Key Expansion: Part 3 - The other columns are super-easy, I just xor the previous column with the same column of the previous round." alt="aes act 3 scene 09 key expansion part 3" src="http://1.bp.blogspot.com/_Zfbv3mHcYrc/SrfCRa-aFJI/AAAAAAAABp0/nrZUPp_oGUM/s576/aes_act_3_scene_09_key_expansion_part_3_576.png" width="576" height="451" /&gt;&lt;/a&gt;&lt;a href="http://2.bp.blogspot.com/_Zfbv3mHcYrc/SrfCanLmV2I/AAAAAAAABp8/-Md5ppw1lnw/s1600-h/aes_act_3_scene_10_intermediate_round_start_1100.png"&gt;&lt;img style="BORDER-BOTTOM: 3px solid; BORDER-LEFT: 3px solid; MARGIN: 5px; BORDER-TOP: 3px solid; BORDER-RIGHT: 3px solid;" id="BLOGGER_PHOTO_ID_5383985641994737506" title="Next, I start the intermediate rounds. A round is just a series of steps that I repeat several times. The number of repetitions depends on the size of the key." alt="aes act 3 scene 10 intermediate round start" src="http://3.bp.blogspot.com/_Zfbv3mHcYrc/SrfCcv-rksI/AAAAAAAABqE/HvKXl-YbTX4/s576/aes_act_3_scene_10_intermediate_round_start_576.png" width="576" height="451" /&gt;&lt;/a&gt;&lt;a href="http://2.bp.blogspot.com/_Zfbv3mHcYrc/SrfCftmCrvI/AAAAAAAABqM/67jfKKB5UIU/s1600-h/aes_act_3_scene_11_substitute_bytes_1100.png"&gt;&lt;img style="BORDER-BOTTOM: 3px solid; BORDER-LEFT: 3px solid; MARGIN: 5px; BORDER-TOP: 3px solid; BORDER-RIGHT: 3px solid;" id="BLOGGER_PHOTO_ID_5383985729615605490" title="Applying Confusion: Substitute Bytes - I use confusion (Big Idea #1) to obscure the relationship of each byte. I put each byte into a substitution box (sbox), which will map it to a different byte." alt="aes act 3 scene 11 substitute bytes" src="http://4.bp.blogspot.com/_Zfbv3mHcYrc/SrfCjTtVEEI/AAAAAAAABqU/xrEhBOiIyrk/s576/aes_act_3_scene_11_substitute_bytes_576.png" width="576" height="451" /&gt;&lt;/a&gt;&lt;a href="http://4.bp.blogspot.com/_Zfbv3mHcYrc/SrfCpcC15jI/AAAAAAAABqc/fWSo9eEKTSo/s1600-h/aes_act_3_scene_12_shift_rows_1100.png"&gt;&lt;img style="BORDER-BOTTOM: 3px solid; BORDER-LEFT: 3px solid; MARGIN: 5px; BORDER-TOP: 3px solid; BORDER-RIGHT: 3px solid;" id="BLOGGER_PHOTO_ID_5383985896703256114" title="Applying Diffusion: Part 1 (Shift Rows) - Next, I shift the rows to the left and then wrap them around the other side." alt="aes act 3 scene 12 shift rows" src="http://1.bp.blogspot.com/_Zfbv3mHcYrc/SrfCrikRPeI/AAAAAAAABqk/M9GTsaUYrPM/s576/aes_act_3_scene_12_shift_rows_576.png" width="576" height="451" /&gt;&lt;/a&gt;&lt;a href="http://4.bp.blogspot.com/_Zfbv3mHcYrc/SrfCucdB19I/AAAAAAAABqs/kDCFrHHwLXk/s1600-h/aes_act_3_scene_13_mix_columns_1100.png"&gt;&lt;img style="BORDER-BOTTOM: 3px solid; BORDER-LEFT: 3px solid; MARGIN: 5px; BORDER-TOP: 3px solid; BORDER-RIGHT: 3px solid;" id="BLOGGER_PHOTO_ID_5383985982712436690" title="Applying Diffusion: Part 2 (Mix Columns) - I take each column and mix up the bits in it." alt="aes act 3 scene 13 mix columns" src="http://2.bp.blogspot.com/_Zfbv3mHcYrc/SrfCx9bJnvI/AAAAAAAABq0/8fVV6pOJciI/s576/aes_act_3_scene_13_mix_columns_576.png" width="576" height="451" /&gt;&lt;/a&gt;&lt;a href="http://1.bp.blogspot.com/_Zfbv3mHcYrc/SrfC20zUn-I/AAAAAAAABq8/Z47NA5jOb5w/s1600-h/aes_act_3_scene_14_add_round_key_1100.png"&gt;&lt;img style="BORDER-BOTTOM: 3px solid; BORDER-LEFT: 3px solid; MARGIN: 5px; BORDER-TOP: 3px solid; BORDER-RIGHT: 3px solid;" id="BLOGGER_PHOTO_ID_5383986126687346658" title="Applying Key Secrecy: Add Round Key - At the end of each round, I apply the next round key with an xor." alt="aes act 3 scene 14 add round key" src="http://3.bp.blogspot.com/_Zfbv3mHcYrc/SrfC5M1RzOI/AAAAAAAABrE/J8GoUwxgTOM/s576/aes_act_3_scene_14_add_round_key_576.png" width="576" height="451" /&gt;&lt;/a&gt;&lt;a href="http://4.bp.blogspot.com/_Zfbv3mHcYrc/SrfC7ybrZcI/AAAAAAAABrM/KkNgTXnicHM/s1600-h/aes_act_3_scene_15_final_round_1100.png"&gt;&lt;img style="BORDER-BOTTOM: 3px solid; BORDER-LEFT: 3px solid; MARGIN: 5px; BORDER-TOP: 3px solid; BORDER-RIGHT: 3px solid;" id="BLOGGER_PHOTO_ID_5383986211950650818" title="In the final round, I skip the Mix Columns step since it wouldn't increase security and would just slow things down." alt="aes act 3 scene 15 final round" src="http://1.bp.blogspot.com/_Zfbv3mHcYrc/SrfC-0BETiI/AAAAAAAABrU/ZikFpise1gg/s576/aes_act_3_scene_15_final_round_576.png" width="576" height="450" /&gt;&lt;/a&gt;&lt;a href="http://4.bp.blogspot.com/_Zfbv3mHcYrc/SrfDC-OT0PI/AAAAAAAABrc/c5_Cp8qy2LA/s1600-h/aes_act_3_scene_16_more_rounds_the_merrier_1100.png"&gt;&lt;img style="BORDER-BOTTOM: 3px solid; BORDER-LEFT: 3px solid; MARGIN: 5px; BORDER-TOP: 3px solid; BORDER-RIGHT: 3px solid;" id="BLOGGER_PHOTO_ID_5383986335374889202" title="...and that's it. Each round I do makes the bits more confused and diffused. It also has the key impact them. The more rounds, the merrier!" alt="aes act 3 scene 16 more rounds the merrier" src="http://1.bp.blogspot.com/_Zfbv3mHcYrc/SrfDFIjncvI/AAAAAAAABrk/h2ddv2pLcqY/s576/aes_act_3_scene_16_more_rounds_the_merrier_576.png" width="576" height="451" /&gt;&lt;/a&gt;&lt;a href="http://2.bp.blogspot.com/_Zfbv3mHcYrc/SrfDIoT2nFI/AAAAAAAABrs/1ATJ5tFovMs/s1600-h/aes_act_3_scene_17_tradeoffs_1100.png"&gt;&lt;img style="BORDER-BOTTOM: 3px solid; BORDER-LEFT: 3px solid; MARGIN: 5px; BORDER-TOP: 3px solid; BORDER-RIGHT: 3px solid;" id="BLOGGER_PHOTO_ID_5383986432571776082" title="Determining the number of rounds always involves several tradeoffs." alt="aes act 3 scene 17 tradeoffs" src="http://3.bp.blogspot.com/_Zfbv3mHcYrc/SrfDLWMYKGI/AAAAAAAABr0/7FDu8_OK2-c/s576/aes_act_3_scene_17_tradeoffs_576.png" width="576" height="450" /&gt;&lt;/a&gt;&lt;a href="http://2.bp.blogspot.com/_Zfbv3mHcYrc/SrfDT1v99rI/AAAAAAAABr8/70P70ZSE4zc/s1600-h/aes_act_3_scene_18_security_margin_1100.png"&gt;&lt;img style="BORDER-BOTTOM: 3px solid; BORDER-LEFT: 3px solid; MARGIN: 5px; BORDER-TOP: 3px solid; BORDER-RIGHT: 3px solid;" id="BLOGGER_PHOTO_ID_5383986625157920434" title="When I was being developed, a clever guy was able to find a shortcut path through 6 rounds. That's not good! If you look carefully, you'll see that each bit of a round's output depends on every bit from two rounds ago. To increase this diffusion avalanche, I added 4 extra rounds. This is my security margin." alt="aes act 3 scene 18 security margin" src="http://1.bp.blogspot.com/_Zfbv3mHcYrc/SrfDWsNlCtI/AAAAAAAABsE/oi_3g-uiYMY/s576/aes_act_3_scene_18_security_margin_576.png" width="576" height="451" /&gt;&lt;/a&gt;&lt;a href="http://4.bp.blogspot.com/_Zfbv3mHcYrc/SrfDab99iPI/AAAAAAAABsM/X-Ve9W4DDwQ/s1600-h/aes_act_3_scene_19_in_pictures_1100.png"&gt;&lt;img style="BORDER-BOTTOM: 3px solid; BORDER-LEFT: 3px solid; MARGIN: 5px; BORDER-TOP: 3px solid; BORDER-RIGHT: 3px solid;" id="BLOGGER_PHOTO_ID_5383986738496375026" title="So in pictures, we have this..." alt="aes act 3 scene 19 in pictures" src="http://1.bp.blogspot.com/_Zfbv3mHcYrc/SrfDc-kkJQI/AAAAAAAABsU/lzHi4uWMayE/s576/aes_act_3_scene_19_in_pictures_576.png" width="576" height="451" /&gt;&lt;/a&gt;&lt;a href="http://3.bp.blogspot.com/_Zfbv3mHcYrc/SrfIvJzF0eI/AAAAAAAABsc/atByZ6jpEaE/s1600-h/aes_act_3_scene_20_decrypting_1100.png"&gt;&lt;img style="BORDER-BOTTOM: 3px solid; BORDER-LEFT: 3px solid; MARGIN: 5px; BORDER-TOP: 3px solid; BORDER-RIGHT: 3px solid;" id="BLOGGER_PHOTO_ID_5383992591954334178" title="Decrypting means doing everything in reverse." alt="aes act 3 scene 20 decrypting" src="http://3.bp.blogspot.com/_Zfbv3mHcYrc/SrfIxngPl_I/AAAAAAAABsk/WnNB9qjPGnU/s576/aes_act_3_scene_20_decrypting_576.png" width="576" height="451" /&gt;&lt;/a&gt;&lt;a href="http://4.bp.blogspot.com/_Zfbv3mHcYrc/SrfI0ckVcMI/AAAAAAAABss/wUh6hWmtNaU/s1600-h/aes_act_3_scene_21_modes_1100.png"&gt;&lt;img style="BORDER-BOTTOM: 3px solid; BORDER-LEFT: 3px solid; MARGIN: 5px; BORDER-TOP: 3px solid; BORDER-RIGHT: 3px solid;" id="BLOGGER_PHOTO_ID_5383992682892062914" title="One last tidbit: I shouldn't be used as-is, but rather as a building block to a decent mode." alt="aes act 3 scene 21 modes" src="http://3.bp.blogspot.com/_Zfbv3mHcYrc/SrfI216SVCI/AAAAAAAABs0/Hp2aSZZZykY/s576/aes_act_3_scene_21_modes_576.png" width="576" height="451" /&gt;&lt;/a&gt;&lt;a href="http://1.bp.blogspot.com/_Zfbv3mHcYrc/SrfI75-UmZI/AAAAAAAABs8/PdvB4lfYzy8/s1600-h/aes_act_3_scene_22_questions_what_really_happens_1100.png"&gt;&lt;img style="BORDER-BOTTOM: 3px solid; BORDER-LEFT: 3px solid; MARGIN: 5px; BORDER-TOP: 3px solid; BORDER-RIGHT: 3px solid;" id="BLOGGER_PHOTO_ID_5383992811044772242" title="AES: Make sense? Did that answer your question? Some audience guy: Almost... except you just waved your hands and used weird analogies. What really happens?" alt="aes act 3 scene 22 questions what really happens" src="http://3.bp.blogspot.com/_Zfbv3mHcYrc/SrfI-O25w4I/AAAAAAAABtE/8AutQXFozNE/s576/aes_act_3_scene_22_questions_what_really_happens_576.png" width="576" height="451" /&gt;&lt;/a&gt;&lt;a href="http://4.bp.blogspot.com/_Zfbv3mHcYrc/SrfJGGLGGhI/AAAAAAAABtM/keDeLk_NuGM/s1600-h/aes_act_3_scene_23_math_1100.png"&gt;&lt;img style="BORDER-BOTTOM: 3px solid; BORDER-LEFT: 3px solid; MARGIN: 5px; BORDER-TOP: 3px solid; BORDER-RIGHT: 3px solid;" id="BLOGGER_PHOTO_ID_5383992986118265362" title="AES: Another great question! It's not hard, but... it involves a little... math. Some audience guy: I'm game. Bring it on!!" alt="aes act 3 scene 23 math" src="http://2.bp.blogspot.com/_Zfbv3mHcYrc/SrfJIYZ3lgI/AAAAAAAABtU/4gUZSF9p7eI/s576/aes_act_3_scene_23_math_576.png" width="576" height="450" /&gt;&lt;/a&gt;&lt;h4&gt;Act 4: Math!&lt;/h4&gt;&lt;a href="http://3.bp.blogspot.com/_Zfbv3mHcYrc/SrgcTY6rAqI/AAAAAAAABtc/1JEpZVwJTiw/s1600-h/aes_act_4_scene_01_algebra_class_1100.png"&gt;&lt;img style="BORDER-BOTTOM: 3px solid; BORDER-LEFT: 3px solid; MARGIN: 5px; BORDER-TOP: 3px solid; BORDER-RIGHT: 3px solid;" id="BLOGGER_PHOTO_ID_5384084473953059490" title="Let's go back to your algebra class..." alt="aes act 4 scene 01 algebra class" src="http://3.bp.blogspot.com/_Zfbv3mHcYrc/SrgcWsoSgKI/AAAAAAAABtk/iOD9KYTgKRc/s576/aes_act_4_scene_01_algebra_class_576.png" width="576" height="451" /&gt;&lt;/a&gt;&lt;a href="http://1.bp.blogspot.com/_Zfbv3mHcYrc/SrgccKsiY2I/AAAAAAAABts/p4H9f5jeqow/s1600-h/aes_act_4_scene_02_reviewing_the_basics_1100.png"&gt;&lt;img style="BORDER-BOTTOM: 3px solid; BORDER-LEFT: 3px solid; MARGIN: 5px; BORDER-TOP: 3px solid; BORDER-RIGHT: 3px solid;" id="BLOGGER_PHOTO_ID_5384084624754500450" title="Reviewing the Basics" alt="aes act 4 scene 02 reviewing the basics" src="http://3.bp.blogspot.com/_Zfbv3mHcYrc/SrgcgJf8rSI/AAAAAAAABt0/5xOREZg9l68/s576/aes_act_4_scene_02_reviewing_the_basics_576.png" width="576" height="451" /&gt;&lt;/a&gt;&lt;a href="http://2.bp.blogspot.com/_Zfbv3mHcYrc/Srgcj5Vw2nI/AAAAAAAABt8/BOqxuAIqw-Q/s1600-h/aes_act_4_scene_03_algebra_coefficients_1100.png"&gt;&lt;img style="BORDER-BOTTOM: 3px solid; BORDER-LEFT: 3px solid; MARGIN: 5px; BORDER-TOP: 3px solid; BORDER-RIGHT: 3px solid;" id="BLOGGER_PHOTO_ID_5384084757534530162" title="We'll change things slightly. In the old way, coefficients could get as big as we wanted. In the new way, they can only be 0 or 1." alt="aes act 4 scene 03 algebra coefficients" src="http://3.bp.blogspot.com/_Zfbv3mHcYrc/SrgcotxyLaI/AAAAAAAABuE/6729JCg2ezY/s576/aes_act_4_scene_03_algebra_coefficients_576.png" width="576" height="451" /&gt;&lt;/a&gt;&lt;a href="http://4.bp.blogspot.com/_Zfbv3mHcYrc/Srr27IBbEZI/AAAAAAAABzc/YFjDaybzmiM/s1600-h/aes_act_4_scene_04_remember_multiplication_growth_1100.png"&gt;&lt;img style="BORDER-BOTTOM: 3px solid; BORDER-LEFT: 3px solid; MARGIN: 5px; BORDER-TOP: 3px solid; BORDER-RIGHT: 3px solid;" id="BLOGGER_PHOTO_ID_5384887800101015954" title="Remember how multiplication could make things grow fast?" alt="aes act 4 scene 04 remember multiplication growth" src="http://3.bp.blogspot.com/_Zfbv3mHcYrc/Srr3ASzlnlI/AAAAAAAABzk/SK6u8tyjLHY/s576/aes_act_4_scene_04_remember_multiplication_growth_576.png" width="576" height="451" /&gt;&lt;/a&gt;&lt;a href="http://4.bp.blogspot.com/_Zfbv3mHcYrc/Srgc85_-M9I/AAAAAAAABuc/wlnxNpLFa-0/s1600-h/aes_act_4_scene_05_cant_go_bigger_1100.png"&gt;&lt;img style="BORDER-BOTTOM: 3px solid; BORDER-LEFT: 3px solid; MARGIN: 5px; BORDER-TOP: 3px solid; BORDER-RIGHT: 3px solid;" id="BLOGGER_PHOTO_ID_5384085187208295378" title="With the new addition, things are simpler, but the x^13 is still too big. Let's make it so we can't go bigger than x^7. How can we do that?" alt="aes act 4 scene 05 cant go bigger" src="http://2.bp.blogspot.com/_Zfbv3mHcYrc/SrgdBUUugHI/AAAAAAAABuk/iGpyZ3_qjR8/s576/aes_act_4_scene_05_cant_go_bigger_576.png" width="576" height="451" /&gt;&lt;/a&gt;&lt;a href="http://4.bp.blogspot.com/_Zfbv3mHcYrc/Srr6j-lA9lI/AAAAAAAABz8/QnQdTjgMHAw/s1600-h/aes_act_4_scene_06_clock_math_1100.png"&gt;&lt;img style="BORDER-BOTTOM: 3px solid; BORDER-LEFT: 3px solid; MARGIN: 5px; BORDER-TOP: 3px solid; BORDER-RIGHT: 3px solid;" id="BLOGGER_PHOTO_ID_5384891800475465298" title="We use our friend, clock math, to do this. Just add things up and do long division. Keep a close watch on the remainder." alt="aes act 4 scene 06 clock math" src="http://3.bp.blogspot.com/_Zfbv3mHcYrc/Srr6oWjBrxI/AAAAAAAAB0E/cqPyUXLK7hE/s576/aes_act_4_scene_06_clock_math_576.png" width="576" height="451" /&gt;&lt;/a&gt;&lt;a href="http://3.bp.blogspot.com/_Zfbv3mHcYrc/SrgdO2S9ezI/AAAAAAAABu8/NTvJ6W3Ttyo/s1600-h/aes_act_4_scene_07_clock_math_polynomials_1100.png"&gt;&lt;img style="BORDER-BOTTOM: 3px solid; BORDER-LEFT: 3px solid; MARGIN: 5px; BORDER-TOP: 3px solid; BORDER-RIGHT: 3px solid;" id="BLOGGER_PHOTO_ID_5384085495451843378" title="We can do clock math with polynomials. Instead of dividing by 12, my creators told me to use m(x) = x^8 + x^4 + x^3 + x + 1. Let's say we wanted to multiply x * b(x) where b(x) has coefficients b7...b0" alt="aes act 4 scene 07 clock math polynomials" src="http://1.bp.blogspot.com/_Zfbv3mHcYrc/SrgdSOPue7I/AAAAAAAABvE/Knwpu8jMajw/s576/aes_act_4_scene_07_clock_math_polynomials_576.png" width="576" height="451" /&gt;&lt;/a&gt;&lt;a href="http://2.bp.blogspot.com/_Zfbv3mHcYrc/Srr5mPmhbvI/AAAAAAAABzs/qbYbdkjJEZU/s1600-h/aes_act_4_scene_08_divide_by_mx_1100.png"&gt;&lt;img style="BORDER-BOTTOM: 3px solid; BORDER-LEFT: 3px solid; MARGIN: 5px; BORDER-TOP: 3px solid; BORDER-RIGHT: 3px solid;" id="BLOGGER_PHOTO_ID_5384890739893300978" title="We divide it by m(x) = x^8 + x^4 + x^3 + x + 1 and take the remainder" alt="aes act 4 scene 08 divide by mx" src="http://4.bp.blogspot.com/_Zfbv3mHcYrc/Srr5rOC7dxI/AAAAAAAABz0/VU_wdtbUWuo/s576/aes_act_4_scene_08_divide_by_mx_576.png" width="576" height="451" /&gt;&lt;/a&gt;&lt;a href="http://1.bp.blogspot.com/_Zfbv3mHcYrc/Srg9gSf9D7I/AAAAAAAABys/l-v8dtaVbrY/s1600-h/aes_act_4_scene_09_logarithms_1100.png"&gt;&lt;img style="BORDER-BOTTOM: 3px solid; BORDER-LEFT: 3px solid; MARGIN: 5px; BORDER-TOP: 3px solid; BORDER-RIGHT: 3px solid;" id="BLOGGER_PHOTO_ID_5384120979452399538" title="Now we're ready for the hardest blast from the past: logarithms. After logarithms, everything else is cake! Logarithms let us turn multiplication into addition." alt="aes act 4 scene 09 logarithms" src="http://1.bp.blogspot.com/_Zfbv3mHcYrc/Srg9kguwKdI/AAAAAAAABy0/Zi2vui_6I9w/s576/aes_act_4_scene_09_logarithms_576.png" width="576" height="451" /&gt;&lt;/a&gt;&lt;a href="http://3.bp.blogspot.com/_Zfbv3mHcYrc/Srjob_UFyNI/AAAAAAAABzM/aZdfUe41BtI/s1600-h/aes_act_4_scene_10_using_logarithms_1100.png"&gt;&lt;img style="BORDER-BOTTOM: 3px solid; BORDER-LEFT: 3px solid; MARGIN: 5px; BORDER-TOP: 3px solid; BORDER-RIGHT: 3px solid;" id="BLOGGER_PHOTO_ID_5384308922071238866" title="We can use logarithms in our new world. Instead of using 10 as the base, we can use the simple polynomial of x + 1 and watch the magic unravel." alt="aes act 4 scene 10 using logarithms" src="http://4.bp.blogspot.com/_Zfbv3mHcYrc/SrjoeXzYo1I/AAAAAAAABzU/s1b4N1kMX1Q/s576/aes_act_4_scene_10_using_logarithms_576.png" width="576" height="451" /&gt;&lt;/a&gt;&lt;a href="http://4.bp.blogspot.com/_Zfbv3mHcYrc/SrghyNJha6I/AAAAAAAABv8/Q90wAUc_z5c/s1600-h/aes_act_4_scene_11_polynomial_as_byte_1100.png"&gt;&lt;img style="BORDER-BOTTOM: 3px solid; BORDER-LEFT: 3px solid; MARGIN: 5px; BORDER-TOP: 3px solid; BORDER-RIGHT: 3px solid;" id="BLOGGER_PHOTO_ID_5384090500928203682" title="Why bother with all of this math? Encryption deals with bits and bytes, right? Well, there's one last connection: a 7th degree polynomial can be represented in exactly 1 byte since the new way uses only 0 or 1 for coefficients." alt="aes act 4 scene 11 polynomial as byte" src="http://1.bp.blogspot.com/_Zfbv3mHcYrc/Srgh1u3gBdI/AAAAAAAABwE/fTzDj74ADcU/s576/aes_act_4_scene_11_polynomial_as_byte_576.png" width="576" height="450" /&gt;&lt;/a&gt;&lt;a href="http://4.bp.blogspot.com/_Zfbv3mHcYrc/Sr7EzhjhXeI/AAAAAAAAB1I/eecUCdvhhSI/s1600-h/aes_act_4_scene_12_byte_operations_1100.png"&gt;&lt;img style="BORDER-BOTTOM: 3px solid; BORDER-LEFT: 3px solid; MARGIN: 5px; BORDER-TOP: 3px solid; BORDER-RIGHT: 3px solid;" id="BLOGGER_PHOTO_ID_5385958593841421794" title="With bytes, polynomial addition becomes a simple xor. We can use our logarithm skills to make a table for speedy multiplication." alt="aes act 4 scene 12 byte operations" src="http://2.bp.blogspot.com/_Zfbv3mHcYrc/Sr7E4ccI_OI/AAAAAAAAB1Q/G5k6u-g6a8A/s576/aes_act_4_scene_12_byte_operations_576.png" width="576" height="451" /&gt;&lt;/a&gt;&lt;a href="http://2.bp.blogspot.com/_Zfbv3mHcYrc/SrgiAWNe7JI/AAAAAAAABwc/-gjCySVEVA4/s1600-h/aes_act_4_scene_13_byte_inverses_1100.png"&gt;&lt;img style="BORDER-BOTTOM: 3px solid; BORDER-LEFT: 3px solid; MARGIN: 5px; BORDER-TOP: 3px solid; BORDER-RIGHT: 3px solid;" id="BLOGGER_PHOTO_ID_5384090743878904978" title="Since we know how to multiply, we can find the inverse polynomial byte for each byte. This is the byte that will undo/invert the polynomial back to 1. There are only 255 of them, so we can use brute force to find them." alt="aes act 4 scene 13 byte inverses" src="http://2.bp.blogspot.com/_Zfbv3mHcYrc/SrgiDxfQ4bI/AAAAAAAABwk/o2AwweKVfcQ/s576/aes_act_4_scene_13_byte_inverses_576.png" width="576" height="451" /&gt;&lt;/a&gt;&lt;a href="http://3.bp.blogspot.com/_Zfbv3mHcYrc/SrgiIqvWd0I/AAAAAAAABws/QN3Bx_ArLLQ/s1600-h/aes_act_4_scene_14_sbox_math_1100.png"&gt;&lt;img style="BORDER-BOTTOM: 3px solid; BORDER-LEFT: 3px solid; MARGIN: 5px; BORDER-TOP: 3px solid; BORDER-RIGHT: 3px solid;" id="BLOGGER_PHOTO_ID_5384090886828619586" title="Now we can understand the mysterious s-box. It takes a byte 'a' and applies two functions. The first is 'g' which just finds the byte inverse. The second is 'f' which intentionally makes the math uglier to foil attackers." alt="aes act 4 scene 14 sbox math" src="http://2.bp.blogspot.com/_Zfbv3mHcYrc/SrgiMyVIM1I/AAAAAAAABw0/iPWlbSiLxPo/s576/aes_act_4_scene_14_sbox_math_576.png" width="576" height="451" /&gt;&lt;/a&gt;&lt;a href="http://1.bp.blogspot.com/_Zfbv3mHcYrc/SrgiT00Da5I/AAAAAAAABw8/la2sQrWATB0/s1600-h/aes_act_4_scene_15_round_constants_1100.png"&gt;&lt;img style="BORDER-BOTTOM: 3px solid; BORDER-LEFT: 3px solid; MARGIN: 5px; BORDER-TOP: 3px solid; BORDER-RIGHT: 3px solid;" id="BLOGGER_PHOTO_ID_5384091078511258514" title="We can also understand those crazy round constants in the key expansion. I get them by starting with 1 and then keep multiplying by 'x'" alt="aes act 4 scene 15 round constants" src="http://1.bp.blogspot.com/_Zfbv3mHcYrc/SrgiXTMpmDI/AAAAAAAABxE/cnbny2O6HtI/s576/aes_act_4_scene_15_round_constants_576.png" width="576" height="451" /&gt;&lt;/a&gt;&lt;a href="http://1.bp.blogspot.com/_Zfbv3mHcYrc/S0i6PslImYI/AAAAAAAAKRY/J_w8KGadDuc/s1600-h/aes_act_4_scene_16_mix_columns_math_1100.png"&gt;&lt;img style="BORDER-BOTTOM: 3px solid; BORDER-LEFT: 3px solid; MARGIN: 5px; BORDER-TOP: 3px solid; BORDER-RIGHT: 3px solid;" id="BLOGGER_PHOTO_ID_5424791135957824738" title="Mix Columns is the hardest. I treat each column as a polynomial. I then use our new multiply method to multiply it by a specially crafted polynomial and then take the remainder after dividing by x^4 + 1. This all simplifies to a matrix multiply." alt="aes act 4 scene 16 mix columns math" src="http://2.bp.blogspot.com/_Zfbv3mHcYrc/S0i6y990NOI/AAAAAAAAKRg/Efy-iyr1-z8/s576/aes_act_4_scene_16_mix_columns_math_576.png" width="576" height="451" /&gt;&lt;/a&gt;&lt;a href="http://1.bp.blogspot.com/_Zfbv3mHcYrc/Srr9Yi-qWbI/AAAAAAAAB0M/5L2fifTwybc/s1600-h/aes_act_4_scene_17_crib_sheet_1100.png"&gt;&lt;img style="BORDER-BOTTOM: 3px solid; BORDER-LEFT: 3px solid; MARGIN: 5px; BORDER-TOP: 3px solid; BORDER-RIGHT: 3px solid;" id="BLOGGER_PHOTO_ID_5384894902623164850" title="AES Crib Sheet (Handy for Memorizing)" alt="aes act 4 scene 17 crib sheet" src="http://1.bp.blogspot.com/_Zfbv3mHcYrc/Srr9dcoXz7I/AAAAAAAAB0U/CHSggep44Oc/s576/aes_act_4_scene_17_crib_sheet_576.png" width="576" height="451" /&gt;&lt;/a&gt;&lt;a href="http://2.bp.blogspot.com/_Zfbv3mHcYrc/SrgiwUzy5zI/AAAAAAAABxs/upfnKWL2G1A/s1600-h/aes_act_4_scene_18_got_it_now_1100.png"&gt;&lt;img style="BORDER-BOTTOM: 3px solid; BORDER-LEFT: 3px solid; MARGIN: 5px; BORDER-TOP: 3px solid; BORDER-RIGHT: 3px solid;" id="BLOGGER_PHOTO_ID_5384091568136447794" title="Only audience guy left: Whoa... I think I get it now. It's relatively simple once you grok the pieces. Thanks for explaining it. I gotta go now.  AES: My pleasure. Come back anytime!" alt="aes act 4 scene 18 got it now" src="http://3.bp.blogspot.com/_Zfbv3mHcYrc/SrgizsJeKKI/AAAAAAAABx0/PnlnLSEpE9E/s576/aes_act_4_scene_18_got_it_now_576.png" width="576" height="451" /&gt;&lt;/a&gt;&lt;a href="http://2.bp.blogspot.com/_Zfbv3mHcYrc/Srgi6WaipTI/AAAAAAAABx8/yRSwy8KKjgg/s1600-h/aes_act_4_scene_19_so_much_more_1100.png"&gt;&lt;img style="BORDER-BOTTOM: 3px solid; BORDER-LEFT: 3px solid; MARGIN: 5px; BORDER-TOP: 3px solid; BORDER-RIGHT: 3px solid;" id="BLOGGER_PHOTO_ID_5384091740366087474" title="But there's so much more to talk about: my resistance to linear and differential cryptanalysis, my Wide Trail Strategy, impractical related-key attacks, and... so much more... but no one is left." alt="aes act 4 scene 19 so much more" src="http://2.bp.blogspot.com/_Zfbv3mHcYrc/Srgi9cWSxRI/AAAAAAAAByE/ap2FHb5h8TA/s576/aes_act_4_scene_19_so_much_more_576.png" width="576" height="451" /&gt;&lt;/a&gt;&lt;a href="http://4.bp.blogspot.com/_Zfbv3mHcYrc/SrgjAYxgH7I/AAAAAAAAByM/bctl-zwRLAk/s1600-h/aes_act_4_scene_20_gotta_go_1100.png"&gt;&lt;img style="BORDER-BOTTOM: 3px solid; BORDER-LEFT: 3px solid; MARGIN: 5px; BORDER-TOP: 3px solid; BORDER-RIGHT: 3px solid;" id="BLOGGER_PHOTO_ID_5384091844078477234" title="Oh well... there's some boring router traffic that needs to be encrypted. Gotta go!" alt="aes act 4 scene 20 gotta go" src="http://3.bp.blogspot.com/_Zfbv3mHcYrc/SrgjDaCrY9I/AAAAAAAAByU/zkLp3PfMzfA/s576/aes_act_4_scene_20_gotta_go_576.png" width="576" height="451" /&gt;&lt;/a&gt;&lt;a href="http://2.bp.blogspot.com/_Zfbv3mHcYrc/SrgjGKa_LWI/AAAAAAAAByc/ZdzGbF9CeLk/s1600-h/aes_act_4_scene_21_the_end_1100.png"&gt;&lt;img style="BORDER-BOTTOM: 3px solid; BORDER-LEFT: 3px solid; MARGIN: 5px; BORDER-TOP: 3px solid; BORDER-RIGHT: 3px solid;" id="BLOGGER_PHOTO_ID_5384091943305162082" title="The End" alt="aes act 4 scene 21 the end" src="http://2.bp.blogspot.com/_Zfbv3mHcYrc/SrgjIoZVOWI/AAAAAAAAByk/X6EhgucPxkk/s576/aes_act_4_scene_21_the_end_576.png" width="576" height="450" /&gt;&lt;/a&gt;&lt;h4&gt;Epilogue&lt;/h4&gt;&lt;p&gt;I created a heavily-commented AES/Rijndael implementation to go along with this post and &lt;a href="http://github.com/moserware/AES-Illustrated"&gt;put it on GitHub&lt;/a&gt;. In keeping with the Foot-Shooting Prevention Agreement, it shouldn't be used for production code, but it should be helpful in seeing exactly where all the numbers came from in this play. Several resources were useful in creating this: &lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://www.amazon.com/gp/product/3540425802?ie=UTF8&amp;amp;tag=moserware-20&amp;amp;linkCode=as2&amp;amp;camp=1789&amp;amp;creative=390957&amp;amp;creativeASIN=3540425802"&gt;&lt;img align="right" src="http://ecx.images-amazon.com/images/I/41pByNMNOqL._SL160_.jpg" style="MARGIN: 3px;"/&gt;The Design of Rijndael&lt;/a&gt; is &lt;em&gt;the&lt;/em&gt; book on the subject, written by the Rijndael creators. It was helpful in understanding specifics, especially the math (although some parts were beyond me). It's also where I got the math notation and graphical representation in the left and right corners of the scenes describing the layers (&lt;a href="http://en.wikipedia.org/wiki/Advanced_Encryption_Standard#The_SubBytes_step"&gt;SubBytes&lt;/a&gt;, &lt;a href="http://en.wikipedia.org/wiki/Advanced_Encryption_Standard#The_ShiftRows_step"&gt;ShiftRows&lt;/a&gt;, &lt;a href="http://en.wikipedia.org/wiki/Advanced_Encryption_Standard#The_MixColumns_step"&gt;MixColumns&lt;/a&gt;, and &lt;a href="http://en.wikipedia.org/wiki/Advanced_Encryption_Standard#The_AddRoundKey_step"&gt;AddRoundKey&lt;/a&gt;).&lt;/li&gt;&lt;li&gt;The &lt;a href="http://www.csrc.nist.gov/publications/fips/fips197/fips-197.pdf"&gt;FIPS-197&lt;/a&gt; specification formally defines AES and provides a good overview.&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.amazon.com/gp/product/0140067485?ie=UTF8&amp;amp;tag=moserware-20&amp;amp;linkCode=as2&amp;amp;camp=1789&amp;amp;creative=390957&amp;amp;creativeASIN=0140067485"&gt;The Puzzle Palace&lt;/a&gt;, especially &lt;a href="http://cryptome.org/nsa-v-all.htm"&gt;chapter 9&lt;/a&gt;, was helpful while creating Act 1. For more on how the NSA modified DES, see &lt;a href="http://catless.ncl.ac.uk/Risks/6.01.html#subj4"&gt;this&lt;/a&gt;. &lt;/li&gt;&lt;li&gt;More on Intel's (and now AMD) inclusion of native AES instructions can be found &lt;a href="http://en.wikipedia.org/wiki/AES_instruction_set"&gt;here&lt;/a&gt; and in detail &lt;a href="http://software.intel.com/en-us/articles/advanced-encryption-standard-aes-instructions-set/"&gt;here&lt;/a&gt;. &lt;/li&gt;&lt;li&gt;Other helpful resources include &lt;a href="http://en.wikipedia.org/wiki/Advanced_Encryption_Standard"&gt;Wikipedia&lt;/a&gt;, &lt;a href="http://www.samiam.org/rijndael.html"&gt;Sam Trenholme's AES math series&lt;/a&gt;, and &lt;a href="http://www.cs.bc.edu/~straubin/cs381-05/blockciphers/rijndael_ingles2004.swf"&gt;this animation&lt;/a&gt;. &lt;/li&gt;&lt;/ul&gt;&lt;p&gt;Please leave a comment if you notice something that can be better explained.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Update #1&lt;/strong&gt;: Several scenes were updated to fix some errors mentioned in the comments.&lt;br/&gt;&lt;strong&gt;Update #2&lt;/strong&gt;: By request, I've created a slide show presentation of this play in both &lt;a href="http://dl.getdropbox.com/u/1083108/Moserware/AES/A%20Stick%20Figure%20Guide%20to%20the%20Advanced%20Encryption%20Standard%20%28AES%29.pptx"&gt;PowerPoint&lt;/a&gt; and &lt;a href="http://dl.getdropbox.com/u/1083108/Moserware/AES/A%20Stick%20Figure%20Guide%20to%20the%20Advanced%20Encryption%20Standard%20%28AES%29.pdf"&gt;PDF&lt;/a&gt; formats. I've licensed them under the &lt;a href="http://creativecommons.org/licenses/by/3.0/"&gt;Creative Commons Attribution License&lt;/a&gt; so that you can use them as you see fit. If you're teaching a class, consider giving extra credit to any student giving a worthy interpretive dance rendition in accordance with the Foot-Shooting Prevention Agreement.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6800934446457898793-3391668541957239551?l=www.moserware.com' alt='' /&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/Moserware?a=4_66Ce3xvmU:kJTWhvXY31s:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/Moserware?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/Moserware?a=4_66Ce3xvmU:kJTWhvXY31s:63t7Ie-LG7Y"&gt;&lt;img src="http://feeds.feedburner.com/~ff/Moserware?d=63t7Ie-LG7Y" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/Moserware?a=4_66Ce3xvmU:kJTWhvXY31s:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/Moserware?i=4_66Ce3xvmU:kJTWhvXY31s:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/Moserware?a=4_66Ce3xvmU:kJTWhvXY31s:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/Moserware?i=4_66Ce3xvmU:kJTWhvXY31s:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/Moserware?a=4_66Ce3xvmU:kJTWhvXY31s:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/Moserware?i=4_66Ce3xvmU:kJTWhvXY31s:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/Moserware?a=4_66Ce3xvmU:kJTWhvXY31s:4cEx4HpKnUU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/Moserware?i=4_66Ce3xvmU:kJTWhvXY31s:4cEx4HpKnUU" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/Moserware/~4/4_66Ce3xvmU" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.moserware.com/feeds/3391668541957239551/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=6800934446457898793&amp;postID=3391668541957239551" title="195 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6800934446457898793/posts/default/3391668541957239551?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6800934446457898793/posts/default/3391668541957239551?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Moserware/~3/4_66Ce3xvmU/stick-figure-guide-to-advanced.html" title="A Stick Figure Guide to the Advanced Encryption Standard (AES)" /><author><name>Jeff Moser</name><uri>http://www.blogger.com/profile/16074905903060665396</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="08376966494433799517" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://3.bp.blogspot.com/_Zfbv3mHcYrc/SreS30GKZdI/AAAAAAAABiE/mSpYbOwJdYI/s72-c/aes_act_1_scene_01_intro_576.png" height="72" width="72" /><thr:total>195</thr:total><feedburner:origLink>http://www.moserware.com/2009/09/stick-figure-guide-to-advanced.html</feedburner:origLink></entry><entry gd:etag="W/&quot;Ck8NSHw7cCp7ImA9WxJbEU4.&quot;"><id>tag:blogger.com,1999:blog-6800934446457898793.post-3330061764648564469</id><published>2009-07-20T08:00:00.003-04:00</published><updated>2009-07-20T19:01:39.208-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-07-20T19:01:39.208-04:00</app:edited><title>Just Enough MBA to Be a Programmer</title><content type="html">&lt;p&gt;There's that awkward moment in your software development life when you realize that most of the people in your company &lt;i&gt;aren't&lt;/i&gt; programmers. Scanning your address book reveals Marketing, Sales, Accounting, Human Resources, and yes, the "business people" with their Masters of Business Administration (MBAs).&lt;/p&gt;&lt;p&gt;&lt;a href="http://www.amazon.com/gp/product/0060799072?ie=UTF8&amp;amp;tag=moserware-20&amp;amp;linkCode=as2&amp;amp;camp=1789&amp;amp;creative=390957&amp;amp;creativeASIN=0060799072"&gt;&lt;img style="margin: 0px 0px 0px 10px;" src="http://ecx.images-amazon.com/images/I/51SXTGSSDDL._SL160_.jpg" align="right" /&gt;&lt;/a&gt;I've always been curious about what MBAs really do. In my weaker moments, I've even thought that the only reason people got an MBA was to demand a higher salary or to "move up the corporate ladder" into some management job. What did these MBA ninjas actually learn in school? Would having an MBA help me better understand how I affected my company's bottom line? Although I had the curiosity, I never acted on it. This changed when &lt;a title="Chad Fowler" href="http://chadfowler.com/"&gt;another programmer&lt;/a&gt; &lt;a title="see page 53 of The Passionate Programmer" href="http://www.amazon.com/gp/product/1934356344?ie=UTF8&amp;amp;tag=moserware-20&amp;amp;linkCode=as2&amp;amp;camp=1789&amp;amp;creative=390957&amp;amp;creativeASIN=1934356344"&gt;recommended&lt;/a&gt; that I read &lt;a title="The Ten-Day MBA" href="http://www.amazon.com/gp/product/0060799072?ie=UTF8&amp;amp;tag=moserware-20&amp;amp;linkCode=as2&amp;amp;camp=1789&amp;amp;creative=390957&amp;amp;creativeASIN=0060799072"&gt;The Ten-Day MBA&lt;/a&gt; by &lt;a href="http://www.harpercollins.com/authors/18530/Steven_A_Silbiger/index.aspx"&gt;Steven Silbiger&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;Sure, I knew that no one would anoint me with a real MBA at the end of the book any more than watching &lt;a id="n.bd" title="MIT's Open Courseware" href="http://ocw.mit.edu/OcwWeb/web/home/home/index.htm"&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;MIT&lt;/span&gt;&lt;/a&gt; lectures online would make me an MIT grad. Besides, going to a &lt;a title="... like the Harvard Business School" href="http://www.hbs.edu/mba/"&gt;nice&lt;/a&gt; &lt;a title="or Wharton" href="http://www.wharton.upenn.edu/mba/"&gt;MBA&lt;/a&gt; &lt;a title="... or Stanford" href="http://www.gsb.stanford.edu/mba/"&gt;school&lt;/a&gt; is more about being around other motivated people and professors. The real value in having an MBA is in applying the concepts, not the concepts themselves. &lt;/p&gt;&lt;p&gt;Disclaimers aside, I was determined to read the book and take notes on what a programmer should know about an MBA.&lt;/p&gt;&lt;h4&gt;Day 1 - Marketing&lt;/h4&gt;&lt;p&gt;Every developer painfully learns that technology doesn't win on its own. At best, it just &lt;span style="color: rgb(128, 0, 128);"&gt;&lt;a title="Fast forward to 2:50 to hear Seth talk about this" href="http://video.google.com/videoplay?docid=-6909078385965257294"&gt;gives you a shot at marketing&lt;/a&gt;&lt;/span&gt;. Marketing is proof that software doesn't sell itself, &lt;a title="Good programmers don't need no marketing by Alain Raynaud" href="http://blog.fairsoftware.net/2009/07/09/good-programmers-dont-need-no-marketing/"&gt;no matter how good it is&lt;/a&gt;. &lt;/p&gt;&lt;p&gt;A software company might have a &lt;a href="http://www.birds-eye.net/definition/m/mrd-market_requirements_document.shtml"&gt;Marketing Requirements Document&lt;/a&gt; (MRD) that outlines what the next version will contain. This usually is the result of a standard marketing analysis that the book outlined: &lt;/p&gt;&lt;ol&gt;&lt;li&gt;Consumer Analysis - Who are they? What do they want? How many different segments of people do you have? Is the buyer of your product different than the user? (The book gives the example that women buy the majority of men's socks and underwear, thus it's good to market appropriately).&lt;/li&gt;&lt;li&gt;Market Analysis - How big is your target market? Is it new? Is it growing? Where is the product in the life cycle?&lt;/li&gt;&lt;li&gt;Competitive Analysis - How do your &lt;a href="http://en.wikipedia.org/wiki/SWOT_analysis"&gt;Strengths, Weaknesses, Opportunities, and Threats&lt;/a&gt; (SWOTs) compare to your competition? &lt;/li&gt;&lt;li&gt;Distribution Analysis - What "channels" does your company use to reach your customer? Who are the intermediate players (e.g. the Apple Store, Amazon.com, etc)? What cuts do they take? What are their motivations?&lt;/li&gt;&lt;li&gt;Plan the Marketing Mix - How will you differentiate your products? How will you place it, promote it, and price it?&lt;/li&gt;&lt;li&gt;Determine the Economics - How long will it take before you break even? What are your fixed costs vs. margin costs? (Thankfully software has a low marginal cost)&lt;/li&gt;&lt;li&gt;Revise - Tweak and repeat as needed. &lt;/li&gt;&lt;/ol&gt;&lt;p&gt;One big marketing theme is to "own a word in the consumer's mind":&lt;/p&gt;&lt;blockquote id="s3hx"&gt;If you establish one benefit in the consumer's mind, the consumer may attribute other positives as well to your product. FedEx means "overnight delivery." Only one company can own a word and it is tough to change it once it's established... The easiest way to own a word is to be first. Consumers tend to stick with products that work for them. Kleenex cleans runny noses. p.26&lt;/blockquote&gt;&lt;p&gt;This explains why your family still uses &lt;a id="yvuv" title="MapQuest" href="http://www.mapquest.com/"&gt;MapQuest&lt;/a&gt; despite your repeated attempts to show them how much better &lt;a id="zkkz" title="Google Maps" href="http://maps.google.com/"&gt;Google Maps&lt;/a&gt; is. It's also helpful if your product name matches what it does. "&lt;a href="http://www.drano.com/"&gt;Drano&lt;/a&gt;" is easier to remember than a "Web 2.0" name like &lt;a href="http://www.qoop.com/"&gt;Qoop&lt;/a&gt;. &lt;/p&gt;&lt;p&gt;I was surprised to learn that the popular online advertising term &lt;a href="http://en.wikipedia.org/wiki/Cost_per_impression"&gt;Cost per Thousand&lt;/a&gt; (CPM), is a relatively old term that has long existed in print media. In general, the more targeted a group is, the higher the CPM is. This explains why a programming ad on &lt;a href="http://stackoverflow.com/"&gt;Stack Overflow&lt;/a&gt; can probably fetch a better CPM than the same ad on a site like &lt;a href="http://www.pandora.com/"&gt;Pandora&lt;/a&gt;, even though programmers use both. &lt;/p&gt;&lt;p&gt;Marketing people typically have their reasons for doing things that frustrate us. For example, if your software will take a long time to get through a distribution channel or marketing foresees a long customer buying process, they might begin to "market" your code long before a beta is available with the belief that it'll hopefully be read by the time the customer is ready to buy.&lt;/p&gt;&lt;p&gt;Sometimes marketing has to make an extreme choice. When GTE faced rebuilding its tarnished brand in the 1990's, it was probably a clever marketing person who suggested that they &lt;a id="s4-7" title="gave up on fixing their brand" href="http://blip.tv/file/319044/"&gt;give up on fixing their brand name&lt;/a&gt; and re-brand themselves as &lt;a href="http://en.wikipedia.org/wiki/Verizon_Communications"&gt;Verizon&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;Despite all the good advice, I was disappointed by the book's lack of coverage of the Apple/BMW style of "marketing" &lt;a title="Watch at 20:27" href="http://video.google.com/videoplay?docid=-6909078385965257294&amp;amp;ei=P5NiSvPbFIb2qAL9jLS-DA&amp;amp;q=seth+godin"&gt;the engineering department can do&lt;/a&gt; by creating a remarkable product. Creating a product that allows users to quickly jump over the "&lt;a href="http://headrush.typepad.com/creating_passionate_users/2006/03/how_to_be_an_ex.html"&gt;suck threshold&lt;/a&gt;" is just one example where a programmer can make a tremendous "marketing" contribution.&lt;/p&gt;&lt;h4&gt;Day 2 - Ethics&lt;/h4&gt;&lt;p&gt;Ethics seems easy to understand: "&lt;a id="i7rk" title="Do to others as you would have them do to you" href="http://www.biblegateway.com/passage/?search=Luke%206:31"&gt;Do to others as you would have them do to you&lt;/a&gt;." The hard part is realizing how the "others" are affected by your actions. Others include customers, executives, shareholders, suppliers, employees (and their families), the government, the planet, and the "future generations." &lt;/p&gt;&lt;p&gt;Unfortunately, when simplicity is lost, &lt;a id="d4a3" title="Sarbanes-Oxley Act" href="http://en.wikipedia.org/wiki/Sarbanes-Oxley_Act"&gt;Sarbanes-Oxley Act&lt;/a&gt;s are found.&lt;/p&gt;&lt;h4&gt;Day 3 - Accounting&lt;/h4&gt;&lt;p&gt;In theory, accounting is simple. Just answer these questions about your &lt;a id="d3fl" title="entity" href="http://www.answers.com/topic/accounting-entity"&gt;entity&lt;/a&gt;/business: &lt;/p&gt;&lt;blockquote id="tdpx"&gt;&lt;ul&gt;&lt;li&gt;What does a company own? &lt;/li&gt;&lt;li&gt;How much does a company owe others? &lt;/li&gt;&lt;li&gt;How well did a company's operations perform? &lt;/li&gt;&lt;li&gt;How does the company get the cash to fund itself? - p.72 &lt;/li&gt;&lt;/ul&gt;&lt;/blockquote&gt;&lt;p&gt;If you get nothing else out of accounting, know how to read a balance sheet. Although Microsoft CEO &lt;a id="cnhl" title="Steve Ballmer" href="http://en.wikipedia.org/wiki/Steve_Ballmer"&gt;Steve Ballmer&lt;/a&gt; dropped out of Stanford's MBA program to become employee #24, he &lt;a id="pk2-" title="The quote begins around 10:50" href="http://ecorner.stanford.edu/authorMaterialInfo.html?mid=2242"&gt;knew balance sheets were important&lt;/a&gt;:&lt;/p&gt;&lt;blockquote id="v580"&gt;In 1980, I came in to "be a business person" whatever that meant. Didn't know much. Frankly all I'd ever really done is interview for jobs and market brownie mix. I wasn't exactly well credentialed. I'd taken the first year at Stanford Business School so &lt;i&gt;I can read a balance sheet -- that was pretty important&lt;/i&gt;. We didn't have that much money back then so there wasn't much to read. But anyway those lessons were important.&lt;/blockquote&gt;&lt;p&gt;Balance sheets are simple to follow:&lt;/p&gt;&lt;blockquote id="kkr6"&gt;As the name implies, the balance sheet is a "balance" sheet. The fundamental equation that rules over accounting balance is:&lt;br /&gt;&lt;p&gt;Assets (A) = Liabilities (L) + Owners' Equity (OE) &lt;/p&gt;&lt;p&gt;What you own (assets) equals the total of what you borrowed (liabilities) and what you have invested (equity) to pay for it. This equation or "identity" explains &lt;i&gt;everything&lt;/i&gt; that happens in the accounting records of a company over time. Remember it! - p.83&lt;/p&gt;&lt;/blockquote&gt;&lt;p&gt;For example, your work computer is a company asset (which explains the "asset" tag on it). Your company created an equal liability to pay for it. When your company started, the founders gave up some of their money to increase the new company's cash assets (left side) in exchange for stock in the company (right side). &lt;/p&gt;&lt;p&gt;For example, we can read &lt;a href="http://www.google.com/finance?q=NASDAQ:GOOG&amp;amp;fstype=ii"&gt;Google's balance sheet&lt;/a&gt; for the first quarter of 2009 and see:&lt;/p&gt;&lt;p&gt;Assets = $33.51 Billion&lt;br /&gt;Liabilities = $3.66 Billion&lt;br /&gt;Owner Equity = $29.85 Billion (which includes $14.98 Billion in "retained earnings" that Google is keeping for growth rather than giving it back to the owners of its 315.75 million shares)&lt;/p&gt;&lt;p&gt;Sure enough, everything "balances":&lt;/p&gt;&lt;div style="text-align: left;" id="ptq0"&gt;&lt;a href="http://2.bp.blogspot.com/_Zfbv3mHcYrc/SmKJ_BwtVCI/AAAAAAAABfU/BAq3TOcY2UI/s1600-h/GoogleBalances.png"&gt;&lt;img src="http://2.bp.blogspot.com/_Zfbv3mHcYrc/SmKJ_BwtVCI/AAAAAAAABfU/BAq3TOcY2UI/s400/GoogleBalances.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;p&gt;From basic data, we can derive a bunch of helpful ratios to see how healthy Google is: &lt;/p&gt;&lt;ol&gt;&lt;li&gt;Liquidity/Current Ratio = (Current Assets / Current Liabilities) = 33.51 / 3.66 = 9.14 (Greater than 1 means there's room to pay for liabilities)&lt;/li&gt;&lt;li&gt;Financial Leverage = (Total Liabilities + Owners' Equity) / OE = (3.66 + 29.85) / 29.85 = 1.12 (Greater than 2 indicates a company is using a lot of debt to operate)&lt;/li&gt;&lt;li&gt;&lt;a id="ufzr" title="Return on Equity" href="http://en.wikipedia.org/wiki/Return_on_equity"&gt;Return on Equity&lt;/a&gt; = (Net Income / Owners' Equity) = 1.42 / 29.85 = 4.77% (Which indicates how efficiently the company is using shareholder equity)&lt;/li&gt;&lt;li&gt;... and &lt;a id="wcrh" title="many more" href="http://www.reuters.com/finance/stocks/ratios?symbol=GOOG.O&amp;amp;rpc=66"&gt;many more&lt;/a&gt; ...&lt;/li&gt;&lt;/ol&gt;&lt;h4&gt;Day 4 - Organizational Behavior&lt;/h4&gt;&lt;p&gt;The whole purpose of Organizational Behavior (OB) is to get you to think before you act around people. You want to motivate people? OB has an equation for that: &lt;/p&gt;&lt;blockquote id="v8oz"&gt;Motivation = Expectation of Work will lead to Performance * Expectation Performance will lead to Reward * Value of Reward. &lt;/blockquote&gt;&lt;p&gt;Feel free to tweak the variables as you see fit. You can &lt;a href="http://en.wikipedia.org/wiki/Management_by_objectives"&gt;Manage by Objective&lt;/a&gt; (MBO) where you set goals and then get out of the way or you can &lt;a href="http://www.futurecents.com/mainmbwa.htm"&gt;Manage by Walking Around&lt;/a&gt; (MBWA) where you play a more active role in day-to-day execution. The best choice depends on your environment and culture. You might need to mix the two. Remember that we humans are delicate creatures with our own wants and desires. Be careful.&lt;/p&gt;&lt;h4&gt;Day 5 - Quantitative Analysis&lt;/h4&gt;&lt;p&gt;Quantitative Analysis (QA) explains why Excel has so many functions that I'd never heard of. A core idea is that "a dollar today is worth more than a dollar received in the future." (p.173). &lt;/p&gt;&lt;p&gt;Imagine that someone promises to pay you a dollar in a year if you give them money now. What is that worth to you today? Obviously, it matters on how much you trust them to pay you back. The more you trust them, the more you're willing to give them now. Similarly, the less you trust them, the more you might "discount" that dollar in the future because they're tying up money that could be used for better investments. This is called the "discount" or "hurdle" rate. Having a 10% discount rate means that the dollar in the future has a &lt;a href="http://en.wikipedia.org/wiki/Net_present_value"&gt;net present value&lt;/a&gt; of $0.91 today: &lt;/p&gt;&lt;blockquote id="zlcz"&gt;$1 * (1 + 10%)&lt;sup&gt;-1&lt;/sup&gt; = $0.91&lt;/blockquote&gt;&lt;p&gt;This simple idea has lots of consequences. For example, let's oversimplify things and say that you can spend $2,000 today to buy and maintain a server that will last for 3 years or you can lock in a price with Amazon for that same server for $800 a year for the same 3 years. A naïve person would just see that $2000 is less than $2400, but a QA person that assigns a 10% discount rate would see:&lt;/p&gt;&lt;p&gt;&lt;a href="http://1.bp.blogspot.com/_Zfbv3mHcYrc/SmKMldPXhhI/AAAAAAAABfc/P2aBR0G4E2M/s1600-h/AmazonServerCost.png"&gt;&lt;img src="http://1.bp.blogspot.com/_Zfbv3mHcYrc/SmKMldPXhhI/AAAAAAAABfc/P2aBR0G4E2M/s400/AmazonServerCost.png" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;... and come to the conclusion that it's about $10 cheaper, &lt;i&gt;in today's dollars&lt;/i&gt;, to have Amazon maintain the server.&lt;/p&gt;&lt;p&gt;You can also do the inverse calculation. Assume you're Amazon and that server costs you $1800 today and you can get someone to pay you $800 a year for it for 3 years. What is your &lt;a href="http://en.wikipedia.org/wiki/Internal_rate_of_return"&gt;internal rate of return&lt;/a&gt; for this investment?&lt;/p&gt;&lt;p&gt;&lt;a href="http://4.bp.blogspot.com/_Zfbv3mHcYrc/SmKNk33IACI/AAAAAAAABfk/19rEcxVvJC4/s1600-h/IRR.png"&gt;&lt;img src="http://4.bp.blogspot.com/_Zfbv3mHcYrc/SmKNk33IACI/AAAAAAAABfk/19rEcxVvJC4/s400/IRR.png" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;Here we see an internal rate of return of about 16% on the server.&lt;/p&gt;&lt;p&gt;We could also use the time value of money to include valuing users. Early adopters of eBay and Twitter were worth more per user than late adopters because the early ones were more likely to tell their friends who hadn't used the service and thus attract more new people. &lt;/p&gt;&lt;h4&gt;Day 6 - Finance&lt;/h4&gt;&lt;p&gt;&lt;a id="ex0m" title="Finance" href="http://en.wikipedia.org/wiki/Finance"&gt;Finance&lt;/a&gt; blends time, money, and risk. &lt;/p&gt;&lt;p&gt;To start, a business needs a structure that gives it some capital. Popular options include:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;a id="pk97" title="Sole Proprietorships" href="http://en.wikipedia.org/wiki/Sole_proprietorship"&gt;Sole Proprietorships&lt;/a&gt; - An individual or a married couple. You are effectively your business. All earnings are treated as personal income and taxed appropriately. You take in all the profits but also have unlimited liability. You can't divide the company up. It's simple, but the downside is that it makes it hard to raise money. &lt;/li&gt;&lt;li&gt;&lt;a id="urnx" title="Partnerships" href="http://en.wikipedia.org/wiki/Partnership"&gt;Partnerships&lt;/a&gt; - Involves more people than a proprietorship. Several people come together and can be &lt;a id="xt93" title="general partners" href="http://en.wikipedia.org/wiki/General_partnership"&gt;general partners&lt;/a&gt; (each having unlimited liability) or &lt;a id="sjm:" title="limited partners" href="http://en.wikipedia.org/wiki/Limited_partnership"&gt;limited partners&lt;/a&gt; (liable up to the investment). As a partner, you pay taxes on your percentage of the business's income on your personal taxes. &lt;/li&gt;&lt;li&gt;&lt;a id="yztz" title="Corporations" href="http://en.wikipedia.org/wiki/Corporation"&gt;Corporations&lt;/a&gt; - Effectively you give birth to a new legal entity that is distinct from the &lt;a id="xyzn" title="shareholders" href="http://en.wikipedia.org/wiki/Shareholder"&gt;shareholders&lt;/a&gt;. Most large companies are "&lt;a id="r1xw" title="C Corporations" href="http://en.wikipedia.org/wiki/C_Corporation"&gt;C Corporations&lt;/a&gt;" and have a &lt;a id="lifg" title="double taxation" href="http://en.wikipedia.org/wiki/Double_taxation"&gt;double taxation&lt;/a&gt; issue where the corporation's income &lt;a id="i78p" title="is taxed" href="http://en.wikipedia.org/wiki/Corporate_tax"&gt;is taxed&lt;/a&gt; and the dividends it issues to shareholders &lt;a id="rxpn" title="are taxed" href="http://en.wikipedia.org/wiki/Dividend_tax"&gt;are taxed&lt;/a&gt; as well. If you have a smaller company with fewer than 100 shareholders, you may qualify for "&lt;a id="h::m" title="S Corporation" href="http://en.wikipedia.org/wiki/S_corp"&gt;S Corporation&lt;/a&gt;" status. S Corporations usually don't pay income tax and instead rely on shareholders to pay the associated tax on their percentage of the income. This tends to give S Corporations the legal liability benefit of corporation status and the single taxation benefit of partnerships. &lt;/li&gt;&lt;/ul&gt;&lt;p&gt;Corporations issue stock to raise money. Stock entitles the holder to a &lt;a id="fzru" title="residual" href="http://en.wikipedia.org/wiki/Residual"&gt;residual&lt;/a&gt; claim on earnings and assets after other debt obligations have been met. One obvious question is "what's a good stock price?" This has a lot of factors, such as a company's growth potential and the company's earnings. Popular metrics include a company's ratio of its stock price divided by its earnings (&lt;a id="pv50" title="P/E ratio" href="http://en.wikipedia.org/wiki/P/E_ratio"&gt;P/E ratio&lt;/a&gt;). Higher P/E ratios tend to indicate that shareholders have higher expectations the company will grow and eventually make more money in the future. Some examples:&lt;/p&gt;&lt;p&gt;&lt;table id="ob:4" border="1" bordercolor="#000000" cellpadding="3" cellspacing="0" width="193"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td width="113"&gt;&lt;b&gt;Company&lt;/b&gt;&lt;/td&gt;&lt;td width="78"&gt;&lt;b&gt;P/E Ratio&lt;/b&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td width="115"&gt;&lt;a id="tlgy" title="Google" href="http://www.google.com/finance?q=GOOG"&gt;Google&lt;/a&gt;&lt;/td&gt;&lt;td width="78"&gt;31.47&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td width="117"&gt;&lt;a id="u7pc" title="Microsoft" href="http://www.google.com/finance?q=MSFT"&gt;Microsoft&lt;/a&gt;&lt;/td&gt;&lt;td width="78"&gt;13.98&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td width="118"&gt;&lt;a id="d-xj" title="Amazon.com" href="http://www.google.com/finance?q=NASDAQ%3AAMZN"&gt;Amazon.com&lt;/a&gt;&lt;/td&gt;&lt;td width="78"&gt;54.98&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/p&gt;&lt;p&gt;After you raised some capital, you should carefully think how you'll spend it. There are many ways to do this. The &lt;a id="d328" title="Payback Period Method" href="http://en.wikipedia.org/wiki/Payback_period"&gt;Payback Period Method&lt;/a&gt; has you calculate how long it'll take to recover your investment. The shorter the payback period, the less risky the investment is. For example, adding RAM is so cheap that the productivity boost has a short payback period. In contrast, completely rewriting a huge codebase might have &lt;a title="put your company out of business" href="http://www.joelonsoftware.com/articles/fog0000000069.html"&gt;put your company out of business&lt;/a&gt; before you get your money back.&lt;/p&gt;&lt;p&gt;Another approach is to use the &lt;a id="pdpm" title="Net Present Value Method" href="http://www.answers.com/topic/net-present-value-method"&gt;Net Present Value Method&lt;/a&gt; to see how much the investment will return over its lifetime in terms of today's dollars. Once you determine the discount factor to reflect the risk, you only consider investments that have a positive Net Present Value.&lt;/p&gt;&lt;h4&gt;Day 7 - Operations&lt;/h4&gt;&lt;p&gt;Operations is about making stuff. Popular operations guys include &lt;a id="x6xv" title="Frederick Taylor" href="http://en.wikipedia.org/wiki/Frederick_Winslow_Taylor"&gt;Frederick Taylor&lt;/a&gt; from the late 1800's who is famous for breaking up tasks into small pieces and walking around factories with a stopwatch to find the "one right way" of doing them. &lt;a id="f3bd" title="Elton Mayo" href="http://en.wikipedia.org/wiki/Elton_Mayo"&gt;Elton Mayo&lt;/a&gt;'s bold claim was that caring about your employees mattered. You could even &lt;a title="make terrible working conditions" href="http://en.wikipedia.org/wiki/Hawthorne_effect"&gt;make terrible working conditions&lt;/a&gt; if the employees were otherwise treated well and felt important. &lt;/p&gt;&lt;p&gt;Although some MBAs might use some programming techniques like optimizing flow-charts to improve operations, it's more likely to see factory techniques used when managing programmers. Oversimplifying things, software development is a factory that turns &lt;a id="bzo6" title="capital into code" href="http://www.joelonsoftware.com/articles/fog0000000074.html"&gt;capital into code&lt;/a&gt;. To this end, you'll often see popular manufacturing processes like Toyota's &lt;a id="pmh5" title="Kanban" href="http://en.wikipedia.org/wiki/Kanban"&gt;Kanban&lt;/a&gt; method of using visual cards to control workflow &lt;a id="pbge" title="sneaking into our offices" href="http://www.infoq.com/articles/hiranabe-lean-agile-kanban"&gt;making their way&lt;/a&gt; into our world as "new" or "agile" software methodologies.&lt;/p&gt;&lt;h4&gt;Day 8 - Economics&lt;/h4&gt;&lt;p&gt;Economics is the magic that allows me to write software in exchange for steak burritos. As &lt;a id="gjfk" title="Adam Smith" href="http://en.wikipedia.org/wiki/Adam_Smith"&gt;Adam Smith&lt;/a&gt; &lt;a id="k3k4" title="realized" href="http://en.wikipedia.org/wiki/The_Wealth_of_Nations"&gt;realized&lt;/a&gt;, society as a whole becomes "wealthier" when we seek division of labor to specialize and do something well rather than trying to do everything ourselves poorly.&lt;/p&gt;&lt;p&gt;At a &lt;a id="rui0" title="micro level" href="http://en.wikipedia.org/wiki/Microeconomics"&gt;micro level&lt;/a&gt;, economics is a simple matter of supply equals demand. When you look at the larger/&lt;a id="lqz3" title="macro economies" href="http://en.wikipedia.org/wiki/Macroeconomics"&gt;macro economies&lt;/a&gt;, more complicated equations pop up like &lt;a id="ibn5" title="this one" href="http://en.wikipedia.org/wiki/Equation_of_exchange"&gt;this one&lt;/a&gt;: &lt;/p&gt;&lt;blockquote id="vsxg"&gt;&lt;a id="bzha" title="Money" href="http://en.wikipedia.org/wiki/Money_supply"&gt;Money&lt;/a&gt; * &lt;a id="zjn6" title="Velocity" href="http://en.wikipedia.org/wiki/Velocity_of_money"&gt;Velocity&lt;/a&gt; = &lt;a id="qxwn" title="Price Level" href="http://en.wikipedia.org/wiki/Price_level"&gt;Price Level&lt;/a&gt; * &lt;a id="e_-." title="Real Gross National Product" href="http://en.wikipedia.org/wiki/Measures_of_national_income_and_output"&gt;Real Gross National Product&lt;/a&gt;&lt;/blockquote&gt;&lt;p&gt;This equation shows that it's important that money is moving around (e.g. isn't hidden under your mattress) and that prices are stable or have reasonable growth.&lt;/p&gt;&lt;p&gt;One of the best things about the economics of software is that it has really low marginal costs (e.g. the cost to copy it). With processors, bandwidth, and storage all roughly following &lt;a id="u-75" title="Moore's Law" href="http://en.wikipedia.org/wiki/Moore%27s_Law"&gt;Moore's Law&lt;/a&gt; exponential curves, the capacity is doubling every 18 - 24 months which implies that the cost for a fixed amount is falling by half over the same period. &lt;/p&gt;&lt;p&gt;As Chris Anderson points out in his book &lt;a id="kd5-" title="Free" href="http://www.scribd.com/doc/17135767/FREE-full-book-by-Chris-Anderson"&gt;Free&lt;/a&gt;, it can sometimes makes sense to round these increasingly lower marginal costs down to zero and make money in different ways such as advertising or selling complements. It's hard to find other industries that have as many economic freedoms as software.&lt;/p&gt;&lt;h4&gt;Day 9 - Strategy&lt;/h4&gt;&lt;p&gt;Strategy should be simple: have a &lt;a id="r43r" title="remarkable product" href="http://www.ted.com/talks/seth_godin_on_sliced_bread.html"&gt;remarkable product&lt;/a&gt; &lt;a id="b0zl" title="that people want" href="http://www.paulgraham.com/startuplessons.html"&gt;that people want&lt;/a&gt;. &lt;a id="o03m" title="Bad things happen" href="http://www.amazon.com/gp/product/1590597214?ie=UTF8&amp;amp;tag=moserware-20&amp;amp;linkCode=as2&amp;amp;camp=1789&amp;amp;creative=390957&amp;amp;creativeASIN=1590597214"&gt;Bad things happen&lt;/a&gt; if you don't do this. It's especially helpful if you have a &lt;a id="q4-u" title="cash cow" href="http://en.wikipedia.org/wiki/Cash_cow"&gt;cash cow&lt;/a&gt; you can milk for lots of money to fund new initiatives. For example, Google makes so much money &lt;a id="xv4_" title="AdSense" href="http://en.wikipedia.org/wiki/AdSense"&gt;from ads&lt;/a&gt; that it can have &lt;a id="s6ok" title="this" href="http://news.ycombinator.com/item?id=699460"&gt;this&lt;/a&gt; &lt;a id="sdm_" title="strategy" href="http://mashable.com/2009/07/11/google-equation/"&gt;strategy&lt;/a&gt;: &lt;/p&gt;&lt;blockquote id="ug2c"&gt;Revenue = Amount of Web Pages Viewed&lt;/blockquote&gt;&lt;p&gt;Google's strategy of getting you to view lots of pages (which conveniently have Google ads on them) explains a lot of what it does. From wanting to &lt;a id="o6.l" title="speed up the web" href="http://googleblog.blogspot.com/2009/06/lets-make-web-faster.html"&gt;speed up the web&lt;/a&gt;, to making a free &lt;a id="hy3i" title="phone os" href="http://en.wikipedia.org/wiki/Android_%28operating_system%29"&gt;phone OS&lt;/a&gt;, to creating a ton of &lt;a id="atyt" title="free services" href="http://en.wikipedia.org/wiki/List_of_Google_products"&gt;free services to keep you hooked on the web&lt;/a&gt;. Google really doesn't &lt;i&gt;care&lt;/i&gt; what you do so long as you enjoy it and take in the targeted ads.&lt;/p&gt;&lt;p&gt;The book tended to focus on more traditional forms of strategy such as "cost leadership", "differentiation", and "focus on the customer" as well as applying &lt;a id="r7rh" title="game theory" href="http://oyc.yale.edu/economics/game-theory/"&gt;lessons&lt;/a&gt; from the famous &lt;a title="prisoner's dilemma" href="http://en.wikipedia.org/wiki/Prisoner%27s_dilemma"&gt;prisoner's dilemma&lt;/a&gt;. I acknowledge that these are important as well, but I think that at its core, strategy can be simple.&lt;/p&gt;&lt;h4&gt;Day 10 - Minicourses&lt;/h4&gt;&lt;p&gt;The book ended with "minicourses" in areas relevant to business such as:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Property (&lt;a id="wn-y" title="real estate" href="http://en.wikipedia.org/wiki/Real_estate"&gt;real estate&lt;/a&gt;, &lt;a id="fh.s" title="patents" href="http://en.wikipedia.org/wiki/Patent"&gt;patents&lt;/a&gt;, &lt;a id="n60z" title="copyright" href="http://en.wikipedia.org/wiki/Copyright"&gt;copyright&lt;/a&gt;, etc)&lt;/li&gt;&lt;li&gt;Leadership (e.g. schools want to create 'leaders' because they'll be better future donors).&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;Although those were interesting, the section I enjoyed the most was on business law. &lt;/p&gt;&lt;p&gt;In our jobs, we often bump into legal matters. We face &lt;a id="vixg" title="End User License Agreements" href="http://en.wikipedia.org/wiki/Software_license_agreement"&gt;End User License Agreements&lt;/a&gt; (EULAs) and &lt;a id="i4d8" title="Non-Disclosure Agreements" href="http://en.wikipedia.org/wiki/Non-disclosure_agreement"&gt;Non-Disclosure Agreements&lt;/a&gt; (NDAs) that we rarely read and often don't fully understand. It was interesting to see any proper &lt;a id="ycgp" title="contract" href="http://en.wikipedia.org/wiki/Contract"&gt;contract&lt;/a&gt; requires the following four conditions to be valid:&lt;/p&gt;&lt;ol&gt;&lt;li&gt;Capacity of Parties - Parties must have legal authorization and be mentally capable to enter into the agreement.&lt;/li&gt;&lt;li&gt;Mutual Agreement (Assent) or Meeting of the Minds - There must be a valid offer and an acceptance.&lt;/li&gt;&lt;li&gt;Consideration Given - Value must be given for the promise to be enforceable.&lt;/li&gt;&lt;li&gt;Legality - You can't enforce a contract dealing with illegal goods or actions.&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;When bad things happen, it can sometimes escalate to a "legal action" which has a &lt;a id="evo2" title="standard procedure" href="http://en.wikipedia.org/wiki/Template:Civil_procedure_%28United_States%29"&gt;standard procedure&lt;/a&gt; involving steps you sometimes hear in the news:&lt;/p&gt;&lt;ol&gt;&lt;li&gt;Jurisdiction - For a court to hear a case, it must have "jurisdiction" to hear the case and power to bind the parties the decision. &lt;/li&gt;&lt;li&gt;Pleadings - The paperwork to start the trial process. The plaintiff (p) files a complaint asserting that the defendant (?) has done something wrong and requests a punishment or remedy.&lt;/li&gt;&lt;li&gt;Discovery - Lawyers gather witnesses and evidence before a trial. Each side is allowed to see the evidence held by the other side.&lt;/li&gt;&lt;li&gt;Pretrial Conference - The lawyers and judge try to focus the case on the most important issues. This is also good time for out-of-court settlements if possible.&lt;/li&gt;&lt;li&gt;Trial - Occurs before the court. The jury decides the factual disputes. The case can be thrown out by the judge with a "summary judgment" if it has no merit.&lt;/li&gt;&lt;li&gt;Jury Instruction by the Judge and the Verdict - The judge instructs the jury about the relevant law involved and the jury makes its decision about the facts and penalty within its authority.&lt;/li&gt;&lt;li&gt;Posttrial Motions - Options include asking for a retrial if an error of law or procedure occurred (e.g. jury misconduct).&lt;/li&gt;&lt;li&gt;Appeal - Each party in a lawsuit is entitled to one appeal at an appellate court where they can file a written brief with arguments for a new trial.&lt;/li&gt;&lt;li&gt;Secure or Enforce the Judgment - Send the person to jail and/or collect money.&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;While the short overview was intriguing, it enforced my belief that it's important to have &lt;a id="syvu" title="an attorney or a lawyer" href="http://wiki.answers.com/Q/What_is_the_difference_between_a_lawyer_and_an_attorney"&gt;an attorney or a lawyer&lt;/a&gt; when it comes to the legal matters. At the very least, they usually have malpractice insurance if things go really bad.&lt;/p&gt;&lt;h4&gt;Conclusion&lt;/h4&gt;&lt;p&gt;The &lt;a href="http://www.amazon.com/gp/product/0060799072?ie=UTF8&amp;amp;tag=moserware-20&amp;amp;linkCode=as2&amp;amp;camp=1789&amp;amp;creative=390957&amp;amp;creativeASIN=0060799072"&gt;Ten Day MBA&lt;/a&gt; helped me move from being &lt;a id="pmyp" title="unconscious incompetence" href="http://en.wikipedia.org/wiki/Four_stages_of_competence"&gt;unconsciously incompetent&lt;/a&gt; about business administration to becoming consciously incompetent in just a few days. I think that alone made it worth the time. I don't have aspirations to get a real MBA, but I now have more respect for those that do.&lt;/p&gt;&lt;p&gt;And now, back to programming...&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6800934446457898793-3330061764648564469?l=www.moserware.com' alt='' /&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/Moserware?a=Elx-AJC9xek:GySGs5KYGDs:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/Moserware?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/Moserware?a=Elx-AJC9xek:GySGs5KYGDs:63t7Ie-LG7Y"&gt;&lt;img src="http://feeds.feedburner.com/~ff/Moserware?d=63t7Ie-LG7Y" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/Moserware?a=Elx-AJC9xek:GySGs5KYGDs:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/Moserware?i=Elx-AJC9xek:GySGs5KYGDs:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/Moserware?a=Elx-AJC9xek:GySGs5KYGDs:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/Moserware?i=Elx-AJC9xek:GySGs5KYGDs:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/Moserware?a=Elx-AJC9xek:GySGs5KYGDs:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/Moserware?i=Elx-AJC9xek:GySGs5KYGDs:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/Moserware?a=Elx-AJC9xek:GySGs5KYGDs:4cEx4HpKnUU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/Moserware?i=Elx-AJC9xek:GySGs5KYGDs:4cEx4HpKnUU" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/Moserware/~4/Elx-AJC9xek" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.moserware.com/feeds/3330061764648564469/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=6800934446457898793&amp;postID=3330061764648564469" title="29 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6800934446457898793/posts/default/3330061764648564469?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6800934446457898793/posts/default/3330061764648564469?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Moserware/~3/Elx-AJC9xek/just-enough-mba-to-be-programmer.html" title="Just Enough MBA to Be a Programmer" /><author><name>Jeff Moser</name><uri>http://www.blogger.com/profile/16074905903060665396</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="08376966494433799517" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://2.bp.blogspot.com/_Zfbv3mHcYrc/SmKJ_BwtVCI/AAAAAAAABfU/BAq3TOcY2UI/s72-c/GoogleBalances.png" height="72" width="72" /><thr:total>29</thr:total><feedburner:origLink>http://www.moserware.com/2009/07/just-enough-mba-to-be-programmer.html</feedburner:origLink></entry></feed>
