I got DR. CHALLENGER working last night! It's an ancient chatbot that is a simulation of an interactive Rogerian non-directive psychotherapist. I wrote it in 1979, inspired by ELIZA.

Last night I first got it to run on the phone in an app that emulates Commodore BASIC from the late 70's, then online, in an Apple II BASIC emulator. (There is a description of DR. CHALLENGER and the 1978 computer it was written on in my article about AI here).

Dr. CHALLENGER running on an iPhone

DR. CHALLENGER running in an Apple II online BASIC emulator

The online version was very helpful in debugging the program and finding syntax errors that arose from the OCR process (Optical Character Recognition – the way I used software to get the old text printout scanned and into the new computer as text, without entering it by hand).

The other night, after yet agin searching high and low in the house and on my computer hard drives, I ran across a thin file folder tucked away behind other files:  “COMPUTER SCI” was written on it, and inside were two stapled-together printouts of the program.

Years ago I had laboriously transcribed DR. CHALLENGER line by line, by loading it into the old Ohio Scientific (OSI) Challenger 1P computer from a cassette tape, then showing sections of it (the display technology of that computer could only show 25-by-25 characters at a time on a display) and typing them into another computer. It was then printed onto typewriter paper with a daisywheel printer, probably at my brothers office in the 80s (IBM PC days).

It now resides in a file on my Mac in Sublime Text 2, the text editor that programmers use these days.
Amazing to be running this ancient program on modern tools, and fun to be editing and debugging it with such convenience, and cross platform. Running Dr. on my phone is just crazy: I never would have imagined I’d be doing that, almost 40 years later (2018 - 1979 = 39).

It was also fortunate that both of these apps - cbmHandBasic on the iPhone and AppleSoft BASIC in Javascript online at a website – allow one to upload a file and run it, because it would have taken way too long and be too cumbersome to try and type in the DR. CHALLENGER. The program is 430 lines long, and some lines have multiple statements.

The reason these interpreters will run my program is that they are both emulators of the same 6502-based BASIC, which is a BASIC interpreter written by Microsoft – Bill Gates and his friend Paul Allen did it themselves. In fact this is the earliest known software written by Microsoft, and has some funny sayings and comments, interesting historical comments, and sneaky Easter eggs in the code that Bill Gates put in there to try and catch anyone claiming it was their own product.

This BASIC was used in several of the very first personal computers, including the Commodore Pet (where I saw the ELIZA program running that inspired the creation of DR. CHALLENGER), the Apple II, and the Ohio Scientific (OSI) models (the computer I had).

Posted in ,


Leave a Comment