I spent a lot of my precious little spare time in college and in the years that followed trying to doodle up a chatbot that was at least entertaining, even if it couldn't be intelligent. The resources I had available were limited though, so it was all parlor tricks.
First iteration, named "IT" was, I shit you not, a BASIC program running on a TRS-80 Model 100. It would dial up to the campus mainframe, log in as me and blindly navigate its way to our home-grown BBS/chat system, which was available to a diverse range of students, not just engineers, researchers doing stats work & chemists.
It watched chat for things like "all / some" * "are / are not" *, and it'd squirrel that away. Every time it saw a new one, it would try to compare it to the ones it already knew and fill in the gaps. If it heard "all socrates are mammals", "all mammals are dogs" ... it would very confidently declare "All socrates are dogs, you know." Problem is, people rarely make declarative statement like that and applying scope & context is really difficult.
Then, I had Newt, written in C, not limited to 32k, running on some version of unix. Huge sets of canned responses he randomly picked from for a pretty large set of triggers. He could also broker a game of hearts (in text, ugh), relay messages to people he knew later if they weren't online and a variety of other functions.
I noticed that any question (a phrase ending in a "?") that lacked the words: "who, what, where, why, when, how" was a question that could be responded to with a 'yes/no/maybe" or be blown off with an insult or reformed as a different question and asked back at the speaker. I went further to change all his many repetitive "I don't understand" style responses to insults and deflections. Made him seem a lot more human to people just meeting him online.
Had a lot of fun trying to turn around sentences like "You'll have your dinner with me and my family, when I've stopped disagreeing with you." into "I'll have my dinner with you and your family, when you've stoped disagreeing with me." Teaching him when swap 'you' with 'me' or 'I' was awful! But it seemed that if there was punctuation after 'you', like a period or comma, you could almost always use 'me' and default to 'I' in all other cases. That got like 80% of the attempts correct, if they were talking to someone that actually used punctuation at all.
I kept trying to make him 'learn' though. Except pronouns were a problem I could not solve simply. The problem with
them was that
he couldn't get
them to match up with the subject
they were referring to." Huge handicap. But one that gave me an idea: If he sees a statement or question without a pronoun... send it as a search to a text based webbrowser/search engine, and scan the results for any statement that also doesn't have pronouns. Then shoot that back into chat.
It was surprisingly effective. Everyone still knew Newt was a total idiot, but once in a while he would say something terse but relevant and insightful that it was absolutely creepy.
I've got a shelf or two full of books on natural language parsing and topics related to chatbots.... but ultimately that 'pronoun problem' was just too much for me to cope with and I finally gave up and lost interest in the project.
