Tag Archives: dating

The equation behind Tinder, J-swipe, and good chess matchups.

Near the beginning of the movie “The social network”, Zuckerberg asks his Harvard roommate, Saverin, to explain the chess rating system. His friend writes an equation on the window, Zuckerberg looks for a while, nods, and uses it as a basis for Facemash, the predecessor of Facebook. The dating site, Tinder said it used this equation to match dates, but claims to have moved on from there, somewhat. The same is likely true at J-swipe, a jewish coating site, and Christian mingle.

Scene from the social network, Saverin shows Zuckerberg the equations for the expected outcome of a chess match between players of different rankings, Ra and Rb.

I’ll explain how the original chess ranking system worked, and then why it works also for dating. If you’ve used Tinder or J-swipe, you know that they provide fairly decent matches based on a brief questionnaire and your pattern of swiping left or right on pictures of people, but it is not at all clear that your left-right swipes are treated like wins and losses in a chess game: your first pairings are with people of equal rating.

Start with the chess match equations. These were developed by Anand Elo (pronounced like hello without the h) in the 1950s, a physics professor who was the top chess player in Wisconsin at the time. Based on the fact that chess ability changes relatively slowly (usually) he chose to change a persons rating based on a logistic equation, sigmoid model of your chances of winning a given match. He set a limit to the amount your rating could change with a single game, but the equation he chose changed your rating fastest when you someone much better than you or lost to someone much weaker. Based on lots of inaccurate comparisons, the game results, you get a remarkably accurate rating of your chess ability. Also, as it happens, this chess rating also works well to match people for chess games.

The knowledge equation, an S curve that can be assumed to relate to the expected outcome of chess matchups or dating opportunities.

For each player in a chess match, we estimate the likelihood that each player will win, lose or tie based on the difference in their ratings, Ra -Rb and the sigmoid curve at left. We call these expected outcome Ea for player A, and Eb for player B where Ea = Eb = is 50% when Ra = RB. It’s seen that Ea never exceeds 1; you can never more than 100% certain about a victory. The S-graph shows several possible estimates of Ea where x= Ra-Rb, and k is a measure of how strongly we imagine this difference predicts outcome. Elo chose a value of k such that 400 points difference in rating gave the higher ranked player a 91% expectation of winning.

To adjust your rating, the outcomes of a game is given a number between 1 and 0, where 1 represents a win, 0 a loss, and 0.5 a draw. Your rating changes in proportion to the difference between this outcome and your expected chance of winning. If player A wins, his new rating, Ra’, is determined from the old rating, Ra as follows:

Ra’ = Ra + 10 (1 – Ea)

It’s seen that one game can not change your rating by any more than 10, no matter how spectacular the win, nor can your rating drop by any more than 10 if you lose. If you lose, Ra’ = Ra – 10 Ea. New chess players are given a start ranking, and are matched with other new players at first. For new players, the maximum change is increased to 24, so you can be placed in a proper cohort that much quicker. My guess is that something similar is done with new people on dating sites: a basic rating (or several), a basic rating, and a fast rating change at first that slows down later.

As best I can tell, dating apps use one or more ratings to solve a mathematical economics problem called “the stable marriage problem.” Gayle and Shapely won the Nobel prize in economics for work on this problem. The idea of the problem is to pair everyone in such a way that no couple is happier by a swap of partners. It can be shown that there is always a solution that achieves that. If there is a singe, understood ranking, one way of achieving this stable marriage pairing is by pairing best with best, 2nd with second, and thus all the way down. The folks at the bottom may not be happy with their mates, but neither is there a pair that would like to switch mates with them.

Part of this, for better or worse, is physical attractiveness. Even if the low ranked (ugly) people are not happy with the people they are matched with, they may be happy to find that these people are reasonably happy with them. Besides a rating based on attractiveness, there is a rating based on age and location; sexual orientation and religiosity. On J-swipe and Tinder, people are shown others that are similar to them in attractiveness, and similar to the target in other regards. The first people you are shown are people who have already swiped right for you. If you agree too, you agree to a date, at least via a text message. Generally, the matches are not bad, and having immediate successes provides a nice jolt of pleasure at the start.

Religious dating sites, J-swipe and Christian Mingle work to match men with women, and to match people by claimed orthodoxy to their religion. Tinder is a lot less picky: not only will they match “men looking for men” but they also find that “men looking for women” will fairly often decide to date other “men looking for women”. The results of actual, chosen pairings will then affect future proposed pairings so that a man who once dates a man will be shown more men as possible dates. In each of the characteristic rankings, when you swipe right it is taken as a win for the person in the picture, if you swipe left it’s a loss: like a game outcome of 1 or 0. If both of you agree, or don’t it’s like a tie. Your rating on the scale of religion or beauty goes up or down in proportion to the difference between the outcome and the predictions. If you date a person of the same sex, it’s likely that your religion rating drops, but what do I know?

One way or another, this system seems to work at least as well as other matchmaking systems that paired people based on age, height, and claims of interest. If anything, I think there is room for far more applications, like matching doctors to patients in a hospital based on needs, skills, and availability, or matching coaches to players.

Robert Buxbaum, December 31, 2020. In February, at the beginning of the COVID outbreak I claimed that the disease was a lot worse than thought by most, but the it would not kill 10% of the population as thought by the alarmist. The reason: most diseases follow the logistic equation, the same sigmoid.