Joseph Weizenbaum wrote ELIZA at MIT in 1964-66. Played with the DOCTOR script, it answers like a Rogerian psychotherapist: it looks for a keyword in what you type, turns your own words around, and asks a question about them. It has no idea what any of it means.
1966 paper script. The DOCTOR script printed in Weizenbaum's article in Communications of the ACM (January 1966). It has more keywords (ALIKE, DREAM, COMPUTER, SORRY, family words, sad and happy words) and the paper's extra mechanisms: a keyword that has nothing more to say hands over to the next one it found (NEWKEY), a sentence can be rewritten before it is handed to another keyword (PRE), and one reply can pass the conversation to another keyword's replies. It reproduces the conversation printed in the paper, up to the memory remark at the end, where ELIZA picks the earlier-remark wording by a hash of the last word that I could only reconstruct approximately.
1965 source printout script. The DOCTOR script exactly as found in the MAD-SLIP source printout in Weizenbaum's papers at MIT. This is the earlier, smaller script, and it needs none of those extras, so some answers are plainer.
The engine handles both. It follows the printed source: keyword ranks, decomposition and reassembly rules that cycle through their replies, the MY memory that brings an earlier remark back every fourth turn, and the same fallback answers. The 7090 had no ? or !, so those count as periods here.
The original code and script were released by Weizenbaum's estate as public domain (CC0). See rupertl/eliza-ctss for the transcribed source and a version that runs it on an emulated 1960s mainframe, and elizagen.org for the history.