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

Algorithms used in chatterbots
 
 

Hi all,
I am doing my final year project and it is a a virtual agent , a chatter bot. I am doing ma research these days and in a real confusion of the algorithms that are using to develop chatter bots.I need help in finding what are the algorithms used in developing chatterbots. I would be grateful if you could help me with my research….....smilesmile
Thank you.

 

 
  [ # 1 ]

Probably you’re made a start already. It would be nice if you list your results so far. They will inspire others!

 

 
  [ # 2 ]

Chatbot Algorithm by 8pla.net:

START:

INPUT: Stimulus

PROCESS: Pattern Matching (keywords,wildcards,default)

OUTPUT: Response

END: Exit

 

 
  [ # 3 ]
8PLA • NET - Jun 22, 2010:

Chatbot Algorithm by 8pla.net:

START:

INPUT: Stimulus

PROCESS: Pattern Matching (keywords,wildcards,default)

OUTPUT: Response

END: Exit

lol

Short and to the point. So simple, it exudes elegance. I like it!  grin

Seriously, though; I’m no expert on the subject, but I feel that I may have a perspective that you wouldn’t necessarily receive from someone who actually knew what they were talking about. that being said, I think that a re-hashing of current code isn’t the best of ideas. What may provide an avenue to a higher grade, and a richer learning experience would be to create something entirely new and unexpected. Rather than the old stimulus/response method of chatbot creation, a method where said chatbot learns the meanings of simple words at first, and gradually learning more complex words, then progressing to spontaneous creation of sentences on it’s own, and then incorporating modifiers such as mood into the mixture may well be a better notion.

Start off with a list of goals, ordered by simplicity. Say, for example, creating a database with tables for nouns, verbs, adjectives, predicates and simple grammar rules. Think about how infants, toddlers and small children learn how to speak, and then how they learn to converse. It may also help to discuss with kindergarten and pre-school teachers teach young children. Perhaps even pick up a couple of textbooks for first and second grade grammar, and incorporate the things you read into the methods you use to create/teach your chatbot. What you could end up with may well be primitive, compared to some of the chatbots currently in existence, but it may well be a stepping stone toward something greater.

Just my 38.5¢ worth. smile

 

 
  [ # 4 ]

Overall ‘functional block diagram’ of my approach is:

1. parse sentence (input : 1 line of text, output <n> parse trees)
2. meaning association (rules determine which meanings each tree has)
3. trees that have most number of meanings are put into the ‘input set’
4. for each tree in the input set,  feed each one into all ‘world knowledge rules’, a rule, if satisfied by all it’s ‘fact input’ requirements, generates a result.
5. output result of 4 is used to 1) update conversation state, 2) generate a response.
the output of the rule which had the least missing information, and took into consideration the most facts (conversation state facts especially), is chosen.

 

 
  [ # 5 ]

Hi all,
First of all thank you all for replying for my question….and sorry for not being able to reply because had lot of project submissions…..I would like to inform you all that I have done with my research for my chatter-bot   and following is a brief description about my chatter-bot.
The main components of it are:-

1)  knowledge base
2)  reasoning component
3) response generation

I have researched and selected the comparison with main two chatter-bot systems which are Elizabeth and ALICE, where Elizabeth is the newest version of ELIZA; the very first chatter-bot system and ALICE which has a separate way of implementing a chatter-bot.When I analyzed the two chatter-bot systems, what i understood was , the AIML implementation of the knowledge-base is quite clear and it has these special tags such as < category >,<template>, and etc. But Elizabeth approach has the implementation of input transformation rules , output transformation rules and it mainly depends on key word identification where ALICE has the response selection based on the search algorithm that check the user input with the written patterns in the knowledge base. The input normalization and response selection and generation is quite clear and easy to follow and will be accurate with the ALICE method.

Therefore, as I have identified:-
1) Knowledge base will be implemented using AIML
2)Reasoning will be done normalizing the input and selecting the response using the ALICE algorithm.

As I have approached to the design and implementation stage ; the following questions are still unsolved.

1) The selection of best language
As my chatter bot is web based, I am thinking of developing it with C#.net and an API also available and I am familiar with the language and the web page development is easy.But I have confusions as my project has some enhancement features such as if the user input is negative then the chatter-bot will answer to motivate the user and etc. My problem is:

* is that possible to do Natural Language Processing with c#.net ??
*Are there necessary classes area available??
* And reasons to select the c#.net among others??
*Any other solutions???


2) The user input identification problem:

For example if we say a user input:
“I like to play.But not football”
Then in the ALICE approach in the normalization process , it split the two sentences and serve separately for the answer selection.But the second sentence does not have a meaning without the first sentence.
Therefore, my question is:

* is it possible to make a relationship between two sentences in the input and select the output according to the both sentences in NLP ???
*How ALICE solve these problem of multiple sentence input????


I would be grateful if you all can give your ideas and suggestions on these matters.And I am planning to start developing the Knowledge base first. So it will be a huge help if you help me with this.And I am hoping to update my progress via this website so that I can get your valuable suggestions to improve my chatter bot.
Thank you very much.

smile:):)

 

 
  [ # 6 ]

“I like to play.  But not football”

First, those are not 2 sentences, that is only one sentence (“I like to play”), and “But not football” is simply a serious of words.

“But not football” -  Is not a sentence because there is no verb (‘but’ is a conjunction, “not” is an adverb, and “football” is of course a noun).  A sentence must consist of one or more subject nouns, and a predicate.  The predicate must be a verb(s).  Optionally the predicate may contain a direct compliment noun (receiver of the action), or predicate adjective.  Neither exists in “But not football” thus it is not a sentence. 

Correct syntax is

“I like to play, but not football”

thus your bot could try another permutation, trying to replace the period with a comma so it is all one single simple sentence.

With this new, correct version, the subject is “I”, predicate is “like to play, but not football”.

The predicate verb is “play” and the predicate noun is “football”.  football is the receiver of the verb ‘play’, BUT the adverb (not verb) ‘not’ is modifying ‘football’.  The word ‘but’ (conjunction) in this is redundant.

 

 
  [ # 7 ]

Thank you very much for the reply. Yes I guess I have to try that. Your explanation is quite clear.Thanks again.

 

 
  [ # 8 ]

I think you’re correct in selecting an already proven algorithm to implement as a final year project (it needs to be ready in 1 year, I suppose).
As Victor correctly pointed out, the example you gave could have been written differently. Nevertheless, you wrote it so others will too (very few people actually write correct all the time). I understood it and in an ideal world, so should a chat-bot (to bad the world isn’t ideal downer  ).
I am not 100% familiar with the AIML language, but if getting such a type of input correct, is one of the goals that needs to be reached in your thesis, perhaps you could play a bit with the AIML definition and put multiple sentences together in 1 knowledge-base element (forgot the actual tag used in AIML).


@Dave: I think you’re selling yourself short, Morti proves that.

 

 
  [ # 9 ]

Jan, I agree.  We will have to put so much extra code and account for SO many things in our bots, just because people are… well, frankly, inferior, lazy and sloppy!!  Yes, me included smile 

Bots will have to process the input as is,  then, try all combinations of replacing words with other words (words spelled correctly, but it wasn’t the intended word), then trying all possible misspelled words with all equally weighted words… ALL this massive extra processing, just because people are.. well, the way they are!

If it was just chatbots talking to each other, they wouldn’t’ need all that unnecessary code and extra processing!!! 

I wonder, in a day when chatbots do all work for humans, they’ll stop and say… Hay! Let’s ditch all this extra ‘human-laziness-compensating’ code, we don’t need it anymore, we don’t need to talk to them!!  smile

Anyway, for the example,  I think it is important though, to still think of the sentence, for development purposes, in the proper way.

 

 
  [ # 10 ]

Perhaps, If children one day would learn from chat-bots, they might start talking chat-bot like? What a strange world that would be.

 

 
  [ # 11 ]
Victor Shulist - Aug 10, 2010:

...

If it was just chatbots talking to each other, they wouldn’t’ need all that unnecessary code and extra processing!!! 

That is, of course, assuming that the conversing chat bots weren’t WRITTEN by humans, lol. smile Otherwise, the first typographical error would throw them BOTH into confusion.

 

 
  [ # 12 ]

Dave, 

LOL .. .yes, let’s make sure they are FULLY TESTED first, having more than one person double check each word spelling and compare to 2 different databases, Wordnet perphaps one of them.

Jan,

LOL also ...if they were very basic chatbots, yes, that would be one weeeeird world !!!

 

 
  [ # 13 ]

@Jan, Victor, Dave:

Jan Bogaerts - Aug 10, 2010:

Perhaps, If children one day would learn from chat-bots, they might start talking chat-bot like? What a strange world that would be.

The future is now. People ask me regulary what chatbots to use to learn English or other languages. They use chatbots to practice their language skills.

I personally believe there’s a huge market potential there.

On topic: Algorithms. Actually I need to visualise this.

I would say

Determine state
Determine intention
Observe (use senses, probably text typed through computer interface and a wire, but a chatbot can have many senses, visual, oral, tactile, when applied in (humanoid) robots)
Match observations against known patterns
Find earlier response given that were rewarded by conversational partners
Give that respons
Measure emotional feedback
Interpret words
Go to step 1

 

 
  [ # 14 ]

Erwin . .. *very* interesting.  As my bot is firmly ‘grounded’ and centered around English grammar, I feel that I am very close to a production system that can be very helpful in that area.

 

 
  login or register to react