Comment

Comment by masswerk

Regarding Turing completeness: It may be of interest that the "PRE" rule allows us to both alter the tape (the input, we're processing) and to switch rule sets (as we are specifying a distinct rule for reprocessing). As rewriting also allows us to simulate the position of a read/write head (by inserting some reserved characters) and this may be matched by rules, as well, there are all the elements of a Turing machine.

(Notably, this is not the only possible approach to problem solving that may be attempted using ELIZA. E.g., the palindrome problem used as an example in the article, doesn't require multiple sets of rules to incorporate state. We could do it also by simple reduction: If the input is a single letter or exactly two instances of the same letter {"A", "B", "A A", "B B"}, it's a palindrome, output this as the final answer. Else, if the first and the last letter are the same {"A … A", "B … B"}, discard them and redo with the remaining middle part. If this rule fails as well, it's not a palindrome, also a final answer.)

parent masswerk 4 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton