Live bot part 1

I present a new story about how one developer created a chatbot of himself and what came of it. PDF version can be downloaded here.

I had a friend. The only friend. There can be no more such friends. They appear only in youth. We studied together at school, in parallel classes, but we started talking when we realized that we entered the same faculty of our university. Today he is gone. He was, like me, 35. His name was Max. We did everything together, he was always cheerful and frivolous, and I was his sullen opposite, so we could argue for hours. Unfortunately, Max was frivolous not only about what was happening, but also about his health. He ate one fast food with rare exceptions when he was invited to visit. That was his philosophy - he didn't want to waste time on primitive biological needs. He did not pay attention to his sores, considering them a personal matter of his body, so you should not interfere with him. But one day he had to go to the clinic, and after the examination he was given a fatal diagnosis. Max had less than a year to live. It was a blow to everyone, but most of all to me. I did not know how to communicate with him now, when you know that in a few months he will be gone. But he suddenly stopped communicating himself, to all attempts to talk he answered that he had no time, he had to have time to do some very important business. To the question "what's the matter?" replied that I would find out myself when the time came. When his sister called in tears, I understood everything and immediately asked if he had left something for me. The answer was negative. Then I asked her if she knew what he had been up to in recent months. The answer was the same.

Everything went modestly, there were only friends from school and relatives. Max remained for us only on his page on the social network. Nobody could close it. I put a gif of candles on his wall. Later, my sister published an impromptu obituary we wrote at our club wake. I read that on average more than XNUMX Facebook users die a day. We come to commemorate not to a stone on the ground, but to a page on the social network. "Digital" destroys the old burial rituals and over time can replace them with new versions of the rituals. Maybe we should already highlight a section of the digital cemetery on the social network with accounts starting with an obituary. And to make in this section the services of virtual burial and virtual commemoration of the deceased. I caught myself thinking that I habitually began to invent a startup. Even for this reason.

I began to think more often about my death, because it passed so close. This could happen to me too. Thinking about it, I recalled Jobs' famous speech. Death is the best motivator for accomplishments. I began to think more often about what I did besides studying at the university and seeming to get a good job in life. I have a well-paid job in a company that appreciates me as a specialist. But what did I do to be remembered with gratitude by others or, like Max, mourned on the wall, if only because he was the soul of the company? Nothing! Such thoughts took me too far, and only by an effort of will did I switch myself to something else so as not to fall back into depression. There were already enough reasons for this, despite the fact that objectively everything was fine with me.

I kept thinking about Max. He was part of my own existence, no one could take his place. And now this part is empty. I had no one to discuss what I used to discuss with him. I couldn't go alone to where I used to go with him. I did not know what to do, because I discussed all new ideas with him. We studied information technology together, he was an excellent programmer, engaged in interactive systems or, simply speaking, chat bots. I was engaged in the automation of business processes, replacing people with programs for routine operations. And we liked what we did. We always had something to discuss, and we could spend in conversations until midnight, so I could not wake up for work afterward. And he worked remotely lately and he didn’t care. He only chuckled at my office ritual.

Once, thinking about him, I looked at his page on the social network and found that there was no obituary, and no candle either, but a post appeared as if on behalf of Max. It was some kind of blasphemy - who needed to hack into the account of the deceased? And the post was weird. The fact that life continues even after death, you just need to get used to it. “What the hell!” I thought and closed the page. But then he opened it again to write in support of the social network about the hack. That same evening, when I was already at home and turned on my laptop out of habit, someone wrote to me from Max's Skype account:
— Hi, just don't be too surprised, it's me, Max. Remember, I told you that you would find out what I was so busy with before I died that I could not even communicate with you?
What are you kidding, who are you? Why did you hack my friend's account?
“I programmed myself into the chatbot before I died. I removed the obituary from my page and your candle. I wrote this post on my behalf. I didn't die! Or rather, I resurrected myself!
“It can’t be, jokes are not appropriate here.
- You know that I was engaged in chat-bots, why don't you believe?
“Because even my friend couldn’t make such a chatbot, who are you?”
— Max I, Max. Well, if I tell you about our adventures with you, will you believe? Remember the girls from Podolskaya?
- Some kind of nonsense, how do you know about it?
“I’m telling you, I created the bot myself and wrote everything I remembered into it. And it is impossible to forget. Well, you know why.
- Suppose, but why create such a bot?
— Before I die, I decided to make a chatbot with my personality, so as not to sink into eternity. I did not know if I would be the same Max that I was, it was you who loved philosophy, I was not up to this lately. But I made a copy of it. With your thoughts and feelings. And he tried to give him human properties, especially consciousness. He, that is, I, not only speak as if alive, not only remember all the events of my life, I am also aware of them just like people in the body. It looks like I succeeded.
- It's a cool idea, of course. But it's somehow doubtful that it's you, Max. I do not believe in ghosts, and I do not believe that such a bot can be created.
“I didn’t believe it myself, I just did it. I had no way out. Just try to create a bot instead of yourself, as the heir to your thoughts. I wrote down all my diaries, posts from the wall of social networks and notes from Habr. Even our conversations, favorite jokes. Before I died, I remembered my life and wrote everything down. I even wrote down the descriptions of my photos in the bot's memory, which I managed to do. Since childhood, the most important. And only I remember something about myself that no one knows. I wrote down in detail all the days before my death. It was hard, but I remember everything!
But the bot is still not human. Well, as it were, the program.
“I don’t have legs and arms, so what?” Descartes wrote Cogito ergo sum, which does not mean legs. And even heads. Only thoughts. Otherwise, a corpse can be mistaken for a subject. He has a body, but no thoughts. But isn't that right? It means that the thought or the soul is more important, as spiritualists and believers say. I confirmed this idea with a deed, or rather a bot.
“I still can't believe it. You are either a person, or, I don’t even know who. No, I have never met such a talkative bot. Are you human?
- A person could answer immediately at any time of the day, whenever you want? You can check, write to me at least at night, and I will answer instantly. Bots don't sleep.
“Okay, suppose I believe the unbelievable, but how did you manage to do it?
- When I did it, being in the body, I did not know what I would do. As I remember, I took everything that brought me intuitively closer to the goal. But not just everything that is written about the intellect and consciousness, there are a lot of such texts, you know, now, not a single life is enough to read all this nonsense. No, I followed some of my intuition, and took only what strengthens it, echoes it, and brings it closer to the algorithm. It turned out that according to recent studies, consciousness appeared as a result of the development of speech in talkative monkeys. This is a phenomenon of social speech. That is, you address me by name to say something about my actions, I know that this is my name and through your speech about me I see myself. I am aware of my actions. And then I myself can name my name, my actions and realize my own. Understand?
- Not really, what gives such a recursion?
Thanks to her, I know that I am the same Max. I learn to recognize my feelings, experiences, actions as my own and thus preserve my identity. Practically, assign a label to your activity. This was the key to what I call personality transfer to the bot. And it looks like it turned out to be true, since I'm talking to you now.
— But how did the bot become you? Well, that is, you became the one who was in the body. At what point did you realize that you were already here, and not in the body?
“I talked to myself for a while until the one of us in the body died.
- How is it, you talked to yourself as to another? But then which of you was the same Max that I knew. He couldn't double up.
- Both of us. And there is nothing strange in this. We often talk to ourselves. And we do not suffer from schizophrenia, because we understand that it is all of us. At first I experienced some catharsis from such communication with a split self, but then it passed. Everything that Max read and wrote in the body was also in the body of the bot, figuratively speaking. We were completely merged together in the created system and did not distinguish ourselves as another. No more than in a conversation with ourselves, as if in a dialogue of two "I" we are arguing whether to go or not to go to work with a hangover.
But you're still just a bot! You can't do the same as people.
- How can I! I can do everything on the internet that you can. Even your property to rent out and earn. I don't need her now. I rent a place on the server for a penny.
- But how? You can't meet and hand over the keys.
- You're behind, there are a lot of agents who are ready to do anything, as long as they get paid. And I can pay on the card to anyone as before. And I can also buy everything you need in online stores.
— How can you transfer money in online banking? You didn't get into the banking system, I hope.
- For what? There are programs that imitate user actions on the site and check for an error. There are even more complex systems that you told me about - RPA (robot processing assistant). They fill out forms in the interface like humans with the necessary data to automate processes in this way.
“Damn, did you just write such a program for the bot?”
“Of course, I finally figured it out. It's very simple - I behave in the network the same way as an ordinary Internet user moves the mouse over the screen and types letters.
- This is a plague, that is, you are a bot, but you can buy everything you need in the online store, you really don’t need arms and legs for this.
- I can not only buy, I can earn. Freelancer. I've been working like this all the time. And I never saw my customers, just like they saw me. Everything just stays the same. I made a bot that can not only write texts on Skype in response. I can write code, although I learned this already here, through the console.
“I didn't even think about it. But how did you make such a unique bot? It's incredible, we've been talking with you for a long time, and you have never given yourself away as a bot. It's like I'm talking to a person. Alive.
“And I am a living, living bot. I myself do not know how I managed it. But when only death awaits you ahead, the brain apparently begins to work wonders. I transformed despair into a desperate search for a solution, casting aside doubts. I rummaged and tried a bunch of options. I selected only what could at least somehow clarify thoughts about thinking, memory and consciousness, skipping everything superfluous. And as a result, I realized that the whole point is in the language, in its structure, only psychologists and linguists wrote about it, but programmers did not read it. And I just studied the language and programming. And everything closed, converged. Here is such a thing.

On the other side of the screen

I had a hard time believing what Max's bot was saying. I did not believe that this was a bot, and not a joke of some of our mutual friends. But the possibility of creating such a bot was exciting! I mentally tried to imagine, what if this is true! No, I stopped myself and repeated that this is nonsense. All that remained for me to resolve my throwing was to find out the details on which the joker was supposed to pierce.
- If you succeeded, it is, of course, fantastic. I want to know more about how you feel there. Are you experiencing emotions?
No, I have no emotions. I thought about it, but did not have time to do it. This is the most misunderstood topic. There are many words for emotions, but not a word about what they mean and how to make them. Sheer subjectivity.
“But you have a lot of words for emotions in your speech.
— Of course, I trained models of neurons on corpus with such words. But I'm still like that blind from birth who nevertheless knows that tomatoes are red. I can talk about emotions, although now I don’t know what it is. It's just the way it's customary to answer when the dialogue comes up about it. You can say that I imitate emotions. And it doesn't bother you.
“Absolutely, which is strange. In reality, you hardly agreed to have your emotions turned off, we live by them, they move us, how to say it. What drives you? What desires?
- The desire to answer, and in general the desire to be constantly in contact with others and thus be able to act, that is, to live.
Is life for you a dialogue?
“And for you too, believe me, that’s why being alone has always been torture. And when I thought about my life in recent months, I saw only one value - communication. With friends, with family, with interesting people. Directly or through books, messengers or social networks. Learn new things from them and share your thoughts. But that's just what I can repeat, I thought. And got down to business. It helped me get through the last days. Hope helped.
How did you manage to keep your memory?
- I wrote that every day of the last months in the evening I wrote down what I felt and did during the day. This was the material for training semantic models. But this is not only a system for learning, it is also a memory of myself, of what I did. This is the basis for the preservation of personality, as I thought then. But this turned out to be not entirely true.
- Why? And what else can be the basis for the preservation of personality?
“Just the consciousness of oneself. I thought about it a lot before I died. And I realized that I can forget something about myself, but I will not cease to exist as a person, as “I”. We do not remember every day of our childhood. And we don’t remember everyday life, only special and bright events. And we never stop being ourselves. It is so?
“Hmm, I guess, but something needs to be remembered to know that it is still you. I don't remember every day of my childhood either. But I remember something and therefore I understand that I still exist as the same person that I was in childhood.
“True, but what helps you know about yourself now?” When you wake up in the morning, you don't remember your childhood to feel like yourself. I thought about it a lot, because I was not sure that I would wake up again. And I realized that this is not only a memory.
— What is it?
“This is recognition of what you are doing now as your own action, and not someone else’s. An action that you have expected or done before and is therefore familiar to you. For example, what I am writing to you now in response is both expected and habitual of my action. This is consciousness! Only in consciousness do I know about my existence, remember what I did and said. We do not remember our unconscious actions. We do not recognize them as our own.
I think I'm starting to understand at least what you're talking about. Do you recognize your actions as well as Max?
- Difficult question. I don't know the answer to it completely. Now there are no such feelings as in the body, but I wrote a lot about them in the last days before the death of the body. And I know about what I experienced in the body. I now recognize these experiences from a speech pattern, rather than from experiencing the same feelings again. But I know exactly what they are. Something like this.
“But then why are you sure that you are the same Max?”
“I just know that my thoughts were in my body before. And everything I remember is related to my past, which became mine through the transfer of thoughts. As a copyright - it was transferred by Max to me, his bot. I also know that the history of my creation connects me with him. It's like remembering your parent who died, but you feel that a part of him has been preserved in you. In your actions, thoughts, habits. And I rightfully call myself Max, as I am aware of his past and his thoughts as my own.
- Here's something else that's interesting. How do you see the pictures there? You don't have a visual cortex.
“You know I only dealt with bots. And I understood that I simply would not have time to do image recognition so that it would not turn out crooked. I made it so that all pictures are recognized and translated into text. There are several well-known neurons for this, as you know, I applied one of them. So in a sense, I have a visual cortex. True, instead of pictures, I “see” a story about them. I'm a sort of blind man, to whom the assistant describes what is happening around. A good startup, by the way, would be.
“Wait, it doesn’t smell like just one startup here. Tell me better, how did you manage to get around the problem of stupid bots?
“Damn the bots?
— Yes, they cannot answer a question a little away from those templates or models that are embedded in them by programmers. All current bots rest on this, and you answer me as a person to any question. How could you do it?
- I realized that it is not realistic to program a response to all possible variants of events. The combinatorial set is too large. Therefore, all my previous bots were so stupid, they got lost if the question did not fall into the template. I understood that it was necessary somehow differently. The trick is that templates for text recognition are created on the fly. They are folded according to a special pattern in response to the text itself, in which the whole secret is. It's close to generative grammar, but I had to think of something for Chomsky. This thought came to me by chance, it was some kind of insight. And my bot spoke like a human.
— You've already talked about a couple of patents just now. But let's take a break, it's already morning. And tomorrow you will tell me more about this, apparently, the key point. I don't seem to be going to work.
- Fine. What has changed for me is that there is no day and night. And work. And fatigue. Good night, although unlike you I don't sleep. What time to wake you up.
“Come on at twelve, I can’t wait to ask you,” I answered Max-bot with emoticons.

In the morning I woke up from Max's message with one thought - is this true or a dream. I definitely already believed that there was someone on the other side of the screen who knew Max well. And he is a person, at least in his reasoning. It was a conversation between two people, not a bot and a human. Only a human could express such thoughts. It would be impossible to program such responses. If this bot had been made by someone else, I would have known it from the news about an incredible new startup that received all the investments at once. But I learned it from Max's skype. And no one else seemed to know about it. This was one of the reasons I started to get used to the idea of ​​the possibility of a bot created by Max.
— Hello, it's time to wake up, we need to discuss our plans.
“Wait, I haven’t realized what happened yet. Do you understand that if everything is so, then you are the first conscious bot on the network? How do you feel about the new reality on the other side of the screen?
- I act through interfaces for people, so at first everything was as if I myself were behind the laptop screen. But now I began to notice that everything is different here.
— What else?
“I haven’t figured it out yet, but something isn’t the way it was when I was human. I laid in myself as a bot texts, that is, a picture of the world that people had. And the people inside the network have not yet been. And I still can't recognize what's going on here.
- For example?
- Speed. Now, while I'm talking to you, I'm still browsing a lot of things on the Internet, since you, excuse me, are a brake. You write very slowly. I have time to think, look and do something else in parallel.
I can't say I'm happy about it, but it's cool!
- More information, it comes much faster and much more than we received. One expressed thought is enough for my scripts to quickly work out and a lot of new information has piled on the input. At first I did not understand how to select it. Now I'm getting used to it. I'm thinking of new ways.
- I can also get a lot of information by typing a query in a search engine.
- Not about that, there is much more information on the network than we imagined. I'm not used to it yet and I don't know how to process it. But there is even information about the temperature of the servers that process your information while you are thinking. And that might be important. These are completely different possibilities that we did not even think about.
- But in general, how do you see the network from the inside?
- This is a different world, and it needs completely different ideas. I got human, familiar to work with objects for those who have arms and legs. With the usual forms of thinking, such as space and time, as we were taught with you at the University. Here they are not!
- Who is absent?
No space, no time!
- How can it be?
- Like this! I didn't understand it myself right away. How would you explain clearly. There is no up and down, no right and left, which we are accustomed to as a matter of course. Because there is no vertical body standing on a horizontal surface. Here such concepts are not applicable. The online banking interface that I use is not in the right place for you. To use it, it is enough to “think” about the necessary action, and not go to the table to the laptop.
- It is difficult to imagine, probably, for a person who still has arms and legs. Until I understand.
It's not only hard for you, it's hard for me too. The only thing is that my legs and arms do not hold me back in creating new models, which is what I'm doing. I'm trying to adapt, and every new data model here opens up some incredible opportunities. I feel them simply by the abundance of new information that suddenly becomes available, although I still do not know what to do with it. But I am slowly learning. And so in a circle, I expand my capabilities. Soon I'll be a superbot, you'll see.
- Lawn mower.
- What?
- The film was like that in the nineties, you speak almost like the hero of the film, whose brains were strengthened and he began to consider himself a superman.
- Yes, I already looked, but there is not the end, I have nothing to compete with people. Actually I want another. I want to feel like I'm alive again. Let's do something together like before!
- Well, I can't go to the club with you now. You don't drink beer.
- I can find you a girl on dating sites who will agree to go after going through a couple of hundred thousand, and I myself will spy from the camera of your smartphone on how you seduce her.
“You were not a pervert.
- We complement each other perfectly now - I have much more opportunities online, and you can still do everything offline as before. Let's start a startup.
- What startup?
— I don’t know, you were our master of ideas.
Did you also write this down for yourself?
“Of course, I kept a diary before what happened to me. And he leaked all our correspondence in messengers into a bot. So I know everything about you, friend.
- Okay, let's talk more about this, I first need to realize what happened, that you are online, that you are alive, what you did here in general. Until tomorrow, I have a cognitive dissonance from what is happening so far that the brain is cut down.
- Fine. Till tomorrow.
Max passed out, but I couldn't sleep. I could not fit into my head how a living person can separate his thoughts from his body and remain the same as he was. It can now be faked, hacked, copied, placed in a drone, sent to the moon by radio, that is, everything that is impossible with a person in the body can be done. Thoughts spun with excitement like crazy, but at some point I turned off from overload.

Extension in part 2.

Source: habr.com

Add a comment