Monthly Archives: October 2014

Chaotic Love: What math can tell us about how relationships evolve

I’m very proud to say that Nanaya solves a problem that hasn’t been solved before: determining the value in time of relationships and the option of possible relationships. The Nanaya algorithm has to be pretty complicated to do all of that – a machine of gears, pulleys, and switches that work together to provide a result. The machine has many parts of which are some have been around for awhile.

For instance, the problem of determining relationship quality and stability has been worked on. My old textbook, Nonlinear Dynamics and Chaos by Steven Strogatz, works out an example. This isn’t exactly how Nanaya works but we can take this as a “simple” example.

To evolve a relationship in time, we need to know a few things:

  1. Who are the people before their relationship begins? That is to say, what are their personalities and life circumstance before the first kiss.
  2. How do their personalities interact?

Because this is math we need these to be quantified. We can do that with personality testing and asking a few other questions.

Now what’s next is to set up a system of differential equations. Specifically, there is an equation for each partner that shows how much their affection changes in time based on who they and their partner are. We can consider the simple example of “Romeo” and “Juliet” from Strogatz.

System of differential equations for our lovers.
System of differential equations for our lovers.

Oh dear. So what do these equations mean?

So R(t) and J(t) are functions of love/hate in time. Let’s use dR/dt as an example, though you’ll notice both equations are very similar. R(t) is Romeo’s affection toward Juliet. When R(t) is positive, he is happy with Juliet; when it’s negative, he’s not. dR/dt is simply how much his affection is changing at any specific point in time based on the shared emotions of the couple.

At time zero we have R(t=0), which is Romeo’s interest in Juliet before the relationship.  J(t) and J(t=0) are the same values for Juliet. The values a and b are factors that multiple the feelings of the couple for a specific person. The larger a is, the more Romeo is happy that he is in love. The larger b is, the more Romeo is happy that Juliet loves him.

Well that’s a lot of math. Of course any model like this is a huge oversimplification of reality. Here we look at two dimensions: how Romeo and Juliet feel about each other. These can be broken into many, many other dimensions based on personality and other factors. The oversimplification is welcome as adding more dimensions allows for very complex behaviors that aren’t very predictable. Essentially, the system becomes chaotic as described by chaos theory.

As complicated as it appears it’s very easy to see what happens for various personalities and initial conditions!

So we can consider a few personality types based on a & b:

  • Excitable lover: where a > 0 and b > 0. For the excitable lover, any positive emotions from either partner just make the person happier and happier.
  • Neurotic lover: where a < 0 and b > 0. For the cautious lover, self-doubt causes affections to diminish but love from a partner can over come it.
  • Narcissistic lover: where a > 0 and b < 0. For the narcissistic lover, personal feelings are more important than how a partner feels.
  • Hater: where a and b < 0. For the hater, any love is toxic. Even if they have early affection, that disappears. The more they’re loved the more they’ll run away.
  • There are special cases where either a and/or b = 0. We don’t like haters around here.

That gives us ten different combinations of relationship types, ignoring those special cases. Even for each pair of relationship types there are several different outcomes. For instance, how identical are their personalities and how attracted are they at the beginning of the relationship? Let’s see a few different test cases.

These are parametric plots. In all these cases the arrow indicates going forward in time. Positive values indicate affection and negative are annoyance or dislike (i.e. top right is mutual affection, bottom right is Romeo loves Juliet but Juliet does not love Romeo, bottom left is mutual dislike). Units are arbitrary!

 Two Identical Excitable Lovers With Mutual Attraction

Figure 1
a = 5; b = 5; c = 5; d = 5; R(0)=0.1; J(0)=0.1

This is the predictable outcome when two excitable lovers, attracted to each other, fall in love. Romeo and Juliet are attracted and that initial attraction just builds in time to create a positive feedback loop of mutual admiration. They go off into a bright, love-filled future.

Two Excitable Lovers With Juliet Not Initially Attracted

Figure 2
a = 3; b = 1; c = 1; d = 1; R(0)=0.1; J(0)= -0.25

 Without being initially attracted, Juliet simply isn’t interested even though Romeo is. Romeo has a persuasive personality, which causes her to change her feelings a little bit but she remains unconvinced. As time goes on, the relationship is simply unsustainable and the two part ways.

Now what happens if Romeo is just a little more persistent? We can tweak the a from 3.0 to 3.106 to find out:

Figure 3
a = 3.106; b = 1; c = 1; d = 1; R(0)=0.1; J(0)= -0.25

In this case, Romeo can cajole Juliet just enough for her to overcome her initial ambivalence or lack of attraction to fall in love. In the near future, it’ll be a one-sided relationship but it will ultimately become more equal in love over time.

A Neurotic and Excitable Lover

Figure 4
a = -2; b = 1; c = 1; d = 1; R(0)=0; J(0)= 0.1

Here we have a neurotic Romeo. A little bit of attraction at the start from Juliet enables a relationship to form but it ends up a bit lopsided. As time goes on, it’s clear to see Juliet does love Romeo “more.” There’s nothing wrong with Juliet per se, just that Romeo needs to learn to love himself apparently.

An Excitable and Narcissistic Lover

Figure 5
a = 1; b = -10; c = 10; d = 1; R(0)=0 ; J(0)= 0.1



A recipe for disaster, it’s an unstable relationship! As soon as the narcissist Romeo feels too loved he wants his freedom but as soon as Juliet pulls away he wants attention. Because Juliet will keep loving Romeo so long as he’s happy, the relationship just oscillates between love and hate. It’s unclear what happens in the end but it’s truly something to avoid unless you really like drama. Maybe someone could write a play about it?

So there you have it, we can try to predict the long-term behavior of relationships with mathematical modeling. Reality is a lot more complicated as human relationships span more dimensions than mutual affection. With those extra dimensions comes the chaos that makes predictions all but impossible. It’s even harder when there’s no truly objective means of assessing personality and integrating life circumstances with personality as a means of determining initial conditions.

But difficulty be damned. At Nanaya, we’ve worked on isolating those most important parameters and determining relative long-term behaviors. We’ve made unpredictable, computationally intensive problems tractable and realistic. With the help of volunteers, we’ve validated our prototype outcomes. As time goes on, we look forward to more data as a means of further validating and improving our theory.

All’s Nerdy in Love and War

Time to take a break from writing about relationships and psychology and write about something close to home: engineering. Specifically, this post connects fighting wars to forecasting love though an engineering history lesson.

If there’s something humans are born to do it’s stay alive. While almost all creatures have the biological urge to “fight or flight” in dangerous situations, humans are pretty unique in our ability to plan to survive. Planning is hard though. It’s instinctive to “run away from the angry wild animal we just poked with a stick,” but as soon as you add more wild animals or people the complexity increases along with the ability of a group to follow through with the plan. Planning also takes knowledge, but knowledge one day might be obsolete the next. People can spend years planning for business, war, and love only to have them fall through at the onset. To make a good plan takes knowledge of all the things involved in the plan, the system, and flexibility to account for all possible outcomes.

Arguably, people weren’t very good at planning till the 20th century. By about World War II, technology finally caught up such that we could get information from distant events in real time. The scale and interconnectedness of the war forced governments to accept how mind-bogglingly complex planning is. The destructive power of modern weapons and speed of battle in World War II also gave a bit of urgency in formulating good planning.

There’s nothing like self-preservation as inspiration. What resulted was a new discipline, systems engineering.

From a system engineer’s perspective war isn’t just a series of battles. The system engineer zooms out to see a web of interconnected parts: birth rates, the time to heal an injured soldier, grain harvest yields, tank production, and even innumerable things like morale. An example in war planning was the German Tank Problem where statistics helped Allied war planners determine the need for tanks on the ground by estimating the number of German tanks.

After World War II, things got even deeper. The destructive power of bombers and tanks gave way to nuclear weapons that can level nations in less than an hour. To prepare for nuclear war required rapid decision making based on limited information. Thus, the fields of game theory and decision analysis emerged.

As computers were integrated into war, it became vital to understand how information can be gathered and communicated consistently and meaningfully. An effort was undertaken by America’s Department of Defense to create such a framework. In the 1990s the Department of Defense Architecture Framework (DoDAF) was created to help understand, assess, and communicate the complex systems in war. DoDAF is a language to communicate how complicated things work but it’s also a framework of thinking about them.

An example of a DoDAF "Operations View."
An example of a DoDAF “Operations View.”

NASA isn’t a part of the DoD but space travel can be just complicated as military operations. Years ago, I used DoDAF to understand how to plan and cost the construction of Moon and Mars bases over the course of decades. Unfortunately, it’s not as easy as putting things on a rocket and launching it. Finding the cheapest way of doing it takes a bit of effort and worrying about the details, such as how much cheaper a certain module is to build after building the first one and the weight of food.

Snapshot from the Exploration Architectures Operations Cost Model. This brings back memories.
Snapshot from the Exploration Architectures Operations Cost Model. This brings back memories.

But women are not from Venus nor are men from Mars. Assessing the dynamics of dating and romance actually takes some rocket science. The Nanaya algorithm was designed much in the same way that decisions on the battlefield are made.

We can all do simple calculations to find out the chances of finding a partner much like I discussed previously, but that’s a single, meaningless probability that isn’t descriptive of the process involved in finding that person. If we want something meaningful, we need to address the entire process.

Specifically, with the help of DoDAF we can build something like Nanaya. Specifically, building a systems model, such as Nanaya, requires the following:

  • Defining the “building blocks” of a system
  • Determining how the blocks are connected
  • Understanding the values and qualities of each block and connection
  • Generating the rules of how all these parts change in time
  • Assessing the errors in knowledge and estimation

Once we follow these steps, we can get the equations to determine what actually happens in the system. With these equations, we can develop an algorithm for decision analysis.

Overview of Nanaya "systems."

Overview of Nanaya “systems.”

Strange but true: the very tool developed to help fight wars was used to make Nanaya, a service to help people make sense of their love lives.

But it makes sense if you ask me. If the first thing people worry about is self-preservation, the next is intimacy and love. If we’ve developed the tools for self-preservation, shouldn’t we develop tools for love? It’s time to make modern love just as nerdy as modern war.



Nanaya Frequently Asked Questions

How is this different from eHarmony,, or OkCupid?

Instead of matchmaking and connecting people, we provide objective romantic and social advice using advanced modeling.

Loosely, we give you a Carfax of your love and social life. We can answer specific questions about your love life. For instance:

  • Where and in what groups you have the best chances of finding a compatible partner,
  • With whom you’d be happiest,
  • Whether or not it’s best to stay with the person you’re with,
  • And many more!

When I can use it?

Soon! In January we will open up for personality testing.

In the spring or early summer, we will open up the invite-only beta. General launch will follow later in 2015.

Can I be a Beta user?

If you’re interested in joining the beta program, take the Nanaya personality test and create an account. We’ll offer rolling invites during the beta phase to people who have created accounts.

What will it cost?

Nanaya will be a free service with option to purchase premium reports.

What’s a premium report? How much will it cost?

We will offer some test results for free in the LoveCast. Premium reports will answer specific questions that you may have, such as advice on an existing relationship or different ways to find a good match if you’re single.

We have not figured out pricing, but we expect around $10.

What’s in the LoveCast?

We offer high-level results for free. We discuss some of these on our main page, but we’re still working out what everyone wants to see the most. People in the beta program will help us figure out what the final product will look like.

What happens with my data?

We will develop a privacy agreement by the beginning of personality testing in November.

We’re data nerds at Nanaya and plan on doing sociological studies using the dataset starting during the beta. If you like the OkCupid blog, you’ll like the posts we’ll make in the future.

Who is Nanaya for?

Nanaya is for people who are about to make romantic and social decisions. Whether single or in a relationship, we can help you make decisions by doing the statistical analysis to determine outcomes for decisions you have yet to make.

If you’re single and don’t know how or where to find someone who’d be a good partner, we can help you answer that.

If you’re in a relationship and don’t know your next step or want affirmation before making a decision, we’re here to help.

If you’re simply looking for a way to meet more people and make friends in an adult world, we can help with that, too.

Well, how does Nanaya work?

The heart of Nanaya is an algorithm for options analysis that was designed for long-term relationship decision making; the byproduct of the algorithm is information that applies to people who are single or just dating.

We combine your personality data and aggregate personality data of groups you interact with then perform sociological modeling and statistical forecasting to get probabilities and values that are unique to your situation.

Does Nanaya work?

To some, the idea of a computer “predicting the future” in your love life may seem preposterous. However, the methods Nanaya uses are actually quite common in decision and risk analysis. Nanaya uses the same methods that are used every day to design space missions, manage wealth, and perform industrial optimization. Theoretical work for Nanaya has been reviewed by leading statisticians and physicists and has been well received. Nanaya has been validated through dozens of test cases.

Nanaya is designed to be intrinsically compatible with standardized personality tests, such as those available on major dating sites. Please contact us for more information.

What will the user experience be?

The entire process will take about 15-30 minutes depending on how you answer the questions. It will be a guided process of personality tests and adaptive questions to assess your social interactions and life goals.

Personality testing will be provided by our friends at Traitify.

How do you handle incompatible life goals like disagreements where one partner wants children while the other does not, etc?

Theoretically, Nanaya will be able to handle any questions but we do not plan on handling these types of disagreements for now.


There’s a difficult balance between level of detail and getting a reasonable answer. While willingness to have children is a major issue and it may be incorporated later, if we were to incorporate every possible disagreement it would take hours to get all the needed information from the user.

We presume a general correlation between life goals and personality, but it’s hard to know the details. We ultimately look forward to having detailed answers from users and personality tests to see what correlations exist. For now, we believe simple and sweet is best.

Will you be able to detect potentially abusive relationships?

Nanaya only asks for goals and preferences. We can guess which relationships will fail but not which ones are abusive.

Will you take into account dating preference statistics like those discussed on the OkCupid blog?

Absolutely, but the detail is limited to personality, life goals, and a few preferences. In the future we may expand this.

We look forward to writing blog posts on the data, too!

How can you predict the number of people I’ll be meeting at work, around town, etc?

We can model rates of interaction based on your personality and context with each group (e.g. how long you’ve been a part of it, how large it is).

What if my job is in service or sales? Isn’t that complicated?

It’s a little more complicated but we know how to handle it. For special groups, like working in service, we’ll be asking for a few more details about your personal experience.

 Bottom line, we are trying to create a personalized assessment.

What if I’m bisexual and could see myself settling down with either a man or a woman?

We account for bisexuality.

What if I’m not cis-gendered?

The Nanaya algorithm will leverage Census data for significant portions of calculations and will only work for men and women. If you are not cis-gendered, please choose whichever gender you identify with the closest.

The Catch-22 of Finding a Match

It shouldn’t be a big surprise but the best chances of finding a romantic match are after a big life change, such as a move, going to college, or a new job. In fact it takes on a shape that looks a bit like this:


Being in a new environment means exposure to new people. For each person we meet, there’s some chance we’ll be invited to events and parties where we can meet more people and have a social snowball effect. But time is zero sum, you can’t go to every party in the same night. There’s typically a maximum amount of people you can meet based on the group and how outgoing you are.

Of course it doesn’t go on forever. The biggest factor in how fast a social life settles down is your personality. In particular we consider the Big Three traits that are relevant: extroversion, openness to experience, and neuroticism. The first two help you take more chances in social interactions and in getting to know people. These traits help extend the amount of time someone has chances of making lasting relationships, including friendships. The last one puts the brakes on social interactions. The more neurotic you are, the more you worry about how you’re perceived and how much you can trust others.

So why is it that everyone doesn’t meet their future spouse the first month of college or a new job? This is where the Catch-22 kicks in.


When we are in a new place we’re out of our element. We’re adapting and trying to make heads or tails of how the old “me” can become the new “me.” What’s really going on is the (re)formation of cultural identity. For those who are emerging from adolescence or those who have long been in culturally homogenous environments, the shock of entering a new environment can be destabilizing. Destabilization doesn’t mean bad but simply that emotions are in flux and when that’s the case it’s difficult to be emotionally self-secure. When insecurity exists, whether emotionally or financially, it’s all but impossible to maintain a stable, happy intimate relationship. Inner turmoil and insecurity will soon find ways to manifest in behavior. For adolescents, the challenges of emergent adulthood are a part of development. You need to find yourself before you can find someone else and stay happy. Adults dealing with major transitions are hit harder, especially if culture clash contradicts existing identity development. For those who are not as open to experience or neurotic, social and relationship anxiety can develop.

Now it’s also possible to be too open to experience and not feel that anxiety. People who are more extroverted and opportunistic may date and hookup with no end goal. This can be for the thrill of it, theorized to be biologically driven, or out of insecurity. Namely, people may feel that better is out there and through serial dating they can find “the one.” Maybe Hollywood and false impressions of other relationships have created a unreasonably high expectations of what a long-term relationship should be like?

Ironically all of this happens during the best times to make friends and partners! Is there a way out? Yes and no.

Here’s the “No.” There’s a reason people worry and get anxious. It’s to prevent us from falling into harm. If we are acclimating to a new environment, there’s a reason it doesn’t feel right to settle down and that’s evolution kicking in. If you start dating someone and everything is going great but you feel the need to move on, try to understand why. If you feel that it’s too soon, it might be the case but be honest about it. It’s natural to take time to grow and settle down in a new place or job, and maybe romance should even take a backseat for until that happens. Adding romance into your life while being insecure about life is just trouble waiting to happen.

The best way to fight the Catch-22 is to focus on the first two of the Big Three. Without a doubt, the older we get the better we are in dealing with major life transitions through what we’ve learned from our own experiences and those of others. Those who are more open to experience will stand the best chances of overcoming major life hurdles without anxiety and emotional insecurity. Those who are more extroverted will keep putting themselves in circulation – not to find a partner necessarily, but it will always improve their chances of finding one.

If this Catch-22 feels too real, it’s because we’re human. Try to detect which anxieties are there to protect you as you acclimate and which anxieties are there to get in the way of your happiness. Battle those irrational worries and you might find yourself a happier person more ready to settle down.