I am not usually comfortable in a bar by myself, but I had been in San Francisco for a week and the apartment I sublet had no chairs in it, just a bed and a couch. My friends in town were married or worked nights. One Tuesday I had lentil soup for supper standing up at the kitchen counter. After I finished, I moved to the couch in the empty living room and sat under the flat overhead light refreshing feeds on my laptop. This was not a way to live. A man would go to a bar alone, I told myself. So I went to a bar alone.

I sat on a stool at the centre of the bar, ordered a beer, and refreshed the feeds on my mobile. I waited for something to happen. A basketball game played on several monitors at once. The bar had red fake leather booths, Christmas lights and a female bartender. A lesbian couple cuddled at one end of it. At the other end, around the corner from where I sat, a bespectacled man my age watched the game. As the only man and the only woman alone at the bar, we looked at each other. Then I pretended to watch the game on a monitor that allowed me to look the other way. He turned his back to me to watch the monitor over the pool tables, where the pool players now applauded some exploit.

I waited to be approached. A few stools down, two men broke into laughter. One came over to show me why they were laughing. He handed me his mobile and pointed to a Facebook post. I read the post and smiled obligingly. The man returned to his seat. I drank my beer.

I allowed myself a moment’s longing for my living room and its couch. The couch had a woollen blanket woven in a Navajo-inspired pattern, exemplary of a trend in San Francisco that a friend of mine calls ‘White People Gone Wild’. When I moved in, the receipt for the blanket was on the mantelpiece. It had cost $228. There was a cast-iron gas stove in the fireplace. I had fiddled with the knobs and the gas, but couldn’t figure out how to ignite it. At night the room had the temperature and pallor of a corpse. There was no television.

I returned to my mobile and opened OK Cupid, the free internet dating service. I refreshed the feed that indicated whether other people in the neighbourhood were sitting alone in bars. This service is called OK Cupid Locals. An OK Cupid Locals invitation has to start with the word ‘Let’s’:

Let’s smoke a joint and hang out ☺ Let’s grab a brunch, lunch, beer or some such for some friendly Saturday revelry. Let’s get a drink after Koyaanisqatsi at the Castro. Let’s meet and tickle. Let’s enjoy a cookie. Let’s become friends and explore somewhere.

‘Let’s go now you and I’ always comes into my mind, but I’ve never broadcast an OK Cupid chat signal, I just respond. That night I scrolled until I found a handsome man who had written a benign invitation: ‘Let’s get a drink.’ I looked at his profile. He was Brazilian. I speak Portuguese. He played the drums. ‘Tattoos are a big part of my friends’ and family’s life,’ he wrote. Every era has its own utopian possibilities: ours is the chance to make our lives more bearable through technology.

The man generally held responsible for internet dating as we know it today is a native of Illinois called Gary Kremen, but Kremen was out of the internet dating business altogether by 1997, just around the time people were signing up for the internet en masse. Today he runs a solar energy financing company, is an elected official in Los Altos Hills, California and is better known for his protracted legal battle over the ownership of the pornography website sex.com than he is for inventing internet dating. Like many visionary entrepreneurs, Kremen doesn’t have very good management skills. His life has passed through periods of grave disarray. When I met him, at a conference on the internet dating industry in Miami last January, he asked where I was from. ‘Ah, Minnesota,’ he said: ‘Have you ever been to the Zumbro River?’ The Zumbro flows south of Minneapolis past Rochester, home of the Mayo Clinic. It turned out that Kremen had once driven, or been driven, into the river. He used to be addicted to speed.

In Miami Kremen recounted the genesis of his ideas about internet dating to a room full of matchmakers. In 1992, he was a 29-year-old computer scientist and one of the many graduates of Stanford Business School running software companies in the Bay Area. One afternoon a routine email with a purchase order attached to it arrived in his inbox. But it wasn’t routine: the email was from a woman. At the time, emails from women in his line of work were exceedingly rare. He stared at it. He showed the email to his colleagues. He tried to imagine the woman behind it. ‘I wonder if she would date me?’ Then he had another idea: what if he had a database of all the single women in the world? If he could create such a database and charge a fee to access it, he would most probably turn a profit.

In 1992, that couldn’t be done – modems transmitted information too slowly. Then there was the scarcity of women with online access. Because in its early days the internet was prevalent in worlds that had historically excluded women – the military, finance, mathematics and engineering – women were not online in big numbers. As late as 1996 America Online estimated that of its five million users, 79 per cent were men. In more administrative fields, however, a growing number of women had email.

So Kremen started with email. He left his job, hired some programmers with his credit card, and created an email-based dating service. Subscribers were given anonymous addresses from which to send out their profiles with a photo attached. The photos arrived as hard copy, and Kremen and his employees scanned them in by hand. Interested single people who did not yet have email could participate by fax. By 1994 modems had got faster, so Kremen moved to take his company online. He and four male partners formed Electric Classifieds Inc, a business premised on the idea of re-creating online the classifieds section of newspapers, beginning with the personals. They rented an office in a basement in San Francisco and registered the domain match.com.

‘ROMANCE – LOVE – SEX – MARRIAGE AND RELATIONSHIPS’ read the headline on an early business plan Electric Classifieds presented to potential investors. ‘American business has long understood that people knock the doors down for dignified and effective services that fulfil these most powerful human needs.’ Kremen eventually removed ‘sex’ from his list of needs, but many of the basic parts of most online dating sites were laid out in this early document. Subscribers completed a questionnaire, indicating the kind of relationship they wanted – ‘marriage partner, steady date, golf partner or travel companion’. Users posted photos: ‘A customer could choose to show himself in various favourite activities and clothing to give the viewing customer a stronger sense of personality and physical character.’

The business plan cited a market forecast that suggested 50 per cent of the adult population would be single by 2000 (a 2008 poll found 48 per cent of American adults were single, compared to 28 per cent in 1960). At the time, single people, particularly those over the age of 30, were still seen as a stigmatised group with which few wanted to associate. But the age at which Americans marry was rising steadily and the divorce rate was high. A more mobile workforce meant that single people often lived in cities they didn’t know and the chummy days when a father might set his daughter up with a junior colleague were over. Since Kremen started his company little has changed in the industry. Niche dating sites have proliferated, new technology has made new ways of meeting people possible and new gimmicks hit the market every day, but as I knew from my own experience, the fundamental characteristics of the online dating profile have remained static.

At the same time big cities have a way of shrinking. In her essay about leaving New York Joan Didion tells a man she’ll take him to a party where he might meet some ‘new faces’, and he laughs at her. ‘It seemed that the last time he had gone to a party where he had been promised “new faces”, there had been 15 people in the room, and he had already slept with five of the women and owed money to all but two of the men.’ Didion doesn’t say, but I’ve always assumed her friend went to the party anyway.

I joined OK Cupid at the age of 30, in late November 2011, with the pseudonym ‘viewfromspace’. When the time came to write the ‘About’ section of my profile, I quoted Didion’s passage, then added: ‘But now we have internet dating. New faces!’ The Didion bit sounded unpleasant, so I replaced it with a more optimistic statement, about internet dating restoring the city’s possibilities to a life that had become stagnant between work, subway and apartment. Then that sounded depressing, so I finally wrote: ‘I like watching nature documentaries and eating pastries.’ From then on I was flooded with suggestions of YouTube videos of endangered species and recommendations for pain au chocolat.

OK Cupid was founded in 2004 by four maths majors from Harvard who were good at giving away things people were used to paying for (study guides, music). In 2011 they sold the company for $50 million to IAC, the corporation that now owns Match. Like Match, OK Cupid has its users fill out a questionnaire. The service then calculates a user’s ‘match percentage’ in relation to other users by collecting three values: the user’s answer to a question, how she would like someone else to answer the same question, and the importance of the question to her. These questions ranged from ‘Does smoking disgust you?’ to ‘How often do you masturbate?’ Many questions are specifically intended to gauge one’s interest in casual sex: ‘Regardless of future plans, what’s more interesting to you right now, sex or true love?’ ‘Would you consider sleeping with someone on the first date?’ ‘Say you’ve started seeing someone you really like. As far as you’re concerned, how long will it take before you have sex?’ I found these algorithms put me in the same area – social class and level of education – as the people I went on dates with, but otherwise did very little to predict whom I would like. One occurrence in both online and real-life dating was an inexplicable talent on my part for attracting vegetarians. I am not a vegetarian.

I should note that I answered all the questions indicating an interest in casual sex in the negative, but that’s fairly common for women. The more an internet-dating site leads with the traditional signifiers of (male) sexual desire – pictures of women in their knickers, open hints about casual sex – the less likely women are to sign up for it. At a 51/49 male to female ratio, OK Cupid has a near parity many sites would envy. It’s not that women are averse to the possibility of a casual encounter (I would have been very happy had the right guy appeared), but they need some sort of alibi before they go looking. Kremen had also noticed this, and set up Match to look neutral and bland, with a heart-shaped logo.

I wanted a boyfriend. I was also badly hung up on someone and wanted to stop thinking about him. People cheerily list their favourite movies and hope for the best, but darkness simmers beneath the chirpy surface. An extensive accrual of regrets lurks behind even the most well-adjusted profile. I read 19th-century novels to remind myself that sunny equanimity in the aftermath of heartbreak was not always the order of the day. On the other hand, online dating sites are the only places I’ve been where there’s no ambiguity of intention. A gradation of subtlety, sure: from the basic ‘You’re cute,’ to the off-putting ‘Hi there, would you like to come over, smoke a joint and let me take nude photos of you in my living room?’

The largest free dating site in America is another algorithm-based service, Plenty of Fish, but in New York everyone I know uses OK Cupid, so that’s where I signed up. I also signed up to Match, but OK Cupid was the one I favoured, mostly because I got such constant and overwhelming attention from men there. The square-jawed bankers who reigned over Match, with their pictures of scuba diving in Bali and skiing in Aspen, paid me so little attention it made me feel sorry for myself. The low point came when I sent a digital wink to a man whose profile read, ‘I have a dimple on my chin,’ and included photos of him playing rugby and standing bare-chested on a deep-sea fishing vessel holding a mahi-mahi the size of a tricycle. He didn’t respond to my wink.

I went to a lecture by the novelist Ned Beauman who compared the OK Cupid experience to Carl Sagan pondering the limits of our ability even to imagine non-carbon-based extraterrestrial life, let alone perceive when it was beaming signals to us. We troll on OK Cupid for what we think we want, but what if we are incapable of seeing the signals being sent to us, let alone interpreting them?

OK Cupid gave the almost awe-inspiring impression of Kremen’s dream database: unlimited choice. There are drawbacks to this. As the sociologist Eva Illouz writes in Cold Intimacies, ‘the experience of romantic love is related to an economy of scarcity, which in turn enables novelty and excitement.’ In contrast, ‘the spirit presiding over the internet is that of an economy of abundance, where the self must choose and maximise its options and is forced to use techniques of cost-benefit and efficiency.’ At first it was exciting but after a couple of months the cracks began to show. What Beauman says about our inability to gauge what might be attractive turned out to be true. Consider the following.

I went on a date with a classical composer who invited me to a John Cage concert at Juilliard. After the concert we looked for the bust of Béla Bartók on 57th Street. We couldn’t find it, but he told me how Bartók had died there of leukaemia. I wanted to like this man, who was excellent on paper, but I didn’t. I gave it another go. We went out for a second time to eat ramen in the East Village. I ended the night early. He next invited me to a concert at Columbia and then to dinner at his house. I said yes but I cancelled at the last minute, claiming illness and adding that I thought our dating had run its course. I was in fact sick, but he was angry with me. My cancellation, he wrote, had cost him a ‘ton of time shopping, cleaning and cooking that I didn’t really have to spare in the first place a few days before a deadline …’ He punctuated almost exclusively with Pynchonian ellipses.

I apologised, then stopped responding. In the months that followed he continued to write, long emails with updates of his life, and I continued not responding until it came to seem as if he was lobbing his sadness into a black hole, where I absorbed it into my own sadness.

I went on a date with a furniture craftsman. We met at a coffee shop. It was a sunny afternoon in late February, but a strange snowfall began after we arrived, the flakes sparkling in the sun. The coffee shop was below ground, and we sat at a table by a window that put us just below two chihuahuas tied to a bench on the sidewalk outside. They shivered uncontrollably despite their fitted jackets. They looked down at us through the window, chewing on their leashes. The woodworker bought me a coffee and drank tea in a pint glass.

Our conversation was strained. He seemed bored. His blue eyes shifted restlessly and he had a moustache. He had gone to a school for graphic design in Arizona. He showed me photos of furniture he made. He had calloused hands and was tall. He was attractive but dour and I wondered why: was it me, or a generalised posture against the world? We discovered we had been born in the same hospital, Allentown Hospital in Allentown, Pennsylvania, except that I was seven months older. In another era, the era when marriage was dictated by religion, family and the village, we might have had several children by now. Instead my parents had moved halfway across the country when I was three years old, he had stayed in Allentown until adulthood and now we both lived in bleak Bedford-Stuyvesant and were 30. He thought of himself as defiant, and loved being a craftsman only as much as he had hated working in an office. After drinking his tea, he went to the bathroom, came back and wordlessly put on his coat. I stood up and did the same. We walked up the stairs into the February wind. We said goodbye.

I went on a date with a man who turned out to be a hairstylist who had attracted me with his Texas charm: ‘A nod and a bow, Ms Space,’ he had written. He arrived late to our date in Alphabet City, having accommodated some last-minute clients who wanted unscheduled blow-drys for their own dates. On either side of his neck he had tattoos of crossed scimitars. I asked him what the tattoos meant. He said they meant nothing. They were mistakes. He pushed up his sleeves and revealed more mistakes. As a teenager in Dallas he had let his friends use him as a training canvas. To call the tattoos mistakes seemed to be different from regretting them. He didn’t regret them. He said it was just that his 16-year-old self was giving him the finger. ‘You think you’ve changed,’ the 16-year-old version of him was saying through the tattoos: ‘Fuck you, I’m still here.’

OK Cupid had another unintended effect, which was that in posting my profile, however pseudonymously, I had adorned myself with the equivalent of a ‘For Sale’ sign. Those who saw me on OK Cupid whom I knew in real life and who recognised my photo would often contact me: ‘I saw you on OK Cupid and I thought I would write.’ I went for Colombian food in Greenpoint with one of these. When I arrived my date was reading some documents that the National Security Agency had recently declassified to do with John Nash, the schizophrenic genius portrayed in A Beautiful Mind. We ordered arepas and beers. I liked this man. He had a job he loved at a blue-chip art gallery and lived in a spacious, high-ceiling apartment overlooking a tree-filled park with benches that formed a serpentine pattern. We talked about Cascadian black metal bands and the idea of resisting capitalism through unlistenable music and sustainable agriculture. We walked from Cafecito Bogotá back to his impeccable apartment, where he played ambient records and I petted his two cats. We decided to conduct an OK Cupid Locals experiment: he broadcast ‘Let’s lkjdlfjlsjdfijsflsjlj.’ I sat next to him on the couch. I refreshed my phone to see if his broadcast came up. It did. We looked at each other. He walked me to the train.

Around this time I met someone in the real world. It didn’t work out, but it was a vivid enough reminder of what it feels like to want to sleep with someone and not even know what their favourite books are to make internet dating all but impossible for a while. The boredom returned, the ex-boyfriend resumed his place in the halls of memory. I went west and the walls of the all but unfurnished apartment in San Francisco loomed over me.

Like most people I had started internet dating out of loneliness. I soon discovered, as most do, that it can only speed up the rate and increase the number of encounters with other single people, where each encounter is still a chance encounter. Internet dating destroyed my sense of myself as someone I both know and understand and can also put into words. It had a similarly harmful effect on my sense that other people can accurately know and describe themselves. It left me irritated with the whole field of psychology. I began responding only to people with very short profiles, then began forgoing the profiles altogether, using them only to see that people on OK Cupid Locals had a moderate grasp of the English language and didn’t profess rabidly right-wing politics.

Internet dating alerted me to the fact that our notions of human behaviour and achievement, expressed in the agglomerative text of hundreds of internet dating profiles, are all much the same and therefore boring and not a good way to attract other people. The body, I also learned, is not a secondary entity. The mind contains very few truths that the body withholds. There is little of import in an encounter between two bodies that would fail to be revealed rather quickly. Until the bodies are introduced, seduction is only provisional.

In the depths of loneliness, however, internet dating provided me with a lot of opportunities to go to a bar and have a drink with a stranger on nights that would otherwise have been spent unhappy and alone. I met all kinds of people: an X-ray technician, a green tech entrepreneur, a Polish computer programmer with whom I enjoyed a sort of chaste fondness over the course of several weeks. We were both shy and my feelings were tepid (as, I gathered, were his), but we went to the beach, he told me all about mushroom foraging in Poland, he ordered his vegetarian burritos in Spanish, and we shared many mutual dislikes.

As for that night in San Francisco, I responded to an online beacon, and I went for a drink with a stranger. We kissed, he showed me his special collection of marijuana plants, and we talked about Brazil. Then I went home and never spoke to him again.