A Conversation With My 35-year-old Chatbot (Part 1)

Cathy Pearl
Chatbots Life
Published in
5 min readJul 29, 2019

--

Me at the Computer History museum checking out the computers of my childhood

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.

This July 1984 issue of Compute’s Gazette included an article about self-modifying code. (Thanks archive.org!)

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.)

Top 3 Bot Tutorials:

1. Build simple ChatBot in Python with RASA — Part 1

2. Build a simple ChatBot in Python with RASA — Part 2

3. How I developed my own ‘learning’ chatbot in PythonChatbot

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.

If the query is not understood, the user is asked to provide responses

Now, if I typed something that wasn’t understood, it would stop and ask the user 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.

Video: trying out my chatbot in 2019 on a Commodore 64 emulator (C64 Forever)

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”.

Cathy Pearl is the author of the book “Designing Voice User Interfaces: Principles of Conversational Experiences” from O’Reilly Media, and is head of conversation design outreach at Google. She’s been working on voice user interfaces for 20 years, but is still waiting for her computer to be able to have a chat about life, the universe, and everything.

Compute’s Gazette article from 1984 with self-modifying code example
Page 2 of the article

Don’t forget to give us your 👏 !

--

--

UX Lead on Google Gemini. Author of "Designing Voice User Interfaces" from O'Reilly (More at https://cathypearl.com)