Think chatbots are pretty new? Let’s hop in a time machine and go back…way back…to 1984.
I had just turned twelve when I decided to write my first chatbot. I’d been programming for a while (first on a Commodore Vic-20, and then on a Commodore 64), and I was inspired by an issue of the magazine Compute’s Gazette.
My dad was into gadgets. We were the first on our block to own a VCR, and I was only eight years old when he got the family our first computer (which my sister was sorely disappointed to discover wasn’t in fact an Atari 2600, the coveted game machine at the time).
Every time I powered that thing on (the screen appeared immediately — no boot up time!) I was thrilled by the possibilities of what could be created. Just me and the computer, typing in BASIC programs and saving them on cassette tape (and later, floppy disks).
My dad had gotten us a subscription to Compute’s Gazette, and every month I devoured it cover-to-cover. It included games and all sorts of free programs. The only catch was that you had to type them in! I spent hours painstakingly typing in line after line, only to type “RUN” and have it crash immediately. Good times. (And a good lesson in patience for future programming endeavors.)
I loved the the TV show Knight Rider, with its talking car KITT, and the movie War Games, with its talking computer WOPR. I played games like Zork and the Hitchhiker’s Guide to the Galaxy, which had simple natural language interfaces. The idea of having a conversation with a computer was fascinating to me, and when I saw this issue of Compute’s Gazette, I knew what I needed to do.
The program I’d found had nothing to do with chatbots. It was a math learning program, in which a robot helps kids practice arithmetic. The magic was in the fact that it used self-modifying code. This meant that my chatbot could learn.
I knew even then that there was no way I was going to pre-program every possible response to someone’s input. Instead, if it had nothing to say, it would ask the user for help.
Now, if I typed something that wasn’t understood, it would stop and ask the for three possible responses (which were then randomized). The program would have this new response automatically added to the end of the code, as a DATA statement. And now, the next time someone typed in the same thing, it would have an answer at the ready!
Back then, there was no hard drive. No cloud. To store responses, I would need a database file which would have to be read/written to — on a floppy disk. Being able to dynamically alter the code was a much simpler and more elegant solution.
I programmed responses to about 170 inputs, but don’t get me wrong: this thing was brittle! It cared about spelling. It cared about punctuation. “How are you?” would work but not “How are you”.
I named my program “Conversation,” but at the time, I had no idea that someday this chatbot stuff would become my actual career (and that my future job title would include that word). But the experience taught me some important lessons that still hold true:
- There is a lot of variety in how people talk/type. Just think of how many ways people can say hello.
- You’re never going to think up every response yourself. You need to put it out there in the wild, and get real interactions.
- People like to mess with chatbots. (At least 12-year-olds do.)
Looking back through my list of responses, I can see a glimpse of my 12-year-old self. I was into Marvin the Paranoid Android from Hitchhiker’s Guide to the Galaxy, bad puns, and sarcasm (spelling, not so much). And when my son (who is 11) was playing around with it, I was pleased to discover the things I thought were funny at that age, he thinks are funny too.
Check out the video below to see the chatbot in action. And for technical details, like how the code works, and how I was able to run it on my PC, see part 2. The original article from Compute’s Gazette is posted below.
Around the same time, we got our first modem. It had a speed of 300 baud. (If you were to download a 1 gig game today at that rate, it would take a year.) I started spending time on Bulletin Board Systems (BBS), and found a local one called POPnet. Twenty people could log in at the same time and chat. I spent most of my free time online talking to people, many of whom are still friends today. But that’s a story for another day.
Playing around with the emulator and looking at my old programs brought back some of that same excitement I felt when I turned on my computer as a kid. I feel very lucky to have a career in conversation design and to have created real products that people can talk to. Who knew it would all start when I was eight years old, sitting in front of a Commodore computer and painstakingly typing the words PRINT “HELLO”.