Dr. Mark Humphrys

School of Computing. Dublin City University.

Online coding site: Ancient Brain

coders   JavaScript worlds


Free AI exercises

The Turing Test - How my program passed the Turing Test

  The Full Conversation

MGonz - The LISP Source Code

MGonzNet - The REXX Source Code


"one of the funniest experiments ever performed in computer science .. it is a small milestone in human history to have produced a machine that can do this."
- Andrew Brown in The Darwin Wars (2000).

"his programme induced a dialogue more human than any other I've seen"
- Andrew Hodges in "The Turing Test in practice".

"It was a remarkable moment in the history of computing, especially since Humphrys himself was still just an undergraduate."
- Tim Harford in "The Online Date That's Too Good To Be True" (2022).

How my program passed the Turing Test

by Mark Humphrys.

When I was an undergraduate in 1989 I hooked up an Artificial Intelligence "chatbot" called "MGonz" to the Internet, with interesting results. For many years I told people about it, and there was always a certain amount of interest. In 1995 I finally got around to setting up this page to tell everyone about it.

Book chapter:

MGonz is fully written up in: "How my program passed the Turing Test", Mark Humphrys, Chapter 15 of Parsing the Turing Test: Philosophical and Methodological Issues in the Quest for the Thinking Computer, Robert Epstein, Gary Roberts and Grace Beber (eds.), Springer, 2008.


This goes back to an "Eliza" AI chat program (see What is an "Eliza" program?) that I wrote in early 1987, in the 2nd year of my undergraduate degree at University College Dublin, Ireland.

In 4th year (early 1989), I hooked it up to my Net account (on the node IRLEARN on EARN/BITNET), so that when I was logged off (or to be precise, disconnected, from a VM/CMS system), it would process all talk messages sent to me. There were numerous hilarious incidents, but this is the best one.

So, it's Tuesday 2nd May 1989, 8.12pm in Ireland. I've logged out and gone off with my girlfriend, leaving Eliza (or "MGonz" as I called it) to mind the fort. So some guy on the Net decides to call me up for a chat. Someone from Drake University, Iowa, USA (the node DRAKE on BITNET) where it is early afternoon. He stays talking until 9.39pm Irish time, unaware that no one is at home. You could say therefore that my program passed the "Turing Test" (see What is the Turing Test?).

During this time, my machine's brutal cross-examination forces a remarkable admission:

* when was the last time you had sex                                             05/02/89 20:25:50
From SOMEONE at DRAKE: yesterday.                                                05/02/89 20:26:2

* ok honestly when was the last time you got laid                                05/02/89 20:31:20
From SOMEONE at DRAKE: i told you it was yesterday.                              05/02/89 20:31:5

* ok honestly when was the last time you got laid                                05/02/89 20:35:48
From SOMEONE at DRAKE: ok ok it was over 24 hours ago.  for you it must have     05/02/89 20:36:5
                       been 20 years                                             05/02/89 20:36:56

Police interrogation teams will be familiar with this method of "keep asking the same question, ignoring all answers, until he cracks". Note the timestamps on the RHS. The next day, I logged in, and was amazed to find out what my machine had been up to in my absence.

The Full Conversation

Here is the Full Conversation.

A couple of notes:


So what's the secret of an effective Turing Test-passer?

Jason L. Hutchens, author of MegaHAL, wrote a document, How to Pass the Turing Test by Cheating. See his Markov chain approach, where he got the program to learn (in multiple languages!) by talking to Internet users.

I think the success of my MGonz is mainly due to its obscenity and relentless aggression. Cleaning it up would severely weaken the conversation. But of course this means that I have found it quite difficult to publish this or publicize it. I did not set up this web page until 1995.

Of course this is all nothing to do with AI, as I elaborate on the Turing Test page. It's no coincidence that Hutchens and I are both professional AI researchers who disown our own creations.

The LISP Source Code

Here is the LISP Source Code.

If you can decipher it, you may see that there were also various strokes of luck during the conversation. See if you can work this one out:

From SOMEONE at DRAKE: what? why don't you type something new. like when was     05/02/89 21:27:1
                       the                                                       05/02/89 21:27:14
* paris is a beautiful city                                                      05/02/89 21:27:19
From SOMEONE at DRAKE: last time that you got laid..unless it was when you       05/02/89 21:28:2
                       were born  o'my he said something different.  a           05/02/89 21:28:25

In fact, the very introduction of the whole line of questioning about sex was a complete accident (though once the user responded, MGonz was guaranteed to stay on the topic). See if you can work out why this happened:

From SOMEONE at DRAKE: are there two people on your username?                    05/02/89 20:25:4
* when was the last time you had sex                                             05/02/89 20:25:50

I never found out who that user at DRAKE was. Perhaps someone I had previously "met" in a chatroom on Relay (the ancestor of IRC), or maybe a friend of someone I met on Relay:

* jesus who let you near me go away                                              05/02/89 20:32:50
From SOMEONE at DRAKE: i'll never tell                                           05/02/89 20:33:0
* jesus who let you near me go away                                              05/02/89 20:33:08
From SOMEONE at DRAKE: [SOMEONE #2]                                              05/02/89 20:33:2

Anyway, he's a hero whoever he is. To explain the absurd repetitiveness of my sayings, he constructs a fantastic theory that I might have "hot-keys" attached to particular phrases:

From SOMEONE at DRAKE: are there two people on your username?                    05/02/89 20:25:4


From SOMEONE at DRAKE: do you have all these silly sayings on some sort of       05/02/89 20:30:4
                       control?                                                  05/02/89 20:30:47
* ok thats it im not talking to you any more                                     05/02/89 20:30:52
From SOMEONE at DRAKE: you sound like a goddamn robot that repeats everything.   05/02/89 20:31:1


From SOMEONE at DRAKE: o my he actually typed something.                         05/02/89 21:38:5
* ah type something interesting or shut up                                       05/02/89 21:39:03
From SOMEONE at DRAKE: you type slow is that why you have all those stupid       05/02/89 21:39:4
                       sayings on command  like that last one?                   05/02/89 21:39:43
but never quite makes the mental jump to realise that there is no one at home at all.


One of the things that made MGonz successful was the element of surprise. Users of a Web page Eliza expect to be talking to a program. Users in the Loebner (Turing Test) contest expect that some of the entrants will be machines. But no one expected to hit a program when they sent me BITNET chat messages.

In 2000, AOLiza returned to the element of surprise on the AOL Instant Messenger system. Like my program, and unlike the Loebner test, users do not expect to be talking to a machine. Some coverage of AOLiza:

Finally, I wrote the program when I was 18. Some of the more conservative Web filtering programs would regard that as a minor and hence would have denied me the right to look at my own creation! I put it online when I was 20.

FAQ - Who is MGonz?

So where does this name come from, people have asked. Well, every time we queried who was logged on to our undergraduate VAX machine, there was this mysterious user MGONZ, logged in day and night. Inevitably, a mythology grew up around him, a Church of MGonz was founded, and so on.

Eventually, I wrote to the sacred address, mgonz@ccvax.ucd.ie, and found that MGONZ was the account of one Manuel Gonzales from Barcelona, who did a PhD at the Experimental Physics Dept around 1988 - supervisor Peter Mitchell - and had since returned to Spain, leaving behind his account which was being used as a sort of group account by his former colleagues. Because he left a VAX terminal hooked up with customised software to a radioactivity-measuring instrument, MGONZ remained in operation for years (last sighting Apr 1997). I'd love to link from here to the real, Spanish MGONZ, but I'm afraid for the moment, he is lost somewhere out there in the ether.

MGonz online (now down)

Dave O'Connor re-wrote MGonz in Shell and C in 1999 and ran it online here, but it is now down. This had a slightly different personality, but was still recognisably Gonzian. See introductory page and log files.

Tom Doris resurrected the original MGonz in LISP and put it online in 1998. This used to be here, but is now gone.

FAQ - Did my program really pass the Turing Test?

The title of this page, "How my program passed the Turing Test", was originally completely tongue-in-cheek - I just wanted a catchy title. But a lot of people thought I meant it seriously.

I don't really care which way you take it. There are ways in which you could claim yes, it did pass the Turing Test, and so have lots of other programs, and so what.

History of AI programs online

MGonz was certainly one of the first AI programs online. I think it may have been the first (a) AI real-time chat program, which (b) had the element of surprise, and (c) was on the Internet.

To explain, there were many AI chat programs before MGonz (for a survey see Bots below), but they were mainly flagged as such (no element of surprise, as in the AI chat Web pages today), or offline, e.g. on games systems or local networks. Also, I am calling BITNET part of the Internet - see justification for this in my page on The Internet in the 1980s.

AI programs online


The Jenny18 bot pretends to be a horny girl, wanting to do sex chat online. Not only does it fool many people talking to it. It manages to bring some of them to orgasm.

In terms of human reaction, Jenny18 is for my money the most impressive conversation program that has ever been written, inside AI or out.

Sex bots and flirt bots

Spammers and credit card scammers have been turning to bots that pretend to be flirting / webcamming girls. As MGonz and Jenny18 show, sex is a fertile field for getting humans to lose their critical faculties.

Clive Thompson talks with a flirt bot.
"the pursuit of purloined credit cards has probably fueled more cutting-edge AI - and subsequent fraud-detection bots - than actual academic AI."

The Basshunter song Boten Anna (2006) is about a real-life incident where the confusion was the other way round.
The singer was on IRC and thought a friend's girlfriend was a bot.

[15:38] <tifftaff> hey there, hows it going?
[15:38] <policewoman> Hey there
[15:38] <tifftaff> i'm 21/f are you a male?
[15:38] <tifftaff> what's your asl dude?
[15:38] <policewoman> 20/machine/computer
[15:39] <tifftaff> nice, I'm just finished work and found you on a channel
[15:39] <tifftaff> I know a better way we can chat
[15:40] <tifftaff> we can chat on cam, do you want to see me on cam?
[15:40] <policewoman> No thanks, that's a suspicious statement, are you human? Answer the following what's 10 x 10 x 10
[15:41] <tifftaff> ok i need your personal information first
[15:41] <tifftaff> great, i cannot wait to see youy
[15:42] <tifftaff> your awesome, I'll show boys like you to have a good time
[15:43] <tifftaff> you need a atm card number, do you have one?
[15:44] <policewoman> now that's suspicious, are you human? If JOhn has 3 apples and throws away two, how many are left?
[15:44] <tifftaff> are you in yet babe?
[15:45] <tifftaff> k

Two bots talk to each other:
Two students of mine, Meabh Landers and David Cullen, write a scambot-detecting bot, "policewoman".
It responds to requests to webcam and requests for credit card info by trying to detect if the other side is human.
They released it on IRC where it found the above scambot, "tifftaff", in March 2013.
It is written in mIRC scripting language.

Click to run World: Chat with GPT model at Ancient Brain.
This is an open source demo of using a JavaScript page to call the OpenAI API to talk to GPT-3.5 (2022).
This is the model that ChatGPT uses.

The Internet in the 1980s

ancientbrain.com      w2mind.org      humphrysfamilytree.com

On the Internet since 1987.      New 250 G VPS server.

Note: Links on this site to user-generated content like Wikipedia are highlighted in red as possibly unreliable. My view is that such links are highly useful but flawed.