https://sites.google.com/view/elizagen-org/the-original-eliza [ ] Search this site Skip to main content Skip to navigation ELIZAGEN * About * The Original ELIZA * Commonly Known ELIZA Clones * Other ELIZA-like Programs * ELIZA-Related Resources * News * Explorations * SpotTheBot ELIZAGEN * About * The Original ELIZA * Commonly Known ELIZA Clones * Other ELIZA-like Programs * ELIZA-Related Resources * News * Explorations * SpotTheBot * More + About + The Original ELIZA + Commonly Known ELIZA Clones + Other ELIZA-like Programs + ELIZA-Related Resources + News + Explorations + SpotTheBot Joseph Weizenbaum's Original ELIZA Most people who know anything about Joseph Weizenbaum's ELIZA at the level of the program code think that it was written in Lisp and that it has been floating around since the publication of Weizenbaum's 1966 CACM paper. However, surprisingly, the ELIZA program itself was never published, and it wasn't written in Lisp, but in a now-obscure language called MAD-SLIP running on an IBM 7094 computer at MIT. Until now, the ELIZA source code has been missing, presumed by many to be lost, and because many alternate versions have been created over the years, the original source code remained undiscovered. Weizenbaum's ELIZA was intended as a general conversational agent. It interpreted a separate, domain-specific script that determined its style of conversation. The most well-known script is called "DOCTOR". This is the one that carries on the well-known "Rogerian therapist" conversations that appear in Weizenbaum's 1966 paper, and which are most commonly associated with the name "ELIZA." Indeed, the name "ELIZA" has basically come to mean "the ELIZA agent running the DOCTOR script." ELIZA can be seen as the precursor of many of the conversation interfaces and chatbots that we have become so familiar with today, such as Siri, but it worked over a much more clunky typewriter-based console. As Weizenbaum (1967: 475) explains, "From one point of view, an ELIZA script is a program and ELIZA itself an interpreter. From another perspective, ELIZA appears as an actor who must depend on a script for his [sic] lines. The script determines the contextual framework within which ELIZA may be expected to converse plausibly." In Contextual Understanding by Computers (CACM, 1967), he writes: "The first program to which I wish to call attention is a particular member of a family of programs which has come to be known as DOCTOR. The family name of these programs is ELIZA. This name was chosen because these programs, like the Eliza of Pygmalion fame, can be taught to speak increasingly well. DOCTOR causes ELIZA to respond roughly as would certain psychotherapists (Rogerians). ELIZA performs best when its human correspondent is initially instructed to "talk" to it, via the typewriter, of course, just as one would to a psychiatrist." However, only the DOCTOR script appears in the 1966 paper, not the ELIZA code that interprets that script, although the algorithm is described in great detail. The common misconception that ELIZA was originally written in Lisp arose because shortly after the publication of the 1966 paper, Bernie Cosell wrote a version in Lisp, based upon the description of the algorithm in the 1966 paper. Cosell's version used a version of the published script, but he never saw the original ELIZA. The language of the original ELIZA was MAD-SLIP. MAD ("Michigan Algorithm Decoder") was an Algol-like programming language, available on many common large computers at that time. Weizenbaum added list-processing functionality to MAD, creating MAD-SLIP ("Symmetric LIst Processor," Weizenbaum, 1963), a Lisp-like language embedded in MAD. Indeed, adding to the Lisp/MAD-SLIP confusion, the published DOCTOR script, an appendix to the 1966 paper, is parenthesized exactly like a Lisp S-expression, the way one would if one were writing a Lisp program.** Here is a copy of the MAD-SLIP manual from a long, 3-volume 7090 user's guide. (Re)Discovery of the Original ELIZA In hopes of discovering the original source code for ELIZA, I recently went [remote] spelunking in Weizenbaum's archives, held by MIT. I was aided by MIT archivist Myles Crowley. This exploration succeeded spectacularly! We found a set of files labeled "Computer Conversations," and the first file folder we opened included a complete source code listing of ELIZA in MAD-SLIP, with the DOCTOR script attached! I contacted Dr. Weizenbaum's estate for permission to open-source this code, and they granted this permission under a Creative Commons CC0 public domain license. Here is the real true original ELIZA (reading notes, below); You are among the first to see this code in over half a century! [drive-32]ORIGINAL_ELIZA_IN_MAD_SLIP_CC0_For_Resease.pdf Anthony Hay has started to transcribe the core code, here, and I started a translation, based on Anthony's transcription, here. Anthony has also created an annotated version of the core code, here. If others would like to participate in either transcribing or translating the code, let me know and I'll add it to the site and/or link to yours. (Or, I guess, since it's open source, feel free not to let me know, but it'd be great if you made your work public.) I want to thank Myles Crowley, Special Archival Librarian, MIT Libraries, who was my spelunking guide. As well as (alphabetically), David M. Berry (d.m.berry@sussex.ac.uk), Anthony Hay (anthony.hay.1@gmail.com), and Peter Millican (peter.millican@hertford.ox.ac.uk) who studied the code, participated in discussion of the project, and helped to create this page. We all thank the estate of Dr. Joseph Weizenbaum for permitting the original ELIZA to be open-sourced! Pm Weizenbaum was especially helpful in managing the open-sourcing of the code with Dr. Weizenbaum's estate, and in her careful editing of this page. Alex Moss, and others at the Electronic Frontier Foundation helped us think about how to open source the code. 'Jeff Shrager May 23, 2021 References and Resources Weizenbaum, J. (1963). Symmetric List Processor. Communications of the ACM, 6(9), 524-536. Weizenbaum, J. (1966). ELIZA: A computer program for the study of natural language communication between man and machine. Communications of the ACM, 9, 36-45. This paper remains under ACM copyright, and so is inaccessible, except to members or for purchase. However there are numerous versions of the PDF online. Weizenbaum, J. (1967). Contextual Understanding by Computers, Communications of the ACM, Volume 10, Number 8, August, 1967, rtro.de /eliza61 Weizenbaum, J. (1984). Computer Power and Human Reason: From Judgment to Calculation, London: Penguin. Here is a 1961 computer primer for the MAD language, by Elliott Organick. And here's a copy of the MAD-SLIP manual from the 7090 user's guide. An intersting discussion of Weizenbaum's 1976 "Computer Power and Human Reason", that touches many times on ELIZA, can be found here: https://dl.acm.org/doi/pdf/10.1145/1045264.1045265 FORTRAN ASSEMBLY PROGRAM (FAP) for the IBM 709/7090 (Computer History Museum) ** Interesting additional context can be found here: https:// computerhistory.org/blog/ the-promise-of-the-doctor-program-early-ai-at-stanford/ 20220705: ELIZA Code Discovery Featured on CoRecursive Podcast Adam Gordon Bell who creates the CoRecursive Podcast recently interviewed Jeff Shrager (founder of ElizaGen.org) about the discovery of the ELIZA code. He did a great job of turning what started out as two hours of making our work fascinating and mysterious! For fun, here's a short list of mostly minor errors that we've noticed: * Adam confused UPenn with Penn state at one point, but mostly got it right. [This is a common confusion!] * Jeff called the author of the educational version of ELIZA "Paul Howard". His name is really "Paul Hayward". * Adam says at one point that Bernie Cosell worked at Raytheon, and at another point that he worked at BBN. Bernie worked at BBN at the time of the events under discussion; BBN was acquired by Raytheon much later. * Jeff calls one of the missing functions "MATCH"; it's actually "YMATCH". * Adam says that SLIP was written in MAD. Actually, SLIP was what we would now call a package that added list processing functionality to MAD. * Jeff claims that MAD weirdly allows you to abbreviate "END" as "E'D". It's true that MAD permits this sort of abbreviation, but there is no "END" keyword; Jeff appears to be referring to the abbrevviation "E'L" which is used where conditional blocks end, and so could me misinterpreted as an abbreviation for "END", but it's really an abbreviation for "End Conditional". (Not that that make the language any less weird!) * Adam implies that Anthony Hay started working on his C++ ELIZA in order to understand the redicovered MAD-SLIP code. Actually, Anthony had been working on his version for some time before he and Jeff even met. It's true that he improved his version based on the discovered code, and that he was instrumental in understanding what the discovered code did. [Jeff did not make this clear in the interview.] * At the very beginning, Jeff says that in a party of philosophers, he'd probably be a linguist. In fact, Jeff has very little reason to fairly call himself a linguist; it would have made much more sense to call himself a molecular biologist in that setting.) SOME NOTES ON READING THE CODE Note that the ELIZA main program actually starts on page 9 of the PDF (the 4th page of actual MAD-SLIP code), and continues to the end. It is only around 230 lines long. The code before that appears to be a set of sub-functions. To my eye, the code originally looked like gibberish. There are no comments and only a few helpful labels that provide signposts to what's going on. However, once you learn a little about how to read MAD and SLIP, it becomes a bit easier. Here is a 1961 computer primer for the MAD language, by Elliott Organick. And here's a copy of the MAD-SLIP manual from the 7090 user's guide. And just knowing a few abbreviations will help a lot. Most importantly, keywords are abbreviated as follows: W'R WHENEVER (if) O'E OTHERWISE (else) E'L END OF CONDITIONAL (endif) T'O TRANSFER TO (goto) OR W'R OR WHENEVER (else if) T'H