How does the Facemash Algorithm works in the Social Network??

in #technology7 years ago (edited)

I’m on Facebook. You’re on Facebook. Over 2 billion people are on Facebook so it was inevitable that a movie was going to be made about its founding. It’s a fascinating story brilliantly captured in the Social Network.

One of my favourite sequences in the movie follows Mark Zuckerberg, played by Jesse Eisenburg as he builds Facemash, which proves to be the catalyst for him building Facebook itself. In the film Facemash is defined by the algorithm that Saverin provides to Zuckerberg that gets written on the window of their Kirkland dorm room.

Which begs the question - what was this algorithm? And how did it work?

tumblr_lxd10ydbc01r9r5qno1_500.png

Before explaining how it works it’s important to define what an algorithm actually is. An algorithm is, very simply a process or set of rules to be followed in calculations or other problem-solving operations.

In the case of the film the problem afoot was ranking girls. This is where the equations on the window come into play. The equations written on the window were based around the Elo rating or Elo rating system, named after its creator Arpad Elo. This rating system is used to rate the skills of the players in competitor-versus-competitor games like chess, football and baseball.

Elo believed that the performance of each player in a game is a normal distribution of random variables and that the mean value of players irrespective of their performance in an individual game increases slowly.

Initially invented as a rating system for chess players, Elo is now used as a fundamental rating system in most video games, snooker, scrabble, etc. This is even confirmed by the movie as Zuckerberg specifically asks Saverin for the algorithm he used to rank chess players.

how-to-win-a-game-of-chess-in-two-moves.jpg

The Elo rating system is used to determine the output of a game by using a player’s Elo rating. It is all based on probability. Players with a higher Elo rating have a higher probability of winning a game than players with a lower Elo rating.

After the game, the winner takes points from the loser, thereby increasing his rating. If a high-rated player wins, only a few points will be transferred from the lower rated player. However, if the lower rated player pulls off an upset win, then the number of points that are taken by the player with the lower rating is far greater.

As explained in the movie, Facemash was quite simple. Not unlike hotornot.com, students went to a page and 2 random images of girls were picked and presented to them. The students then had to click on the hottest girl presented to them and then another set of two girls would be presented asking the students to repeat the same actions they had done. The difference with hotornot was that the girls presented were all Harvard students. In other words, the students were rating girls of Harvard based on their looks

Every girl on the Facemash database was assigned a specific base point. When a user rated one girl based on her attractiveness in comparison to another, the rating of the selected girl increased while that of the other girl decreased.

The number of users that rated a certain girl as attractive, the higher her ranking. Better the ranking, higher the possibility of being the most attractive girl on campus. So let’s go to the equation:

Here, in the equation, the variable can be defined as:
Ea: Expectation that Girl A is hotter than Girl B.
Eb: Expectation that Girl B is hotter than Girl A.
Ra: Rate at which Girl A has been hotter than the other girls
Rb: Rate at which Girl B has been hotter than the other girls

This can best be explained using an example: Let’ s say that Girl A has been compared to other girls 10 times and she has been chosen hotter 8 out of 10 times. So, Ra=8/10=0.8. Similarly, Girl B has been compared to other girls 8 times and she has been chosen hotter 4 out of 8 times. So, Rb=4/8=0.5.

Now, using the formulae, we can calculate the values of Ea and Eb. These assumptions and the formula actually made sense as the expectations of girl being hotter that the other cannot be calculated independently and must involve the rating of both the girls being compared! But, when we apply these formulae, one can get some absurd results. (Ea=-0.000834 and Eb=0.000832). So, we can assume that the formulae in the movie were just given to understand the basic logic of comparing the expectations of a girl being hotter than the other. This is a cool tech related moment on-screen which is completely grounded in reality, somewhat of a rarity on screen.

This algorithm, in someways, can be seen as a proxy for Zuckerberg’s character in the film. In the way the algorithm operates, efficiently but with no semblance of guilt, it perfectly captures Zuckerberg’s affinity for cold hard logic, but his lack of empathy, his immense brain-power, but his lack of heart and expresses to us the audience the character of the man who would go on to change the world.

Sort:  

Congratulations @todayintech! You have completed some achievement on Steemit and have been rewarded with new badge(s) :

You got your First payout
Award for the total payout received

Click on any badge to view your own Board of Honor on SteemitBoard.
For more information about SteemitBoard, click here

If you no longer want to receive notifications, reply to this comment with the word STOP

By upvoting this notification, you can help all Steemit users. Learn how here!

Interesting read. I wonder how long it will be before they make a film about Ned and Dan from Steemit :)