Eliza behaves rather like a psychotherapist and was one of the first chatbots ever written.
ELIZA was written at MIT by Joseph Weizenbaum between 1964 and 1966
used as reference. This should be 99% faithful to this version. I removed one bit of text "Do you have any psychological problems?" and added in a token for scratch with some responses.http://cplus.about.com/library/downloads/projects/Eliza/eliza.bas
Thanks to appleinventor for reminding me of this program.