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..

Greetings
 
 

Hey guys!

I am new to these forums and been browsing through things a lot. I got into coding not to long ago and am focusing mostly on PHP, JQuery and Javascript, still learning the last 2.

I thought it would be a nice challenge for this year to make a chatbot, localhost only for now.

Been reading through a lot of things and still sorting out the options. I really want to learn as much as I can with this project and want to create the code from scratch.

I have heard of the following things as well
Program O
RiveScript (this is what I’m looking into the most atm)
ChatScript
AIML

If anyone has suggestions of what is best and where to start, would love to hear it!

 

 
  [ # 1 ]

Hi, Laurie, and welcome to chatbots.org! smile

I’m Dave, a moderator here, and lead developer for Program O. I’m both able and more than willing to assist with not only AIML and Program O, but also with any questions regarding website technologies, such as PHP, jQuery, JavaScript in general, or just about anything else in that area. I’m afraid I don’t have much experience with RiveScript or ChatScript, but there are others here who can fill that particular niche.

With regard to “creating” your own chatbot, I have to ask how much “reinventing the wheel” you’re wanting to do. So perhaps a good place to start is to ask what you specifically have in mind. wink

 

 
  [ # 2 ]
Laurie Wevers - Mar 1, 2017:

I have heard of the following things as well
Program O
RiveScript (this is what I’m looking into the most atm)
ChatScript
AIML

If anyone has suggestions of what is best and where to start, would love to hear it!

This is a recurring issue on chatbots forums: what is the most powerful and suitable scripting language?

Before asking what script language to adopt, it is good to ask why using a script language. A script language is usually created as an overlay of a very useful functionality, but too complex to be used as such.

What are the advantages and disadvantages of a script? This applies to all scripts, chatbot script or not (script shell, javascript, ...).

Advantages :
1) A script is generally simpler, easier to use, easier to learn.
2) Since the number of actions accessible to the user is generally limited, it is possible to protect the system against a manipulation error.
3) A script should be more readable and concise (but it’s not always the case).
4) Sometimes, portability

The inconvenients
5) A script language is mostly interpreted. It is therefore inevitably slower.
6) It’s never a complete language. It is meant to do (very well) a category of things, but as soon as one gets out of the beaten track, troubles begin.

I come back to the AIML, and its little brothers, ChatScript, RiveScript.

The advantage number 1 is totally fulfilled when you want to quickly make a little chatbot to have fun. But once you want to do something more complete, able to compete at the Loebner Prize, for example, this point is no longer relevant. When I see the acrobatics that must be performed to interpret the calculations, to answer the questions “what is the heaviest”, or to process number sequences, the context, none of these languages is simple nor easy to use . The syntax becomes more complex to process innumerable particular cases, and there are inevitably subtleties on which the specifications are not always clear.

Point 2 is not applicable. Except in the case of an internet platform, I can not see a chatbot programmer trying to manipulate the system to the point of erasing everything. At worst it will create an endless loop (and it already happens in AIML).

The third point is simply false with regard to the chatbots scripts. In AIML, the syntax is very verbose. In ChatScript it is more concise but simply unreadable.

Remains the last point that could be a good reason. But there are so many multi-platform programming languages (C/C++ Java, python, and many others), that in fact this point is not essential.

Therefore my advice is to take the programmation language you master best, and start from scratch. Make your own pattern matching functions (or use existing patterns, for example, regular expressions), and you’ll have an original and personal bot. And it’s not reinventing the wheel to do this. All languages have so many libraries and routines to deal with all sorts of problems that in the end you will be less confronted with problems than with a scripting language.

Let’s be honest: I do not try to denigrate bots in scripting languages, AIML or others. I am even admirative of the results they can achieve with such inefficient tools. In the same way, I am admiring the acrobats who walk on their hands. But even the best of these acrobats is slower and clumsy on his hands than me on my old legs. Use the most suitable tool for a given task.

 

 

 
  [ # 3 ]
Denis Robert - Mar 1, 2017:

I come back to the AIML, and its little brothers, ChatScript, RiveScript.

The advantage number 1 is totally fulfilled when you want to quickly make a little chatbot to have fun. But once you want to do something more complete, able to compete at the Loebner Prize, for example, this point is no longer relevant.

Hmm.. interesting opinion, seeing as nothing else has won the Loebner Prize (to my knowledge).
Psst.. Not sure Bruce would like you calling Chatscript, the little brother of AIML smile

Oh and welcome Laurie.

 

 
  [ # 4 ]

Relax, Steve,  I won’t take offense at “Chatscript, the little brother of AIML”. AIML came first, inspired others.

 

 
  [ # 5 ]

If you already are familiar with PHP, then one suggestion would be to have a look at Program O.  You will need to pick up some mySQL fu also. 

An advantage of starting with a functional program (like Program O) is that you can see how a basic system of input-parsing-response_generation-output works programmatically.  You can then decide if that is the way you want to go without wasting a lot of upfront time “building a bot from scratch” only to find the architecture is not what you need when you are already invested down a certain path. 

An AIML-based bot will allow you to be able to leverage a large number of publically available “brain” files to give your bot some conversational ability right away.

 

 
  [ # 6 ]

I can relate to what Denis is saying. Sometimes it’s best to work from first principles. That’s how the strongest arrive.

 

 
  [ # 7 ]

Thanks for all the replies. I am still struggling what to use. But that hasn’t stopped me from trying things out.
I made a really really reallllllly basic bot in javascript. The options are very limited on that atm, but I like what I was able to make in a week, with pretty much no knowledge. I don’t mind starting over and over again.
For not I really enjoy the experimenting with this. The problems I have atm with program O, node.js, chatScript and some of those other things is actually getting that to work. I can’t seem to figure it out just yet.

What my ultimate goal is to make is a chatbot version of my main gaming character. I’ll have a server running at my home in a few weeks as well, this is where I want to run multiple things on. The people that can access it are mostly my guild mates and friends.

For now the options I have seen is creating the bot completely in 1 language with massive libraries and thus slow bots. Or using the side programs like program O. Or using a DB and some backend programs.

After testing things out in javascript I’ll look into python next, heard and read some good things about it.

 

 
  [ # 8 ]

mhm I am missing the edit button on the messages but ahh well.

Anyway first thing (bit offtopic) i noticed a typo in the (invite friend) option on the right side of my screen? unless “poitns” is on purpose :D

back to what I am making:

I need the following:
- webbased chatscreen (textbox + textinput)
- chatbot that can reply to user
- either a database or library script for the stored words/conversations (really wanna test out the database part as to see how it works)
- store chatlogs

Things my bot doesn’t need to know:
- learning. I will implement any new lines it needs to learn myself. This will take constant time with updating, but it’ll be worth it.

If anyone has any tips on what is the best to use for any of this. I am more than willing to test new things out as well.

 

 
  [ # 9 ]

Welcome Laurie.

- webbased chatscreen (textbox + textinput)
Use HTML5

- chatbot that can reply to user
If you know Javascript/python you might want to try Rivescript.
https://github.com/aichaos/rivescript-js

Some people (like me) have rolled their own interpreter. Others use a local interpreter or webhost like Pandorabots or Chatscript.

- either a database or library script for the stored words/conversations (really wanna test out the database part as to see how it works)
depending on the interpreter you may not need a database

- store chatlogs
based on your volume, you could use php/text files to store your logs

 

 
  [ # 10 ]
Laurie Wevers - Mar 7, 2017:

mhm I am missing the edit button on the messages but ahh well.

The forum software is configured to show the edit button only to members with a minimum number of posts (I think it’s either 5 or 15), and then only for a short period of time (15 minutes), for the purposes of correcting spelling errors/typos. Sorry for the inconvenience, but that’s how it’s set up.

As to the rest, I saw that you indicated that you were having difficulties with Program O. If you could please let me know what the nature of the difficulty is (preferably in a new thread, so as not to “clutter up” this one) I’d be more than happy to assist you.

 

 
  login or register to react