a frogELIZA

therapist chatbot from the 1960s

ok so i only have a very basic understanding of it from skimming the book "Inventing ELIZA" (MIT press 2026) but its pretty interesting. i dont know how accurate any of this. please dont use this as a source, instead red the aforementioned book, u can download it for free as a pdf on the website

im not gonna go into too much detail but there are two programs

eliza was written in some weird language idk and doctor was an s-expression DSL

heres a rule from the doctor program

(if 3
   ((0 if 0)
      (do you think its likely that 3)
      (do you wish that 3)
      (what do you think about 3)
      (really, 2 3)))

if 3 is the keyword that matches the rule and the priority of it.

the (0 if 0) is pattern matching on the input, 0 stands for any amount of words.

(do you think its likely that 3) is the response. 3 is replaced by the third (group of) word from the matched pattern

so if theres an input like "what if the sun was green" the if ketword will be matched (assuming there arent any higher priority rules). then the patern (0 if 0) will be matched and parsed into ["what", "if", "the sun was green"]. then the response could be "do you think its likely the sun was green"

idk i think its interesting. i wanna try and make a chatbot hehe. definitely making it different cuz this one is made to repeat the users words back at them in an intelligent sounding way. but i could definitely take inspiration from how it works

freaky name shenanigans idf ignore ts plz lol

eliza azile

ezila re:alize