A Rocket Scientist’s Love Algorithm Adds Up During Covid-19

On the brink of a breakup, a JPL engineer computed a relationship prediction formula. It eventually became a dating app—and its value is rising in the midst of a pandemic.
Two people kiss surrounded by data.
Nanaya uses the economic concept of utility to gauge the value of relationships.Illustration: Elena Lacey; Getty Images

In 2014, Rashied Amini was just another engineer in love. He had a job at NASA’s Jet Propulsion Lab in LA and a girlfriend he believed was the one. “I was in a long-term relationship with someone I was very much in love with, and I was getting ready to commit, considered proposing,” he says.

Unfortunately, his girlfriend had not come to the same conclusion. The numbers did not add up the same way for her. “So we had this sort of long, drawn-out breakup where she didn’t know if she wanted to be with me,” Amini says. “She didn't know how to make that decision.” She threw out a suggestion: How about a cost-benefit analysis of our relationship.

She might well have meant it as a joke—maybe even a test—but Amini couldn’t stop himself. “The first thing I did was that sort of nervous laughter of, ‘You can't be serious. This is silly,’” he says. “And then the next thing that happens is, oh, that light bulb goes off and, ‘You know what? I bet I could build this.’ That’s the engineer me.” He opened up Excel and started computing a crude utility value of his relationship. Thus Nanaya, a love prediction algorithm, was born. It was conjured in the hopes that love would listen to numbers.

Amini started off with the basics, working part time on what would become a full-fledged dating-app startup. His work as a rocket scientist gave him a framework. “I had worked on designing moon or Mars bases and trying to understand how much is it going to cost. There’s a lot of uncertainty. So what you need to be able to address is that uncertainty,” he says.

Romance, he figured, simply presented a different set of uncertainties. “You leave the home, and as soon as you leave the home there is this vast envelope of all the different types of people you can meet,” he says. “There's going to be a certain set of people you meet within that larger envelope of possibility. So there's going to have to be some tricks involved with trying to constrain that uncertainty to what's actually realistic to the life of any individual.”

Amini engineered Nanaya to provide clients with a report on their love chances, quantifying the multiple uncertainties of love. It offers free personality and prediction tests, but the much more elaborate premium services costs a one-time charge of $9. (If you’re going to do this, pay the money.) It launched in 2016 and has hundreds of thousands of users, which gives it a unique database of information about people’s love choices, though Amini hasn’t left his job at the Jet Propulsion Lab.

There are many dating apps with more users, of course. But Nanaya has depth. Its questionnaire, particularly in the premium version, is truly extensive, with questions about your larger community, professional and social associations, behaviors, and preferences. Sometimes these questions seem strange or irrelevant: Do you have a pet reptile? How many subway stops do you take to get to work?

The questionnaire is the key to Nanaya, both to its effectiveness and to the insights into relationships it can provide. “Because you know the communities, you can try to assess the probability of finding someone you’re compatible with in those communities,” Amini says. “Once you have that probability, you plop it into a different equation, and you can figure out what are the odds and time of finding someone compatible given all of your social interactions for all of the communities you're a part of.” The value is probabilistic, expressed as the time in which it is most likely for you to find love—a useful number to know about yourself, if somewhat frightening to face.

Knowing that number—the utility value of your relationships—may never be more valuable than it is right now. The app is an aid to finding love, but it is equally an aid to evaluating a relationship you happen to be in. Your use-value in a relationship applies both at times when you’re single and at times when you’re with someone. Covid-19 is a relationship catalyst; it breaks couples, and it makes couples. In Wuhan, and in Lombardy, the divorce rate has been spiking the moment the disease ebbs. Some married couples, forced into intimacy without relief, have discovered that they don’t particularly like one other. And single people, after a long period without touch and the solitary contemplation of mortality, are flocking to relationships, however they can.

Online dating is way up, with more than half of users saying they have been on their dating apps more during lockdown than before. At the same time as Covid-19 puts everybody’s relationship under extreme pressure, it is accelerating, dramatically, the digital basis of all relationships. Just as local businesses had to rush onto delivery platforms, and offices had to figure out Zoom meeting schedules, so the hard realities of the disease have pushed love in the direction it was already going: fully online.

Online dating is both incredibly popular and incredibly unpopular. Before Covid, nearly a quarter of people in the United States used online dating services, nearly a third of young people. But according to SurveyMonkey, 56 percent of adults—slightly higher among women, slightly lower among men—view dating sites somewhat or very negatively. And that’s because they suck and they don’t work. The online dating space, as dominant as it is becoming, remains mathematically crude. Dating is and always was and probably always will be a game about stupid numbers: height and weight and money.

The proprietary algorithms that underlie most dating sites are, naturally enough, aimed at matchmaking. They determine, with more or less accuracy, how compatible you are with someone else and then put you in contact with them. But as anyone who has been on dozens of first dates has learned, first-date compatibility is not necessarily the right question. It’s the utility of those encounters, how close they get you to what you’re looking for. Here are some better questions to ask than "how do I meet roughly compatible partners?": How do you know if you’re in the right relationship? If you’re not in the right relationship, how do you find one?

What increases or decreases your chances at finding love? The answers aren’t obvious or intuitive, Amini says. “The average time people stay single changes based on all these different aspects of identity and lifestyle,” he says. “So I ask a question to my users: How often do you take public transit? I find out that people who take public transit regularly find relationships about four months faster than people who don't take public transit.”

Four months is a significant increase in relationship use-value. But that doesn’t mean you should move to New York if you’re looking for love, because the number of available partners and the sheer quantity of choice increases the length of time it takes to find “the one.” Can you guess the profession in which people stay single for the least amount of time? I thought medicine. I was wrong. It’s agriculture. Big cities can lead to “decision paralysis.” Small towns can lead to “rapid selection.” You don’t need a mathematical model when there are three guys in town to pick from.

Nanaya gives more solid bases to old saws and bits of dating folk wisdom. “One of the other interesting results that we have is that people who are insecure and trying to search for a relationship and find the one, it’s gonna take them longer to find someone than someone who isn’t even looking for anything, but they’re confident in who they are,” Amini says. “That is absolutely true from our data. So that’s not our model. That’s not our algorithm. That is the real data we have from tens of thousands of people.” The raw data, it turns out, confirms a bit of conventional wisdom: Love really does come when you’re not looking for it.

How do you know when you’ve found someone good enough? Mathematically, the question of when to settle is more complex than how to find a partner. “So you are someone who’s in a relationship. You have two choices: Stay in the relationship or don’t stay in the relationship. Now, if you're not with that person, you actually have two utilities: You have the utility of being single, plus the utility of any possible relationship that you are likely to end up in.”

Nanaya takes these two values—the amount of happiness you enjoy as a single person and the amount of happiness you might find in a future relationship—and applies them against the value of your current relationship. It can be refreshing to understand your true value on the open dating market. It's your basic opportunity/cost problem. “Precisely when to settle is one of the parts of our report,” Amini says.

Nanaya finds the intersection of the values of your relationship utility, your utility of being single and the utility of future relationships. “And at that crossover point, it’s a pretty good proxy for, well, that’s the time at which you should consider settling, because that’s the point at which you'll probably not be as happy to be single any longer.”

There are some people who should just settle because they’re miserable as single people and not likely to find love with anybody else. There are others who are so happy being single and so likely to find love elsewhere that they shouldn’t settle at all. Of course, it’s almost impossible to think about love in such a rational way, as a function of pure engineering. I wouldn’t trust anyone who did.

Amini started Nanaya as an attempt to win back his girlfriend. So what happened when he presented his cost-benefit analysis to her? What was her utility value in the relationship versus all of the other relationships she could have had? “I believe it suggested that she stay with me, but she was very conflicted because she, in her own words, said I was the perfect boyfriend. She was just as deeply in love as I was. But she had this sort of conflict that she wasn’t able to emotionally resolve, and that devastated me.”

The math wasn't enough.

So what does the engineer do now when he goes out on date? Does he plug the vitals of his dating partner into the algorithm? “No, never.” And why? “When you go into your romantic life in a very prescriptive or qualitative way, you're really putting your blinders on. So, how I want people to use Nanaya is, again, it’s to expand your horizon and to help you get self-awareness that maybe you haven’t thought of things in a certain way. And even though we come up with a number that says oh, you’re going to have a 100 percent chance of finding love in four years, well, OK, but it’s not just about that number. It’s what does that number mean to you? So in my case, when I look at when to settle, it sort of told me, ‘Well, hey Rashied, don’t do online dating, go out into the real world.’ And that is a much better way of meeting people and also living a more fulfilling life just by making more friends and having real human interactions.”

It might seem ironic that Rashied is not yet in a place where he uses his own algorithm, but that’s the real advantage of taking the math all the way. You can perceive its limits. Take it from the systems engineer at NASA’s Jet Propulsion Lab: Some matters of the heart cannot be quantified.

At the same time, human beings inevitably quantify their relationships. Dating is gross. It is still height for men and weight for women and money for both. Traditional matchmakers use a numerical system, too. It’s just much cruder. They match fours with fours and eights with eights. Nanaya is super useful before you look for relationships and after you’ve been in a relationship for a while. Like any model, it requires facts on the ground to be effective. The better the facts, the better the model works.

Amini is using an economic model of utility to figure out romantic value or the value you place on romance, but the key information is what you know about yourself. This is just good advice generally, but it also matters to dating particularly: You should know who you are before you try to figure out who you want.

And therefore the real advantage of Nanaya may be not so much in its algorithm but the process of the questionnaire itself. “It really helps to know yourself. This is, to be honest, one of the hardest parts of asking questions of someone online, how self-aware is an individual or how emotionally intelligent is an individual?” This is the problem with all relationship algorithms, maybe with relationships altogether. They’re all based on people’s descriptions of themselves, and how reliable are those?

Now that Covid-19 has made everyone’s relationships digital-first, math will matter more than ever. But there's no A/B testing in love. The value Nanaya provides is probabilistic. It’s not a set number. In all the really important decisions in life, picking somebody is about luck. You don't ever get to know if you’ve picked right. You just get the results.


More Great WIRED Stories