Saturday, May 29, 2021

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 sort of "missing link" between the Fortran/Algol-like languages, and Lisp. 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.


(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!



from Hacker News https://ift.tt/3bZGhfy

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.