AI Zone Admin Forum Add your forum

NEWS: Chatbots.org survey on 3000 US and UK consumers shows it is time for chatbot integration in customer service!read more..

Hi everyone!
 
 

First of all, I would like to thank everyone for this incredible site and forum. There is have so much interesting content here that I don’t know If I’ll ever get to be up-to-date with everything!

As many of the users of this site, from what I have seen, I’m currently creating a chatbot. His name is Martin and my particular take on creating a bot is to make him able to act as a personal assistant/talking diary. I think that one of the main issues of many bots is the lack of context. When we speak to human beings in the real world, we usually talk about common ongoing interests, such as work or studies (with our colleagues), sports, movies, boys/girls, etc. I thought that it would be interesting to create a bot particularly interested in someone’s daily life: movies, people, and all that “tell-me-about-your-day” things.

I also wanted to make the bot really useful, so I have included several features for that purpose. For instance, he can remind about bithdays/appointments/anniversaries and he can also keep track of how the money is spent. I know that there are specific apps to do this, but I think that in order to do all of these things, it would be necessary to use quite a bunch of them. I like the idea of a single way to do everything using simply the human language.

Martin is not a conventional assistant like Siri (at least, I don’t want him to be like that!), because I think that most of those assistants are mainly passive and I want Martin to be a bit more proactive and less politically correct. I would like him to be more friendly and bold enough to tell you the “ugly truth” instead of simply following your orders like a slave. When I said at the beginning that I wanted Marting to be a personal assistant, I mean a human personal assistant. I’m not a movie star or the like, so I have never had one and I don’t really know what they exactly do, but I guess that they do a lot to make life easier to the people they work for, and many of those things surely it won’t be just taking care of the appointments. I think that using computers to be able to provide everyone that kind of help could be great.

In order to create Martin, I have developed a pair of new languages (one for encoding the rules and another for taking care of the processing). I really like some things of both AIML and ChatScript, but I found that neither of them was really adequate for Martin. Many of the features of Martin imply interacting with a long/short term memory and I don’t think that this can be easily done using AIML and ChatScript.

While this project in an early phase, I have already created a prototype, which I have using for more than a year. To be honest, it’s still way too robotic and stiff, but I think that it’s useful. At least for me, he helps me remember many things and he’s especially good for that kind of things that I don’t know how to classify. For instance, the movies that I have seen, the books that I want to read, the place where I left something, etc.

As I have said, Martin was too robotic, so I added him a corpora-based chat module. With this module, I can extract the dialogs from any novel to provide an answer whenever Martin can’t find a better matching rule. Of course, this system has many flaws, but it’s funny and sometimes provides surprisingly adeaquate answers, which I find more pleasing and refreshing that the usual Eliza-type answers.

I haven’t still posted any code or rules on the Internet, mainly because I think that it’s not still good enough and, honestly, I don’t know if it would ever be. However, if anyone is interested on this approach or can provide me any suggestion, I will be truly delighted to know it!

Well, I think that this post has become extremely long, but there were so many things that wanted to share!

Best regards to everyone,

Jose

 

 
  [ # 1 ]

Welcome Jose,
What programming language are you using to develop your bot?

I would be interested in hearing more about your corpora based chat module. I have done some similar things but have yet to integrate it in a chat bot.

 

 
  [ # 2 ]

Hi Jose,

Well, in my opinion, you could have a standalone chatbot version of Martin which runs locally on your computer.  Then you could perhaps develop a second web based ALPHA version under a different code name, such as “Martin ALPHA”. Written in PHP or Perl, as a suggestion and SQLite or MySQL as a database suggestion (there are other DB choices too).  JavaScript with XML or JSON is also an excellent suggestion. 

Python may be exciting for A.I. with its NLTK, but may seem to respond slower online, unless some optimisation is applied.  Java may be powerful, but it seems to be in a rush to become deprecated, so it can stop running to throw errors.  ASP.NET may run beautiful for online A.I. but the running cost for Windows server web based chatbots may tend to be higher. 

Please note, there may be exceptions to my opinion, since prices, options, versions, solutions and other things are constantly changing online. Always check for the latest and greatest. My entire discussion here is informal and intended to share with hobbyists, a snapshot of some of my general impressions, for running a chatbot online in a technical sense. 

Good luck with your new chatbot, Jose.

 

 
  [ # 3 ]
Merlin - Jun 27, 2014:

Welcome Jose,
What programming language are you using to develop your bot?

I would be interested in hearing more about your corpora based chat module. I have done some similar things but have yet to integrate it in a chat bot.

Hi Merlin,

I have developed Martin in Java, using Netbeans under Ubuntu. I did an implementation for Android. (The idea was to create a game called “Who I am?” in which you could talk to a several famous historical characters to guess who they were, but the quality of the final product was not convincing enough to release it). However, the main work is currently been done for desktop.

The corpora-based chat module is quite simple. I have extracted some conversations using asterisks to signal the ending/beginning for the conversation. For instance, you can see below and excerpt from the “Pride and prejudice” book:

***
What does Mr. Darcy mean, by listening to my conversation with Colonel Forster?
That is a question which Mr. Darcy only can answer.
But if he does it any more I shall certainly let him know that I see what he is about. He has a very satirical eye, and if I do not begin by being impertinent myself, I shall soon grow afraid of him.
***
Did you not think, Mr. Darcy, that I expressed myself uncommonly well just now, when I was teasing Colonel Forster to give us a ball at Meryton?
With great energy; but it is always a subject which makes a lady energetic.
You are severe on us.

As you can see, the conversation is stripped from all incerpts (the “he said”, “she cried”, etc. stuff).

With that text as input, I simply look the more similar string to the text entered by the user and I should the next one. If the text is too long, I trim it using the end period, question/exclamation mark.

I have refined somehow this algorythm to be able to substitute some names with no really big improvement.

The point is that this method doesn’t work really good with some old (not under copyright) books. However, I have tried it with some more modern (under copyright) and the results are really funny sometimes.

If you would like to see more about this, I’ll be happy can send you/post the code.

 

 
  [ # 4 ]

Welcome, it sounds like you have an interesting mix of technologies there.
What you describe reminds me a little of Mohan Embar’s Chip Vivant and of Harumi: http://www.chatbots.org/ai_zone/viewthread/315/
It might also interest you that Siri was originally developed by the military to take actions on its own, like schedule meetings and book restaurants pro-actively. These functions were excluded when Apple bought Siri.

I originally started out with a companion/assistant idea in mind before I went overboard on AI, but I’m always interested in learning of practical chatbot applications beyond faqs, chat and reminders. My needs are few so I had never thought of having one memorise lists of movies or books for me. I’m randomly curious whether your chatbot’s long/short-term memory stores sentences or whether you have a detailed knowledge database going on smile

 

 
  [ # 5 ]
∞Pla•Net - Jun 27, 2014:

Hi Jose,

Well, in my opinion, you could have a standalone chatbot version of Martin which runs locally on your computer.  Then you could perhaps develop a second web based ALPHA version under a different code name, such as “Martin ALPHA”. Written in PHP or Perl, as a suggestion and SQLite or MySQL as a database suggestion (there are other DB choices too).  JavaScript with XML or JSON is also an excellent suggestion. 

Python may be exciting for A.I. with its NLTK, but may seem to respond slower online, unless some optimisation is applied.  Java may be powerful, but it seems to be in a rush to become deprecated, so it can stop running to throw errors.  ASP.NET may run beautiful for online A.I. but the running cost for Windows server web based chatbots may tend to be higher. 

Please note, there may be exceptions to my opinion, since prices, options, versions, solutions and other things are constantly changing online. Always check for the latest and greatest. My entire discussion here is informal and intended to share with hobbyists, a snapshot of some of my general impressions, for running a chatbot online in a technical sense. 

Good luck with your new chatbot, Jose.

Many thanks for your suggestions! I really feel at home programming in Java. It’s a really nice language and I simply love it! I have done some programming in Php and it’s nice, but it seems to me a bit unstructured for big-scale projects. I also did some Python, but definitely I didn’t get the hang of it. I also programmed in .Net many years ago, but I changed to Linux many years ago and .Net is definitely not Linux-friendly (I would even say that is not multiplatform-friendly).

I would love to have Martin online. It would be great for talking to him from many places (at home, at the office or using the smartphone), but I’m afraid that it would take a lot of rework.  Have you got some experience in porting a Java desktop application to the web?

 

 

 

 
  [ # 6 ]
Don Patrick - Jun 27, 2014:

Welcome, it sounds like you have an interesting mix of technologies there.
What you describe reminds me a little of Mohan Embar’s Chip Vivant and of Harumi: http://www.chatbots.org/ai_zone/viewthread/315/
It might also interest you that Siri was originally developed by the military to take actions on its own, like schedule meetings and book restaurants pro-actively. These functions were excluded when Apple bought Siri.

Hi Don, nice to meet you!

I originally started out with a companion/assistant idea in mind before I went overboard on AI, but I’m always interested in learning of practical chatbot applications beyond faqs, chat and reminders. My needs are few so I had never thought of having one memorise lists of movies or books for me. I’m randomly curious whether your chatbot’s long/short-term memory stores sentences or whether you have a detailed knowledge database going on smile

Well, I’m afraid that I’m interested in too many things wink

Many thanks for the reference to Harumi and Chip Vivant. I will take take a look at them. I didn’t know neither the original plans for Siri. I will look also more information about it. I’m actually looking for some interesting books about chatbots, but most of references that I found are general IA books. Is there some book that you find specially interesting for chatbots?

Regarding the long-term memory, it is encoded in xml format. There are some items specially designed. For instance, the “movie” item holds the data for the movies that I’ve seen. For instance:

<movie timeStamp=“2014-03-02 20_00_16” title=“True lies” genre=“action,comedy” score=“10” >

There is also an item called “unstructured” which holds the data that can not be processed by any other means.

Regarding the short-term memory, it is just a list of pointers to some specific items of the long-term memory. This is, when the bot needs some information from the long-term memory, he activates those specific memories (xml items), so they are available for any update/delete operation. I find this quite similar to how the human memory works (being the short-term memory the working memory) and it has some programming advantages.

I think that there are many things that we do in our daily life that could be improved. For instance, it could be interesting to get advice on music/movies/food/books/sports and we could also benefit from some support with our resolutions (for instance, stop smoking, staying fit, learning something new, etc.). Bots can be great at both tasks. It seems that there are a great deal of research about big questions, such as the origin of the universe and the nature of matter. Of course, I find that really interesting but maybe it would be useful to use that scientific approach to solve the smaller problems that we face in our everyday life.

 

 

 
  [ # 7 ]

Ah, custom structures, most understandable smile
I think a lot of commercial companies right now also agree on your view on personal assistants, although they have yet to get rolling. There isn’t much background information available about Siri, but Mohan Embar focused on the part of life coaching so definately check that out: http://www.empathynow.com/index.htm
I can’t say I know of books about chatbots, but I don’t do a lot of reading, perhaps someone else?

 

 
  [ # 8 ]

I will defininitely take a look at empathynow!

I would also be interested in books about AI. I’ve reading some divulgativ books (such as “Machine who think” by Pamela McCorduck), but I would like a more practical book. “Artificial Intelligence: A Modern Approach” by Peter Norvig seems interesting, but I’m afraid it may be too dense…

 

 
  [ # 9 ]

Hi José,

I am also a Java programmer, and I’ve tried Python, C#, DataFlex in some earlier projects.  I wrote an open source Java chatbot called JFRED, with a friend of mine named Paco Nathan. I keep coming back to Java though.

JFRED has a scripting language which controls it, and provides the data for making chat. The newest revision is called EARL, Expect And Respond Language.  It is not an xml but probably could be improved by implementing xml.

My website at http://www.turinghub.org has some online bots, applets, servlets, and the source for the JFRED package, or as it is called with EARL, Eagle.EARL.

I have an opinion about online vs. desktop programs. Some of the most sophisticated programs are very hard to implement on the web as web applications, CGI, etc. I have never been able to put Albert One on the web because it is comprised of a set of separate executables and is written in a 4GL that is now considered obsolete. I think there are some things that are just easier to accomplish on a desktop program. The web offers access to a multitude of users, but the stateless environment is challenging to write for.

I also use netbeans to write my servlets.  You can visit one of mine at http://e14.info

I want to continue working on it. I feel like I’m just now starting to get productive with it, though it was written in 1997. I will stick with Java, and Tomcat for the time being.

Good luck with your bot, and I hope you enjoy chatbots.org.

Best,

Robby Garner.

 

 
  [ # 10 ]

Hi José Ignacio,

It seems you are doing a nice job with Martin, congratulations!
I think one of the projects I am working on may help you developing Martin and speeding up things you want to do, like having him online. You can read about it in this post: http://www.chatbots.org/conversational/agent/intelligent_virtual_avatar_platform_fiona/

From what I have read, you want to focus on Martn’s behavior, maybe using Fiona you can forget about everything else and use instead the work of other contributors of the platform.

You can also check http://www.theclientrelationsfactory.com .

Maybe we can talk sometime and find a way to collaborate.

Best!

Lucia

 

 
  [ # 11 ]
Robby Garner - Jul 8, 2014:

Hi José,

I am also a Java programmer, and I’ve tried Python, C#, DataFlex in some earlier projects.  I wrote an open source Java chatbot called JFRED, with a friend of mine named Paco Nathan. I keep coming back to Java though.

JFRED has a scripting language which controls it, and provides the data for making chat. The newest revision is called EARL, Expect And Respond Language.  It is not an xml but probably could be improved by implementing xml.

My website at http://www.turinghub.org has some online bots, applets, servlets, and the source for the JFRED package, or as it is called with EARL, Eagle.EARL.

I have an opinion about online vs. desktop programs. Some of the most sophisticated programs are very hard to implement on the web as web applications, CGI, etc. I have never been able to put Albert One on the web because it is comprised of a set of separate executables and is written in a 4GL that is now considered obsolete. I think there are some things that are just easier to accomplish on a desktop program. The web offers access to a multitude of users, but the stateless environment is challenging to write for.

I also use netbeans to write my servlets.  You can visit one of mine at http://e14.info

I want to continue working on it. I feel like I’m just now starting to get productive with it, though it was written in 1997. I will stick with Java, and Tomcat for the time being.

Good luck with your bot, and I hope you enjoy chatbots.org.

Best,

Robby Garner.

Nice to meet you, Robby! I will take a look at these websites, they seem really interesting!

I definitely find easier writing the code for desktop applications. I would like if there was an truly easy way of porting the desktop code to create a web applications, but I still haven’t found a truly efficient way.

Actually, I think that the optimum media (at least for my bot) would be using an PlayStation-like device (such as Ouya, Chromecast, Kindle Fire, etc.) and using a voice recognition system as method of input. Given the high level of 3D graphics, I think that the result could be simply impressive.

For instance, I find truly inspiring the model created by Jorge Jimenez (vimeo.com/36048029). It’s simply great! I would love to be able to put words in his mouth!

 

 
  [ # 12 ]
Lucia Fernandez Cossio - Jul 8, 2014:

Hi José Ignacio,

It seems you are doing a nice job with Martin, congratulations!
I think one of the projects I am working on may help you developing Martin and speeding up things you want to do, like having him online. You can read about it in this post: http://www.chatbots.org/conversational/agent/intelligent_virtual_avatar_platform_fiona/

From what I have read, you want to focus on Martn’s behavior, maybe using Fiona you can forget about everything else and use instead the work of other contributors of the platform.

You can also check http://www.theclientrelationsfactory.com .

Maybe we can talk sometime and find a way to collaborate.

Best!

Lucia

Thank you Lucia! I would take a look at the FIONA platform as soon as I recover from the post-vacational syndrom grin

While Martin’s behaviour is quite important for me, I would also like to create a bot that is truly useful. Martin is already quite efficient for collecting information, but I feel that there’s still a lot to be done processing these information. For instance, it includes may rules for collecting information about purchases, but I would like him to be able to recognise patterns and give the user interesting information bits. For instance, how do current month purchases compare to previous month/year, etc. I think that I need to learn about IA methods for recognising patterns, but I’m still looking for an adequate reference (book and/or web course).

I would also love to find some way to collaborate!

 

 
  [ # 13 ]

Hi José! Martin sounds pretty darn useful, and along the lines of what I eventually see myself creating. I look forward to seeing further updates regarding your bot. :D

 

 
  [ # 14 ]
Sina Mashek - Jul 15, 2014:

Hi José! Martin sounds pretty darn useful, and along the lines of what I eventually see myself creating. I look forward to seeing further updates regarding your bot. :D

Hi Sina! I would love to see your ideas about this subject! I’m working on some additional material that I hope to share soon.

 

 
  login or register to react
‹‹ Artificial Intelligence Comics      Hi! ››