|
|
Member
Total posts: 19
Joined: May 6, 2011
|
Hi All,
I’ve always wanted to write a chatbot, since first seeing a version of Eliza back in the 1980s. Studied AI at Clark University with a particular interest in NLP (grad. 1985). Did grad work in philosophy. Only worked in programming a couple years, but always kept a hand in as a hobby.
I did actually write a chatbot in 1986, while working at Radio Shack. Wrote the whole think in BASIC on a TRS-80 on the job. It was an insult bot that just looked for standard insult patterns (“You X.” “Go X.” etc.) and responded with simple transforms and insertion of insults generated from random lists of adjectives and nouns. The bot would only swear at the user if the user swore first. The best line the bot ever came up with was in response to my manager:
MANAGER: I bet you have a small penis.
BOT: No one ever tells me I have a small penis. You’re a dead motherf’er.
Anyway, after a 25-year hiatus, I’m giving it another shot. This time, I’ve got a more ambitious idea. I’m writing a philosophy chatbot (my true love) named STU (solve the universe). I’m working in Javascript for easy integration with my webpage once I get something together.
So far, my focus has been on setting up maximally flexible structures that will allow me to search user input for various patterns, e.g. “I THINK (that) X.” where THINK is some synonym of the word “think” and (that) is optional, etc. At the same time, I’m setting up an output pattern language that will mix and match various parts of speech to ensure variety of response. Finally, I’m doing the gruntwork of various necessary transforms like switching “I” to “you” in all its manifestations, negating sentences or making negative sentences positive, and inverting questions to statements properly.
So far I’m making decent progress. Once all the basics are in place, I will begin to focus on a database of specific topics of philosophical interest and their associated keywords (e.g., truth, beauty, God, etc.). I hope to keep track of the user’s assumptions, deductions, beliefs, etc. and use these to ultimately have a real philosophical conversation ...
Here is a snippet I just ran with STU:
STU: Hello. Perhaps together we can solve the universe! Why don’t you start?
ME: i think chatbots are the wave of the future. what do u think
STU: I’ve often thought chatbots are the wave of the future. But is it an unusual notion or something more?
ME: Something more.
STU: Hume didn’t believe that.
ME: Is he the one who believed everything was in our minds?
STU: Nay he is not the one who believed everything was in our minds.
ME: Are you sure?
STU: Maybe I am sure.
ME: Quit.
STU: Thank you. I will meditate on all that has been said.
|
|
|
|
|
Posted: May 6, 2011 |
[ # 1 ]
|
|
Senior member
Total posts: 623
Joined: Aug 24, 2010
|
Hi Eulalio, welcome to the forum!
Your project sounds interesting. Chatbots seem to show the most success when they stick to a concentrated field of expertise. Certainly philosophy (and human nature!) could make for interesting discussion with a machine. Does your bot draw from a knowledge base of opinions of various philosophers? For example, how did STU decide “Hume didn’t believe that.”
|
|
|
|
|
Posted: May 6, 2011 |
[ # 2 ]
|
|
Member
Total posts: 19
Joined: May 6, 2011
|
Hi, CR, good to know you.
No, my bot has no database at all yet, just a lot of structures that I’ve only begun to fill in the details for. The “Hume” response was random except that the input was recognized as statement rather than question. The real work will begin once I get a lot of the pattern-matching and grammar-transform material in place. ...
|
|
|
|
|
Posted: May 6, 2011 |
[ # 3 ]
|
|
Administrator
Total posts: 3111
Joined: Jun 14, 2010
|
Hello, Eulalio, and welcome!
Given that you’re working in JavaScript, you may want to discuss your ideas with Merlin, who has written a chatbot framework called JAIL (JavaScript Artificial Intelligence Language). I’m sure that some meaningful dialog would result.
Once you get a functioning bot together, send me an email, and I’ll be more than happy to set up a conversation between STU and my bot, Morti. He’s a bit quirky, but he’s a lot of fun.
|
|
|
|
|
Posted: May 6, 2011 |
[ # 4 ]
|
|
Member
Total posts: 19
Joined: May 6, 2011
|
Hello, Dave ... (bet you get that a lot, at least here
Yes, I’ve been wondering about these chatbot frameworks that others have written. How flexible are they? Do they have large, pre-loaded dictionaries? What sort of functions and options they have for coding grammar rules, setting up databases, looking for patterns in input, etc. Are most of the users here using these systems for their chatbots?
I chose to program my own project to maintain maximum flexibility and also to gain the experience of directly wrestling with all the (infinite) problems associated with NLP. Anyway, I hope to have something moderately functional in perhaps six months. At that point, I’ll certainly be interested in getting feedback from the folks (and the bots) here.
Eulalio
|
|
|
|
|
Posted: May 6, 2011 |
[ # 5 ]
|
|
Administrator
Total posts: 3111
Joined: Jun 14, 2010
|
Eulalio Paul Cane - May 6, 2011: Hello, Dave ... (bet you get that a lot, at least here
Surprisingly, you’re the first to say that here (at least, that I’ve noticed). But I get that every time my computer starts up, and the main error sound is HAL saying, “I’m afraid I can’t do that, Dave.” My alarm clock is also on my computer, “reading” a script, using TTS, and Loquendo’s Elizabeth female voice. It sounds rather sultry, and it’s the most “human” voice I’ve heard so far. “she” tells me, “It’s time to get your lazy butt out of bed”.
As to chatbot frameworks, I’m only directly familiar with the two platforms that I’ve already used, and both are “simple” pattern matching AI engines. Victor Shulist has a project that he’s working on, called CLUES, that is focused on using grammar to analyze user input and create output. It uses (to my knowledge) no “real world” database, per se. Other members who have projects that you might find interesting ar CR Hunt’s ALEX, Jan Bogaerts’ AICI, and Hans Peter Willems’ ASTRID project. I’m confident that you’ll find some useful insights with each project.
|
|
|
|
|
Posted: May 7, 2011 |
[ # 6 ]
|
|
Member
Total posts: 19
Joined: May 6, 2011
|
Thanks for the info, Dave. I’m particularly interested in how different people handle different NLP problems, whether grammatical, semantic, or contextual. The complexity of even the simplest bot are really astounding. For every item I cross off my to-do list, I add four others (literally). But, I get such a kick out of when STU says something unexpected and vaguely intelligent, it’s really like nothing else. I guess that’s what brings us together here.
The other reason I joined this website is in the hopes that by chatting a bit with other chatbot nerds, it would help me stay energized during the sometimes long periods of reworking large sections of code or tracking down bugs, etc.
So, are ALEX, AICI, and/or ASTRID programmed in framework languages or from scratch (what language)?
|
|
|
|
|
Posted: May 7, 2011 |
[ # 7 ]
|
|
Senior member
Total posts: 623
Joined: Aug 24, 2010
|
I’m using python for ALEX. Everything is written from scratch, except that I utilize WordNet as a dictionary. Victor began CLUES in Perl but has switched over to C++. ASTRID is still in the design stages, but Hans is planning to write it from scratch, if I understand correctly.
Most of these projects have their own topics in the My Chatbot Project section of the forum. I encourage you to check them out!
I’m currently in the process of “reworking large sections of code” (ugh!) and definitely this forum can be invigorating when slogging through code gets you down. Perhaps I’ll post an update soon in the ALEX thread…
|
|
|
|
|
Posted: May 7, 2011 |
[ # 8 ]
|
|
Guru
Total posts: 1081
Joined: Dec 17, 2010
|
As Dave mentioned, I have written a chatbot framework called JAIL (JavaScript Artificial Intelligence Language). I used it to create Skynet-AI.
The framework adds functionality to Javascript that makes it easier to create and manage the AI.
It uses Neurons (Regular Expression Triggers & Responses) to take input and generate output.
|
|
|
|
|
Posted: May 7, 2011 |
[ # 9 ]
|
|
Member
Total posts: 19
Joined: May 6, 2011
|
Hey, CR and Merlin,
CR, I’ve never worked in Python or Perl, but have plenty of C++ and LISP experience in the past. What do you think of Python for NLP? I chose Javascript because of the ease of putting up a finished product on my webpage so people can test it directly without having to download or compile anything, etc. (all my home machines run Linux).
I do worry that I may run into trouble eventually because JS isn’t really modular enough to handle such a large project. However, I’ve tried very hard to program as carefully and structured-ly as possible, including a large separate file to keep track of all my functions and variables. At some point, once I have my structures in place, programming should be almost entirely about setting patterns for input and output (I have little sub-languages within my code for allowing maximum variability and randomness for each).
Anyway, I’ll check out your projects under your own threads and see what there is to see.
Thanks again for the feedback. It’s a nice break (just finished several hours coding related to switching between verb forms).
|
|
|
|
|
Posted: May 8, 2011 |
[ # 10 ]
|
|
Senior member
Total posts: 623
Joined: Aug 24, 2010
|
Python is amazing for string handling, which is why I chose it. Though Javascript definitely has the upperhand when it comes to website integration.
|
|
|
|
|
Posted: Nov 25, 2011 |
[ # 11 ]
|
|
Member
Total posts: 19
Joined: May 6, 2011
|
Dear Fellow Chatbottists,
My apologies for my long absence. I have been involved in a work project for the past 6 months or so that has left me literally no time for anything. Thankfully, that project (website design-related, utterly boring) finally wrapped up at the end of October. I’ve spent the last few weeks catching up on everything in my life that needed catching up on. And now, I look forward to a long well-earned period of doing what I want to do (at least 6 months, I hope).
So, I pulled out my STU notes a few days ago to see where I stood. As I mentioned previously, I had been working in Javascript. Upon examining what I had done and where I had gotten to, I realized that ultimately Javascript will not be up to the task. The simple fact of essentially disallowing multiple files is bad enough. But the lack of rigid structure and localization, along with a fairly weak object system, just aren’t going to cut it for a project as large as this.
So, I’m taking advantage of the fresh start to transfer what I’ve done to C++ (I work in g++, the Gnu implementation for Linux boxes—it’s a fantastic, opensource system!!!). Naturally, I’ll be reworking just about every detail of what I had already done—is one really ever content with a program?
I have a couple of questions right off: (1) Does anyone have experience porting C++ programs into websites? (2) I recently noticed these sites that offer free voice avatars. Does anyone have experience integrating those with C++ programs or with websites?
P.S. I’ll be scanning the other threads to see what everyone else has been up to. Hope all are well and productive (in the fun sense, not so much the work sense).
|
|
|
|
|
Posted: Nov 26, 2011 |
[ # 12 ]
|
|
Senior member
Total posts: 250
Joined: Oct 29, 2011
|
Hello EPC
I am fairly new here myself, so I was not around when you originally posted. I am also working on building my own chat it from scratch using Ruby/JS for much of the front end processing, my project “my Marie”, is to be an Internet Assistant bot that will surf the web for information, assist in online purchases and play an online host for general chatting and fun. Creating your own framework is indeed very challeging. I have restructured mine several times as I have reached road blocks with some of the limitations of using client side scripting. However, it has proved both challeging and rewarding developing new and innovative techniques.
This has been my first project of this type, since my prior experience has been working on large enterprise systems. This has been a real change of pace and much more enjoyable. I find the field of AI very fascinating, and I look forward to interacting with your STU bot as well. My Marie should be ready for public beta in late January or early Feburary.
|
|
|
|
|
Posted: Nov 26, 2011 |
[ # 13 ]
|
|
Member
Total posts: 19
Joined: May 6, 2011
|
Laura Patterson - Nov 26, 2011: Hello EPC
I am fairly new here myself, so I was not around when you originally posted. I am also working on building my own chat it from scratch using Ruby/JS for much of the front end processing, my project “my Marie”, is to be an Internet Assistant bot that will surf the web for information, assist in online purchases and play an online host for general chatting and fun. Creating your own framework is indeed very challeging. I have restructured mine several times as I have reached road blocks with some of the limitations of using client side scripting. However, it has proved both challeging and rewarding developing new and innovative techniques.
This has been my first project of this type, since my prior experience has been working on large enterprise systems. This has been a real change of pace and much more enjoyable. I find the field of AI very fascinating, and I look forward to interacting with your STU bot as well. My Marie should be ready for public beta in late January or early Feburary.
Hey, Laura, good to know you. AI is indeed fascinating and, IMHO, natural language processing is the crown jewel of the field. The deeper you go into this rabbit hole, the more weird it gets. Which is why even some of the best attempts at NLP still often come across as crude and simplistic despite monumental programming efforts. One major slip-up by a program and the illusion of talking to an intelligent being is shattered. What a challenge for the few, the proud, the chatbotters!
|
|
|
|