How a math genius hacked the OkCupid dating site to find true love
Author: Nastya Prazdnichnaya
's Kevil Paulsen Wired told the story of 35-year-old mathematician Chris McKinley, who decided to apply statistical methods to a dating site, "hacked" its algorithm, and found love after a long string of failed dates. TJournal publishes a translation of this incredibly touching but instructive story.
Chris McKinley sat under the light of a single light bulb and a monitor screen in a small office on the fifth floor of the University of California, Los Angeles, in the mathematical sciences department. It was three o'clock in the morning, the ideal time for quantum computing on the supercomputer in Colorado he was using to write his doctoral dissertation. (Topic: processing of large volumes of data and parallel numerical methods). While the computer was humming, he opened his mailbox on the OkCupid dating service in a separate window to check his email.
McKinley, a lanky 35-year-old with wild hair, was one of 40 million Americans looking for romance on sites like Match.com, J-date and E-harmony. But nine months have passed since the end of his previous relationship, and his searches have brought no results. He sent dozens of sweet messages to women who could potentially be suitable for him, based on OkCupid's algorithms. Most messages were ignored altogether; he only managed to go on six first dates.
That early morning in June 2012, as his compiler worked on machine code in one window and his sad dating account did nothing in another, it dawned on Chris that he was doing everything wrong.
He approached online dating the same way as any other user. And now he realized that he should look for a mate as a mathematician.
OkCupid was founded by Harvard mathematician graduates in 2004, and initially attracted the attention of users with its mathematical approach to finding a match. Users were asked to answer a variety of multiple-choice questions about everything from politics, religion and family to love, sex and smartphones.
On average, respondents selected about 350 questions from thousands of possible ones: “Which offer to go to the cinema sounds most tempting to you?” or “How important is religion/God in your life?” The user marks each of the answer options as acceptable or unacceptable in the answers of his “half”, and also evaluates how important the question is for him on a five-point scale from “indifferent” to “required”. And then the matching algorithm on OkCupid uses this data to figure out the couple's compatibility. The closer to 100%—the mathematical other half—the better.
But McKinley's mathematical compatibility with the ladies from Los Angeles was terrible. OkCupid's algorithm only uses questions that both people decide to answer, and McKinley's chosen questions weren't very popular. When he scrolled through the list of matches, it turned out that less than a hundred women were 90% or more suitable for him. And this is in a city where about 2 million women live (and about 80 thousand of them are on OkCupid). On a site where your compatibility score makes you visible, he was practically invisible.
He realized that he needed to increase this figure. If, through statistical sampling, McKinley could find out what questions concern the women he likes, he could create a new account for himself and answer those questions honestly and simply ignore the others. He could be a perfect match for any of the Los Angeles girls who suit him, and not a match for the rest.
Chris McKinley used a Python script to sort through hundreds of questions on OkCupid. He then sorted the fair sex into seven groups, such as “versatile” and “full of thoughts,” with different characteristics.
Even for a mathematician, McKinley is unusual. Raised on the outskirts of Boston, he graduated from Middleberry College in 2001 with a degree in Chinese. In August of that year, he took a part-time job in New York, translating Chinese into English for a company located on the 91st floor of the north tower of the World Trade Center. The towers collapsed five weeks later. (McKinley didn't have to be in the office until 2 p.m. He was still asleep when the first plane hit the north tower at 8:46 a.m.). “After that I asked myself: what do I really want to do,” he says. A friend at Columbia University invited him to join the famous professional blackjack team at MIT, and he spent the next few years shuttling between New York and Las Vegas, counting cards and earning up to $60,000 a year.
This experience sparked his interest in applied mathematics, and eventually inspired him to pursue a master's degree and then a doctorate in the field. “They could use math in a lot of different situations,” he says. “They might see a new game—like three-card poker Pai Gow—then go home, write some code, and come back with a strategy for winning.”
And now he was going to do something similar for love. First, he needed data. And while his dissertation work was progressing, he created 12 fake accounts on OkCupid and wrote a Python script to manage them. The script was supposed to search according to specified parameters (hetero- and bisexual women aged 25 to 45) and collect the maximum available information from accounts: ethnicity, height, attitude to smoking, astrological sign - “well, everything like that,” says He.
To find answers to his questions, he had to do some digging. OkCupid only allows users to see others' answers if the user has answered that particular question themselves. McKinley set up his bots to just randomly choose an answer to all the questions: he didn't plan to use these fake accounts to find his soul mate, so the answers didn't matter. And then the women's answers were copied into the database.
In August 2013, Moscow developer Roman Kuzmin did something similar with the online dating service Loveplanet. He wrote a script that selected girls based on a given set of parameters, and then, using bots, visited their pages and added likes to their photos. After that, the script analyzed which of the girls liked Roman and provided a list of pages, making the search easier. Then Roman said that he managed to meet at least five really attractive girls.
McKinley watched his bots at work with satisfaction. With about a thousand accounts collected, he hit his first hurdle. OkCupid has a system against such methods of collecting information: it easily notices incredibly fast answers to questions. One by one, the bots were sent to ban.
And he had to teach them to act like real people.
He turned to his friend, Sam Torrisi, a neuroscientist who had recently taught McKinley music theory in exchange for advanced math lessons. Torrisi was also on OkCupid, and kindly agreed to install spyware on his computer so that his use of the site could be monitored. With this data in hand, McKinley programmed his bots to simulate Torrisi's typing speed and number of clicks. He brought a second computer from home and connected it to the broadband Internet in the mathematics department so that it could work uninterrupted 24 hours a day.
After three weeks, he had collected 6 million questions and answers from 20 thousand women across the country. His dissertation was put on the back burner as he immersed himself in studying the data. He began to stay in his office at night. He abandoned his apartment completely, exchanging it for a cell with beige walls. When it was time to sleep, he lay down on a thin mattress right on his desk.
To implement her work plan, McKinley needed to find a pattern that applied to the data collected—a way to group women based on their similarities. The breakthrough came when he wrote an algorithm that refined Bell Labs' so-called K-Modes. This algorithm was first used in 1998 to analyze affected soybean crops. The algorithm takes categorical data and links it together like clumps of colored wax floating in a lava lamp. By slightly changing the parameters, he could influence the results, turning them into a plane or combining them into a single solid ball.
He tweaked the parameters until he had 20,000 women divided into seven statistically distinct groups based on their answers to questions. “I was ecstatic,” he says. "It was the best day in June."
He gave his bots a different task: to collect a sample of 5,000 women in Los Angeles who visited OkCupid in the past month. Checking the resulting data through K-Modes confirmed that they were divided into groups in much the same way. His statistical sampling worked.
Now he just had to decide which group suited him best. He looked at several accounts from each group. One of the groups was too young, two were too old, and another one turned out to be too keen on Christianity. But then he came across a group, which was dominated by girls about 25 years old, who looked like musicians and indie artists. This was a golden group. A haystack in which he will find his needle. Somewhere within this group his true love is hiding.
In fact, the neighboring group looked good too - slightly older women who worked in creative professions, such as editors and designers. He decided to try both groups. He created two accounts and optimized one for group A, and the second for group B.
He conducted a textual analysis of the two groups' data to find out what they were interested in; Education proved to be a popular topic, so in his biography he emphasized that he worked as a mathematics professor. However, the questionnaire remained an important part. He selected 500 questions that were most popular in both groups. McKinley had already decided that he would answer honestly—he didn't want his future relationships to be based on computer-generated lies. But he allowed the computer to figure out what importance score to assign to each of the questions, using an algorithm called the classifier boosting algorithm.
After that, he created two accounts, one with a photo of him climbing a mountain, and the other of him playing the guitar at a concert. One of the questions read: “Regardless of your future plans, what is more important to you now - sex or love?” Answer: love, of course. But for the younger group, he followed the computer's prompt and rated the question as "very important" and for group B as "mandatory."
Once the last question was answered and rated, he launched a search on OkCupid for women in Los Angeles based on percentage matches. At the top of the list was a girl with whom she was 99 percent compatible. He started scrolling down the list, and on, and on, and on... After ten thousand women from all over Los Angeles, the compatibility rate was still above 90%.
He needed to take one more action to get noticed. OkCupid users are notified if someone views their page. So he wrote another program to visit the pages of the women at the top of his list, ranked by age: a thousand 41-year-old women on Monday, another thousand 40-year-olds on Tuesday, and two weeks later he would "crawl" the pages of 27-year-olds. In response, about 400 women visited his accounts every day. And he started receiving messages.
“I haven’t found anyone with such great stats before and I find your profile intriguing,” one woman wrote. “Besides, you’re a strong man who’s great with numbers... I’d say hello.”
"Hello! Your account amazed me and I want to meet you,” wrote another. “I think we have a lot in common, maybe not in math, but in a lot of other great things!”
“Are you really translating from Chinese?” - asked another one. “I studied Chinese a little, but it didn’t really work out.”
The mathematical part of McKinley's search was completed. There's only one thing left. He had to leave the office and test his research in practice. He needed to go on dates.
On June 30, after showering in the university gym, he drove his beat-up Nissan across town for a first date, thanks to data research. Sheila was a web designer from Group A, the young creative types. They met for lunch at a cafe in Echo Park. “It was scary,” McKinley says. “Up until that point, it had all been a bit of a learning exercise.”
By the end of the date with Sheila, it became clear to both that there was no attraction. The next day, he went on a second date with an attractive blog editor from Group B. He had planned a romantic walk along the lake in Echo Park, but she wasn't in the mood. She read Proust and was dissatisfied with her life. “It was a little depressing,” he says.
The third date was also with a member of Group B. He met Alison at a bar in Korea Town. She studied to be a screenwriter and had a Fibonacci spiral tattoo on her shoulder. McKinley got drunk on Korean beer and woke up in his office the next morning with a severe hangover. He sent Alison a message on OkCupid, but she didn't respond.
The refusal upset him, but he still received 20 messages a day. Thanks to his improved accounts, dating has become a completely different game. Now he could ignore messages that consisted of one phrase. He only responded to those where there was humor or if the biography seemed interesting to him. Previously, when he was the initiator, he had to write three to five messages to get a single date. And now one answer was enough for him: “I think you’re cool. Do you want to meet?"
By the twentieth date, he began to notice hidden parameters. In the younger group, women had two or more tattoos and lived in East Los Angeles. In another, most of the women had small dogs, which they simply adored.
His first dates were carefully planned. But when he decided to speed up the “work” with his line, he switched to short meetings over lunch or coffee, often going on two dates a day. He developed a set of personal rules for his marathon to find love. First, don't drink anymore. End the date at the right time, don’t procrastinate. And no going to the cinema or concert. “Nothing where your attention is on a foreign object rather than on each other,” he explains. "It's ineffective."
McKinley's code divided women into statistically identifiable groups based on the similarity of their answers to questions. One of the groups, which he called the Greens, consisted of those who were new to finding love on the Internet; others, the so-called “Samanthas,” were older and more daring. Here's how different groups answered the 4 most popular questions.
After a month of dating both groups, he decided that he was spending too much time on the road, dating girls from the eastern part of the city, from the tattooed group. He deleted his account for group A. The efficiency increased, but the results were still the same. The summer was coming to an end, he went on 55 dates, and carefully wrote each one down in a notebook. Only three of them ended in a second meeting, and only one was repeated three times.
For most people, bad dates result in self-esteem issues. But in McKinley's case it was even worse: he doubted his calculations.
And then came a message from Christina Ting Wan, a 28-year-old artist and prison abolition activist. McKinley showed up in her search results: a 6-foot-tall, blue-eyed guy near the University of California, where she was getting her master's in art. They matched 91 percent.
He met her in a sculpture park near campus. From there they went to a sushi cafe at the college. He immediately felt everything. They chatted about books, art, music. When she admitted that she had slightly tweaked her account before messaging him, he responded with a story about his “hack for love.” Told her the whole story.
“I thought it was unkind and cynical,” she says. “And I liked it.”
This was number 88's first date. It was followed by a second and a third. Two weeks later, they both suspended their OkCupid accounts.
“I think what I did was just a little more algorithmic and scaled-up and computer-based, but overall everyone on the site is doing the same thing,” McKinley says. Everyone is trying to create an optimal account, and McKinley also had the necessary data to do this.
A year after their first date, McKinley and Ting Wan met me at the Westwood sushi bar where their relationship began. McKinley received his doctorate and is now pursuing a second degree in music. Ting Wan went on a year-long art internship in Qatar. And she came to California to visit McKinley. They are always in touch via Skype, and she has already visited several times.
At my request, McKinley brought his notebook for notes. Ting Wan had not seen her before. McKinley covered page after page with formulas and equations, and at the end he made a list of women and dates with them, making short notes about each. Ting Wan, leafing through the notebook, laughed at the particularly funny moments. On August 24, for example, he invited two girls to the same beach. "It's terrible," she says.
For Ting Wan, McKinley's OkCupid hack is just a funny story. But all this mathematics and codes are just a prologue to their overall story. The real hack in a relationship happens when you date. “People are much more complex than their account,” she says. “Therefore, the way we met is somewhat superficial, but everything that happened next is certainly not superficial. We built our relationship with great effort.”
McKinley agrees: “We have a great relationship, not just because we “matched.” It was just a mechanism for us to meet. I was able to use OkCupid to find love.”
She is indignant: “You didn’t find me. “I was the one who found you,” she says, nudging him with her elbow. After thinking, McKinley admits that she is right. A week later, Ting Wan returns to Qatar, and during one of his daily Skype calls, McKinley takes out a diamond ring and holds it up in front of the webcam. She says: "Yes."
They are not yet sure exactly when they will get married. More research needs to be done to determine the optimal wedding day.
This material is a translation of Kevin Paulsen's original article " How a Math Genius Hacked OkCupid to Find True Love " in Wired.
#Article #statistics #internet_dating #research #online_dating services #OkCupid #Chris_McKinley