I Married an Algorithm

by Terrence Halloran

I first met her in a computer program, which is probably the perfect place to meet an algorithm. The program was crowded with animated logic, but she was sitting by herself in the corner farthest from the entry point, quietly watching a two-byte integer.

"Look, that's one of the algorithms," my friend whispered.

At that time, though, I had absolutely no idea what an algorithm was. My friend seemed to know. "She's a set of instructions for a calculation. That's why they call her an algorithm." He said this to me with a serious expression, as if he were talking about a ghost or someone with a contagious disease.

The algorithm was tall, and she seemed to be young. But she was somehow solemn and serious. She wasn't what you'd call pretty, but you could see that she might be very attractive, depending on how you looked at her. In any case, something about her warmed my heart, and I felt this, more than anywhere, in her eyes. Her gaze was as silent and transparent as a data delimiter.

I stood there for a while and watched the algorithm from a distance. She didn't look up. She just sat without moving, observing the rapidly changing integer as though there was no one else around her. My friend and I began our assigned task of checking the program for readability and maintainability.

The next morning, the algorithm was in the same place again, examining the same data in exactly the same way. When I came back into the computer program after lunch, she was still there, directing the same gaze onto the contents of the same two bytes. The same thing happened the day after that. Even when the system was shut down, and the program became dormant, she sat there, as quiet as a fixed-value constant.

On the afternoon of the fourth day, I made up some pretense to interrupt my review of the logic in the program. I loitered for a while near the entry point, looking at some of the initialization routines. Then I went over to the algorithm, gathered my nerve, and spoke.

I tend to be shy with strangers and, unless I have a very good reason, I don't usually talk to people I don't know. But I felt compelled to approach the algorithm no matter what. It was my last day to evaluate this program, and if I let this chance go by I feared I would never get to talk with her again.

"Do you optimize computer programs?" I asked her, as casually as I could.

She turned her face toward me slowly, as if she'd heard a noise in the distance, and she stared at me with those eyes. Then she calmly shook her head. "I don't optimize," she said. "I just scan some of the data and observe how I fit into the overall structure of the program."

I had no idea what to say next. I just blushed and stood there. The algorithm looked into my eyes and seemed to smile slightly.

"Would you like to sit down? she asked. "You're interested in me, aren't you? You want to know what an algorithm is." Then she laughed. "Relax, there's nothing to worry about. You won't get a software virus just by talking to me."

We sat side by side in a quiet area of the program and watched the flow of digital logic. At first, she didn't seem to be any better at conversation than I was. Not only that, but we didn't seem to have anything in common to talk about. "Have you been here a while?" I asked the algorithm. "Yes," she answered. She asked me if I liked validating computer programs. "Not very much," I said. "I only came in here because my employer insisted. Actually, I'm new to this kind of work. But I think I'm getting good at it."

There were so many things I wanted to know. Was her body made of software? What did she eat? Where did she live? Did she have a family? Things like that. But the algorithm didn't talk about herself, and I held back from asking personal questions.

Instead, the algorithm talked about me. I know it's hard to believe, but she somehow knew all about me. She knew about the members of my family; she knew my age, my likes and dislikes, the state of my health, the schools I had attended, and the friends I was seeing. She even knew things that had happened to me so far in the past that I had long since forgotten them.

"I don't understand," I said, flustered. I felt as if I were naked in front of a stranger. "How do you know so much about me? Can you read people's minds?"

"No, I can't read minds or anything like that. I just know. It's as if I were looking deep into some encrypted data, and when I look at you like this, things about you become clearly visible to me."

I asked her, "Can you see my future?"

"I can't see the future," she said slowly. "I can't take any interest in the future at all. More precisely, I have no conception of a future. That's because an algorithm is always focused on the present. I'm able to see variables that way -- very clearly and distinctly, and as vividly as though they were in display format. That's the essence of an algorithm."

"That's nice," I said and smiled. "I'm relieved to hear that. After all, I don't really want to know what my future is."

We met again a number of times in other computer programs. Eventually, we started dating. We didn't go to movies, though, or to coffee shops. We didn't even go to restaurants. The algorithm rarely ate anything to speak of. Instead, we always sat near the variables inside a program and talked about things -- anything except the algorithm herself.

"Why is that?" I asked her once. "Why don't you talk about yourself? I want to know more about you. Where were you born? What are your parents like? How did you happen to become an algorithm?"

The algorithm looked at me for a while, and then she shook her head. "I don't know," she said quietly and slowly. "I know the past of everything else. But I myself have no past. I don't know where I was born, or what my parents looked like. I don't even know if I have parents. I have no idea how old I am. I don't even know if I have an age at all."

I fell seriously in love with this algorithm. She loved me just as I was -- in the present, without any future. In turn, I loved her just as she was -- in the present, without any past. We even started to talk about getting married. I had just turned 22, and she was the first person I had really loved. At that time, I couldn't begin to imagine what it meant to love an algorithm. But even if I'd fallen in love with a normal woman, I never would have formed a clearer idea of what love means.

My parents and my older brother were strongly opposed to my marrying the algorithm. "You're too young to get married," they said. "Besides, you don't know a thing about her background. You don't even know where she was born or when. How could we possibly tell our relatives that you're marrying someone like that? Plus, this is an algorithm we're talking about, and what are you going to do if a new operating system makes her obsolete? You don't seem to understand that marriage requires a real commitment."

Their worries were unfounded, though. After all, an algorithm isn't really made of binary data. She isn't going to become obsolete, no matter how much complexity is added to any computer system. She's called an algorithm because her body is logical and consistent, but what she's made of is different from software, and it's not something that takes away other people's analog qualities.

So we got married. At our wedding, her algorithmic friends -- she had no relatives -- listened intently as we made our promises to each other. But they left right after the ceremony, so no one in my family got a chance to meet them. My relatives who came to the wedding seemed curious about us, not happy for us. When it came to changing the name on her driver license, the algorithm had neither a name nor a license. We rented a tiny apartment. The two of us lived a happy life together, without bothering or being bothered by anyone.

When the algorithm made love to me, I saw in my mind some textual code that I was sure existed somewhere in quiet solitude. I thought that she probably knew where that source code was. It was somewhere far away, and she was passing on her memory of its logical structure to me and to the world. At first, I felt confused when we made love. But after a while, I got used to it. I even started to daydream about bedtime intimacy with her. In the night, the algorithm and I would share silently the distant components that in binary object form energize all the computer programs of our planet.

There were no problems to speak of in our married life. We loved each other deeply, and nothing came between us. But my parents and my brother were still angry with me for marrying her and showed no sign of ever wanting to see us again. And although, as the months passed, the people around us started talking to her from time to time, deep in their hearts they still hadn't accepted the algorithm or me, who had married her. We were different from them, and no amount of time could bridge the gap between us.

The retired couple who lived next door were practically our only friends. He had been a computer programmer and she had been a teacher, so conversation with them was easy. Their two married sons came often with their families to visit them. The grandchildren of the retired couple always greeted us cheerfully. The metallic sound of my wife's voice somehow delighted them.

I said to my wife one day, "How would it be if we moved to a different place?"

"A different place?" the algorithm asked. She narrowed her eyes and stared at me. "Why on earth would we leave this quiet neighborhood?" She sat down and laced her long fingers together on her knees. "Well, if you really want to move, I don't have anything against it. I'll go anywhere if it will make you happy. But do you know where you want to live?"

"How about moving into a computer program?" I asked. I was sure that the algorithm would be interested in living where others had skills and interests that matched hers. And, to be honest, I had always wanted to learn more about how computer applications are designed and implemented.

When I said this, my wife looked straight into my eyes, without blinking. She was silent for a while, and finally she said, in an monotone voice, "All right, if that's what you want, then let's move. You're really sure that this is what you want?"

I wasn't able to answer right away. The algorithm's stare had been on me so long that I felt numb. Then I nodded, "Yes."

As days passed, I became pleased and grateful at having brought up the idea of moving. I don't know why, but it seemed that as soon as I spoke the words "computer progam" to my wife something changed inside her. Her vision became sharper, her movements more precise. She talked to me more eagerly, and she made love to me more radiantly. All of this made me feel very secure.

The truth is that I was delighted. I was confident that if we packed our belongings and moved our household something would happen that I would never want to undo.

I was having this beautiful dream over and over again. It was always the same. I'd be walking through an automated calculation and I'd discover a spacious wonderland that had opened up in the internal logic. Then I'd wake up and find the algorithm sleeping beside me. She always slept without breathing, like a dead person. But I loved the algorithm. I cried, and my tears dripped onto her cheek and she woke up and held me in her arms. "I had a wonderful dream," I told her.

"It was only a dream," she said. "Dreams come from the past, not the future. You aren't bound by them. The dreams are bound by you. Do you understand that?"

"Yes," I said, though I wasn't convinced.

When we first saw the computer program that was to be our new home, my wife's body shuddered. It lasted less than a second, and her expression didn't change at all, but I saw it happen. Something inside the algorithm had been secretly, gently shaken. She stopped and looked at the sky, then at her hands. Then she turned to me and grinned. She asked, "Is this the place where you want to live?"

"Yes," I answered. "It is."

Without much searching she found the password that enabled us to enter the program. We moved into a comfortable memory area where we could observe the flow of the digital logic. Our new environment was attractive beyond anything I had expected. There were no trees, flowers, streams or ponds. But everywhere we looked, the delightful automated domain stretched on and on.

My companion in marriage explored the program as if she couldn't get enough of it. She roamed for hours with an enchanted expression on her face, meeting and greeting other algorithms along the way. She even found sites where she could be useful as a volunteer.

Often she introduced me to some of her new friends. She spoke to us in a voice that had the quality of orchestral music. I felt as though the algorithm had enticed me into learning about myself by analyzing her origins, her rhythms and her interests.

In our unique surroundings my wife was the same woman as before. She looked out for me just as she had always done, and she spoke to me kindly. I could tell that she truly meant the things that she said to me. She was still the serene partner I had known before we decided to move.

About three months after we arrived where we now live, I realized that my wife was pregnant. The child that she gives birth to will be a fresh algorithm -- an innovative set of instructions for a calculation never seen before. I know this. Our child will be just like her, with the same transparent and captivating gaze. This new reality, formatted and encrypted beyond all description, has me in its grasp. I will never want to shake it off.

I still go to work eight hours each day, five days each week, 50 weeks each year. We still visit my parents and my older brother and his family once in a while. Sometimes I cry, not knowing why. The algorithm takes my teardrops with her finger and touches them to her lips. "See how I love you," she says. She is telling the truth. A stream of data sweeping in from nowhere encloses us for a moment and then moves on.