Hacking dating with an 18th century math theory. Or, how to re-invent dating for the 21st century. (a living article)

tynr.io
16 min readJun 16, 2021

(this is a living article, meaning it will get updates frequently)

The world is full of problems to be solved.

Once upon a time there was a small and picturesque city build on top of the ancient old Prussian settlement of Twangste, erected by Teutonic Knights during the Northern Crusades in 1255. The city’s name was Königsberg.

Teutonic crusaders.

Around 5 centuries after the birth of this Teutonic city, a man named Leonhard Euler is born in Basel, Switzerland. Euler is destined to become one of the greatest mathematicians in history.

Prussia attracts many prominent personalities in the 17th and 18th century, largely due to their increasing wealth and focus on post-renaissance momentum of scientific growth. Leonhard is not an exception.

After the unfortunate event of the death of Nicolaus Bernoulli, his brother, Daniel, a close friend to Euler proposed to the Imperial Russian Academy of Sciences in Saint Petersburg that his dear friend Euler should fill up the vacancy that was created after his brother’s death.

Euler accepts the offer and eventually arrives in Saint Petersburg to become an integral part of the Mathematics department.

Being such a busy man, publishing, at some point during that time, at least one mathematical paper per week, his notoriety kept rising.

The mayor of Danzig, Carl Leonhard Gottlieb Ehler, heard about Euler’s astounding career and perseverance and contacted him about a local trivial question that has been increasing in popularity and becoming something of an urban myth.

Winter in Königsberg’s river.

Königsberg, the Teutonic City, during a period of continuous development and progress in architecture, trade, science and art was able to build 7 picturesque bridges around the two large islands of Kneiphof and Lomse that were at the centre of the city, encircled by the Pregel River. The trivial question that was bothering many locals at the time was how to structure a walk through the city and cross all of these bridges but only once.

Ehler, contacted Euler with this question. Euler, at first, was kind of annoyed that the mayor of Danzig was addressing such a banal question. He wrote to him:

. . . Thus you see, most noble Sir, how this type of solution bears little relationship to mathematics, and I do not understand why you expect a mathematician to produce it, rather than anyone else, for the solution is based on reason alone, and its discovery does not depend on any mathematical principle. Because of this, I do not know why even questions which bear so little relationship to mathematics are solved more quickly by mathematicians than by others.

Although, being a mathematician at heart, Euler was intrigued by the problem and decided to approach it. During the same year, he wrote a letter to an acquaintance of him, Giovanni Marinoni, an Italian mathematician and engineer, saying:

This question is so banal, but seemed to me worthy of attention in that [neither] geometry, nor algebra, nor even the art of counting was sufficient to solve it.

Wink. (Yes, I know. I am not politically correct, I guess Euler wouldn’t be either.)

While the word of Euler that this problem has no solution was enough for the people of Königsberg, it was certainly not enough for Leonhard. He, subsequently, published a paper on August 26, 1735 that in 15 paragraphs explained all the prerequisites that should be met for someone to solve this problem (essentially altering the number of bridges in Königsberg) but also, and more interestingly for us, a generalisation of the problem that would spark the fire in an area of mathematics. The foundations for graph theory were placed.

A trivial graph with 6 nodes.

The world is one huge (frigging huge) graph

Now, the world is so many things. But, if you are willing to remove all romance and take a good and unsentimental look you may find yourself in the position of observing, an unregulated, high bandwidth and impossible to completely track, flow of information between different entities. The number of forms that this information has is vast. But, in most cases, it all boils down to electrons and protons carrying information about their electric charge. The level of abstraction that was built on top of these fundamental mediums of information exchange, either by human or nature, is simply there to make life easier.

If you want to have a chance of understanding the world you should really look into its information flows. You will be amazed on the number of assumptions you will be able to reach to when you start tracking the flow of a single piece of information that is carried through the abstractions of this universe.

The world, as a graph

Once you see the universe as nothing more than a big network that constantly exchanges millions of yottabytes of information you will subsequently start seeing smaller, or even better, fractured networks that comprise the smaller components of this world. You will understand that a galaxy, a solar system, a planet, a continent, a nation, a city, a neighbourhood, an apartment building, a family, an erotic relationship between two or more people are just networks.

And, apparently, networks are the most beloved example of university professors when they want to introduce the concept of graphs to their students. From this parallelism we can understand that an erotic relationship between two or more people is a graph.

This graph, if carefully managed, can produce the outcome of the dating process, that is, a date. And if the graph, successfully reduces itself to the actual physical world, the outcome is the elevation of the relationship. And hopefully sex.

Dating as a graph

Now to reach the level of fracture in a network that we described earlier, you need to focus on specifics. The first step is defining the magnitude of the entity that you are interested in. You can do that relatively easy by just looking for similar things, like countries, or buildings or dating candidates. Then the actual fun starts. Containing yourself in a certain subset of entities will allow you to better define the information flow paths that these entities are described with. Then, there’s the elimination process.

As we’ve exampled in this post dating is a simple elimination process. From your relatively large subset of dating candidates you need to find a way to eliminate nodes that are uninteresting to you, continuing to fracture your network up to the point that a desired number of nodes is achieved.

Currently, even in 2021, the way that this elimination process works in dating is an archaic brute force approach that is enhanced by some degree of filter based sorting — human perception in the physical world and tags in the digital world.

This is slow, unreliable, tedious and usually boring work. There has to be a way to speed up this process and make it way more efficient.

The need for modern infrastructure

The tools and methods we have for dating remain identical at heart no matter how many millenniums have passed since the first people dated.

This dated approach in dating (pun non intended, but it’s a nice one) produces way worse results today than it did 20 years ago.

The following diagram shows the decline in the number of marriages in the world since 1920. While, yes, I am totally aware that the correlation between dating and marriage is not a direct one and should not be used for making assumptions, it’s still, one of the few indicators we have to track the success rate of people getting along with each other, especially if you consider that most societies have not yet overcome the taboo status of marriage.

Data provided from OurWorldInData.org

What is also noteworthy for a non-academic piece of writing like this, is to quote the many of our friends, family and general acquaintances that are constantly telling us:

I haven’t found the right one, yet.

It’s interesting to see such a degrade in people matching with people. It’s starting to become a cultural thing: people complaining about mismatch.

Is the infrastructure of dating failing us ?

Before we dive into answering this it’d be nice to establish a common ground on what is considered the dating infrastructure of this world.

Everything that holds information about dating candidates, vessels of information exchange between these candidates, tools that implement the dating processes (like searching and sorting) and dating ecosystems are our dating infrastructure.

Your notebook containing phones of people that you met in parties, your phone’s address book, your Instagram’s social presence (followers & following), the local pub that all the cool kids visit these days, Tinder (ugh) should be considered the incarnation of modern dating infrastructure.

All these things have something in common. They can be represented in linear fashion using a table.

While definitely convenient they’re far from optimal. As we briefly explained in the first paragraphs of the second part of this writing, our world is a graph and the fractures of it, should be represented as graphs as well. Now, while practical, linear tools such as address books have a detrimental flaw for case studies like dating: they are unidirectional.

Unidirectional relationships are easier to understand and work on but are missing out a lot of information that is actually useful for cases like dating. Even enriched with tags or filters, unidirectional relationships between two entities do not give a clear picture on how the elimination process of dating should move on and usually create false positives.

To better understand this it’d be interesting to see an example of a typical address book that also has some intelligence, like sorting based on tags or grouping people together based on common traits.

The concept approaching the problem in such a fashion is to understand why the modern dating infrastructure is dated (pun intended).

In the end, we will try and improve this infrastructure by re-introducing 18th century math.

Examining linear infrastructure with a bird’s eye viewpoint

People, at this point, will definitely have their reasons to believe that we are nothing more than charlatans of words, because we haven’t shown a single formula or line of code, or even a proper diagram for centuries.

Let’s try and challenge this notion by bringing some sexy SQL in the table. (pun definitely intended).

We created a simple MariaDB database and we added a table called MOCK_CANDIDATES.

Now it’d be an interesting time to start populating our little happy table™. We added data for 1000 fictional users of your NotTynrIO platform. Oh, yes, I forgot to mention. From now on the linear approach will be performed by the NotTynrIO platform.

Mockery, courtesy of Mockaroo

Now our address book looks like this.

Our beautiful users ready to find the date of their life.

The fact that our dating candidates set is small (relevant to, for example Tinder’s) is going to difficult us making some points later on, but we will make it work. After all, trying to scale a solution without first understanding how it works in micro-environments is like trying to drive a Rimac without having driven a Honda Jazz. You will just hurt yourself.

We already stated multiple times that dating’s bigger part is the elimination game. An esoteric game of ranking candidates. This approach is used both by people and platforms. If you remember from this piece of writing famous platforms like Tinder is like going on Touring roller coaster.

The insider

We will approach the problem and try to find the ideal dating candidate that matches with the first entry in our table. Taking a close look at the mock user with the first id:

The first user that registered in NotTynrIO (Strange Fruits Music — very nice vanilla Spotify playlist)

Now, since the data are randomly generated with Mockaroo I expect seeing some unrealistic values or value-pairs (like name / sex). Nevertheless, this shouldn’t be that of a problem.

That’s something that the dating ecosystems of today are doing well: sorting and filtering information. They have taken some of the burden of trying to figure out which person is worthy of your time with just brute brain power.

Brain powering this address book without having met in person all these people at least twice would be a week’s work. Luckily, we have computers.

First step in finding a possible match in the dating candidate set is filtering people that are not in our preference group. Major dating platforms like to use the term compatibility but I despise the term for a good number of reasons that deserve their own post.

Let’s define the initial preference group so that we can codify it and filter the data.

Since Kore is bisexual female, thinking linear we can either match her with other bisexual people, or attempt to link her with people that have a binary sexual orientation and take our chances, or both. We are going to go with the double approach, to give NotTynrIO a better chance of finding Kore a date match. Moreover, we’d need to verify that the sexual orientations of the results on the first set of filtered data will be in appropriate for Kore.

We are going to use the simplest of SQL queries so that everyone can follow along — mostly myself since I am crap at SQL.

Finding bisexual females and straight males for Kore.

We got back quite a lot of potential matches, including Kore. Seems natural for Kore to match with Kore, right (have you started feeling the crappiness, yet ?) ?

The first round of filtering for finding a matching date for Kore.

Now for the next filtering process, we are going to localise our set. We are lucky enough to have this kind of information for our users. Thus, we can search for people residing in the same country as Kore.

Adding location in the previous query.

After we add the location requirement our possible candidates list gets way smaller. I guess NotTynrIO isn’t that popular in Mongolia at the moment.

Only three people, taking Kore out, that leaves us only 2 possible matches!

Now we have our possible matches for Kore, at least using a strict linear approach to this problem. Maybe our dataset is not that diverse to have more options for Kore but a solution should work even with the smallest number of people if properly created, isn’t that the case ?

Now let’s see. We have 2 bisexual females for matching with Kore. I guess it’s easier for us humans to sort it out now. Anselma and Brannon are our two options.

The most important fields to take a look at when performing a match would be birthday and personality. A cute and an extrovert personality are an OK match, I guess. How should I know ? How does NotTynrIO know ? They probably hired a bunch of psychologists and dating experts to tell them if cute people match extrovert people, just like Tesla might have hired a cone guy.

Now, since the birthday value for Kore is at some point in 1992 she has at least 10 years of an age gap with the possible dating matches. That might create some incompatibility (ugh) remarks.

The other important field to look at would be political_view. Although, according to Dataclysm, a book written by one of OkCupid’s co-founders, Christian Rudder, politics play a less important role in a partner selection than people want to believe. So, I’ll take Rudder’s word and interesting graphs that he provided us with abundance in his book and so will NotTynrIO.

The way things went for us, our best change right now is to brute force. We are going to create 3 virtual dates for Kore, Anselma and Brannon and hope for the best.

We have just sort of succeeded in finding dates for Kore, Anselma and Brannon. But sort of succeeding is failing in honest words.

NotTynrIO has failed to make an educated decision on which dating candidates to match and in the end required a brute force approach to have a change of succeeding in the dating game.

But NotTynrIO is a naive approach

I am no fool — I hope. I understand that a modern dating platform would do more than just trying to match users based on preferences. What would it do ? Pictures of course. It would show pictures of each other and let people decide on the date.

It’s like having an ADAS in your car that when there’s a turn it requests you to grab the wheel. If I had the creative liberty of adopting an autonomous driving term for dating I’d say that modern platforms right now are a L1 system. They’re here to aid the process of dating and not solve it.

I know that a L5 dating system is way more complicated than an L5 autonomous driving system will ever be. Predicting behaviours on the road is easier than predicting human emotions. At least for now.

Improving the infrastructure

Now, what I would build (Tynr.io):

Our goal would be to beat all modern dating platforms and build something that will never brute force - even if the userbase was 10 users - and have a success rate of at least 90%. That means 9 / 10 users would get a match that would end up in at least one lengthy conversation. Also, the platform is user agnostic.

It doesn’t care about the personal data of the user in the AFK world. It only harvests and cares about the data that the user generates in the platform realm. Users get assigned virtual identities that correspond to their preferences. The identities are valid for 24 hours and all interactions have to be made in that time frame.

So, we’d have the hard work to find an appropriate dating partner for 9/10 users in our platform in under 24 hours. It’s challenging. But that’s why it’s fun.

We’ve been working on several tools and incarnations of the infrastructure for this platform, including hybrid web clients, native mobile clients and even had some ideas on prototypes utilising VR technologies. (https://github.com/tynr-io)

Also, we are completely separated with any idea that involves user ranking and picture dating. I would codify the tools to replicate the AFK social web in under 24 hours and the mechanisms that would find the proper paths between the entities.

A lesson that seems to be forgotten over and over again is that people are unwilling to participate unless they have a reward function that gets invoked for actions they perform. Dating platforms provide a reward promise™ and not a function. This makes them even more cumbersome. We would create the proper reward function for our users to participate without making them bound to the promise (although we are true to our word, in regards to promises as well).

The state of aloofness in dating platforms is something that you can get from retention rate statistics where a mere 5.1% of users sticks for one month or more. I am confident that if we were able to peak the daily statistics of the top 5 dating platforms we would be disappointed.

And while some of these scam platforms have tried to convince the press that minuscule retention rates should be their measure of success, basically telling us that it takes only one month for users to find the perfect life partner and never come back to the app, we say that this is super misleading.

We want to build the infrastructure that’d have at least an 8% monthly retention rate and a 95% 24-hour retention rate (which is a weird metric, but it’s really valuable to us with our time-restricted model).

pussycat: My first step would be to write a closed-source native mobile client that is the first crucial component of the dating infrastructure 2.0 . According to our initial attempts on a variety of client architectures I can guarantee a user experience that is way more fun and intuitive than any current dating platform. In such way, we will hit our required metrics for the second step. To keep the hype building we would open source every generic API we create, like reverse geocoding, data preprocessing, labelling, mock data generators etc. We could even provide API keys for our hosted services for people with merged PRs in our open source repos. (raise nothing for this stage, just work on the infrastructure and build traction)

kitty: My second step would be to bootstrap the training infrastructure and kickstart the ML training tasks using all the data that we gathered with pussycat (I am hearing at least $50k to be able to run the training infrastructure). We expect that even small training sets containing data from 1,000 users would be enough for training our models so that we can do accurate user behaviour analysis. In this second stage we would already be able to provide value along with fun to our users, with personalised in-app experiences, much like a clever Omegle (at this stage we would be looking at a positive ROI since we would be running API services and in-app experiences for at least 6 months).

housecat: My third step would be to build the first serious version of the infrastructure introducing the core functionality of the dating web™, perhaps $200k to be able to scale this. Dating web™, virtual dates and a plethora of other encapsulating features. This release of the infrastructure should outperform the top dating platforms of today by number of features and participation levels.

At this point, I am open to flipping the company to anyone that’ll keep the colours. I mean, I actually want this on the contract. The company has achieved three purposes:

  • open-sourced a lot of APIs that could become profitable
  • respected user privacy and human decency while solving dating
  • taught me how to ship scaled machine learning social webs

If you are interested in the idea of solving dating start by contributing to any of the public projects. There is a lot of hidden code in this namespace but I guess some of it will be made public soon.

--

--

tynr.io
0 Followers

we are here to make break-ups chill