Jeff Shrager's BASIC Eliza c. 1973 & 1977

Jeff Shrager created a BASIC version of Eliza in 1973 that appeared in Creative Computing in the July/August issue of 1977:

[1977 BASIC Eliza in Creative Computing]

Shrager actually wrote it in 1973. Although he recalls having seen a copy of the Lisp code much later, his BASIC Eliza was written well before this, and was, to use his own words: "conceptual, and pretty poor." Regardless, 1977 was around the dawning of the era of the personal computer (the Commodore PET, Apple ][, and TRS-80 were all introduced in that year!), and although few folks in the hobbyist community knew Lisp, lots of them knew Basic, so Shrager's Eliza was widely circulated and many knock-offs appeared in many other languages, some as late as 2015. (The latest one I know of is Paco Willers' 2015 GO version.) Shrager's version has even apparently been translated back into Lisp a number of times. Indeed, there are so many near-and-distant knock-offs of this program floating around that it would be pointless to try to assign any sort of Creative Commons, or otherwise, license to it.

The version published in CC in 1977 was under CC editor Steve North's byline, but Shrager is correctly attributed as the author in the comments.

This alternative publication:

[1984 BASIC Eliza in Big Computer Games]

gives the correct year of creation of the program as 1973.

Note that North's text incorrectly attributes the Lisp Eliza to Joseph Weizenbaum, whereas it was actually written by Bernie Cosell (see above). This was, and continues to be, a common mistake.

Paco Willers has undertaken a detailed, nearly line-by-line, deconstruction of the Shrager/North 1973/1977 BASIC code.

If you have an iPhone or iPad and are seeking immediate Eliza gratification, check out "iAltair", a MITS Altair 8800 CP/M simulator that comes with a copy of ELIZA.BAS, adapted directly from the Creative Computing version.

Check it out:

Richard Stallman's GNU EMACS "Doctor"

The code for the GNU EMACS "doctor" can be found in the GNU EMACS repo, currently:

It begins:

;;; doctor.el --- psychological help for frustrated users
;; Copyright (C) 1985, 1987, 1994, 1996, 2000-2013 Free Software
;; Foundation, Inc.
;; Maintainer: FSF
;; Keywords: games
;;; Commentary:
;; The single entry point `doctor', simulates a Rogerian analyst using
;; phrase-production techniques similar to the classic ELIZA demonstration
;; of pseudo-AI.

It was most likely written by Richard Stallman. Note this subset of code:

(set (make-local-variable 'doctor--stallmanlst)
'(((doc$ doctor--describe) your (doc$ doctor--feelings-about) him \.)
((doc$ doctor--areyou) a friend of Stallman \?)
((doc$ doctor--bother) Stallman is (doc$ doctor--random-adjective) \?)
((doc$ doctor--ibelieve) you are (doc$ doctor--afraidof) him \.)))

It claims to use techniques "similar to the classic Eliza", but doesn't say whether it is based upon Cosell's Lisp code or Weizenbaum's paper. Although it is unknown whether Stallman actually saw Cosell's version, it's pretty likely that he did, being a Lisp hacker and at MIT around the time that the Lisp version would have been making the rounds.

Various other Elizas

If you know of open source Elizas in any language roaming around, please send me links or code so that I can add them to this section.

Anthony Hay has built what he believes is an implementation in C++ of ELIZA that attempts to be as close to the original as possible: It was made to closely follow Joseph Weizenbaum’s description of his program given in his January 1966 Communications of the ACM paper. It is controlled by a script identical to the one given in the appendix to that paper. When given the prompts that begin “Men are all alike” it gives back the identical responses and recreates the exact conversation from the paper.

Steve Cherry's 1982 Lisp Eliza

[Okay, this is crazy: Cherry's version of Eliza appears in a book called "Learning Lisp", which was an imprint of the manual for an Apple ][ Lisp, written by Cherry, called PLisp. Cherry's Eliza seems mostly based upon Shrager's 1973/1977 BASIC Eliza. (It has essentially the same key and response structure as Shrager's, but has a priority system, a ittle like Cosell's. So it's not a direct translation, but is pretty close.) Shrager's Eliza had been ported to an Apple ][ at some point, so Cherry would definately have had it close to hand. Anyway, so bear with me here now: Cherry's PLisp manual was actually a port of a Lisp textbook written by Shrager and a friend (Steve Bagley) in about 1979. (See the preface to Learning Lisp). HOWEVER, Shrager and Bagley's book didn't include an Eliza !! Cherry apparently added it for either the PLisp user's manual, or later for the imprinted book version of that manual. What this means is that Cherry, probably unknowingly, borrowed (fairly directly) Shrager's BASIC Eliza, which was itself borrowed (indirectly) by Shrager from a Lisp program, back into a different Lisp program to appear in a manual/book on Lisp originally co-authored by Shrager, who wrote the original (BASIC) Eliza that Cherry based his Lisp Eliza on ... Confusing enough for you!?]

→ This amazing Eliza in gnuCOBOL was written by Arnold J. Trembley. It's a slightly indirect translation of Shrager's 1973/1977 BASIC version. The most amazing part of this (to me) is that it was written in 2017! Mr. Trembley's web site contains links to gnuCOBOL compilers and other fun stuff.

→ TRS-80 Assembly Version (based on the CC Basic -- contributed 2015-11-22 by John D.): Cassette program An emulator that lets you just load the "cas" file directly The original instructions And here's a YouTube video of a real TRS-80 with the Voice Synthesizer, running Talking Eliza.

→ The disk image of Michael Wessel's German BASIC Eliza:, which can be run using the CPC Emulator in Javascript running in the Browser, here: (Choose configuration "464", Select the Eliza DSK file, extracted from above, use: "DRIVE A:", When the CPC boots up, enter "cat", Enter: RUN "ELISA-NS")

→ Paco Willers had written a GO version of the classic BASIC Eliza, but his code is lost to history.

Tcl Eliza, possibly by Gerry Snyder (explicitly inspired by the BASIC version)'s Eliza Chat Bot in js(directly based on the BASIC version)

Eliza in Gawk by Juergen Kahrs (directly based on the BASIC version)

Benjamin Ryves's Eliza in TI-83/84 Plus Assembly (based on the BASIC version)

Charles Hayden's Eliza java applet (claims to be a faithful implementation of Weizenbaum's).

→ Peter Millican built a chatbot designer, called Elizabeth, while teaching Computing and Philosophy at Leeds. Here's the latest version:, and learning materials: