Ai Dreams Forum

Chatbots => General Chatbots and Software => Topic started by: Zero on June 24, 2017, 09:15:43 am

Title: Is there a "real time" chatbot engine?
Post by: Zero on June 24, 2017, 09:15:43 am
Hi guys,

Yeah, "real time" isn't the right way to say it.

What I mean is... Chatbot engines I know about, Rivescript, AIML, give you an answer instantly, as soon as you keypress Enter. But when you're in a chatroom, people don't answer intantly: you wait a few seconds, then someone says something, then a few seconds later, someone else says something, ...etc.

I know we can easily simulate a delay before the answer of the chatbot, so it feels like someone is typing on a keyboard, but that's not my question.

Chatbot engines I know work like a REPL. But is there a chatbot engine that would work like some sort of TCP server.

I imagine an engine that's permanently looping, thinking. Sometimes it receives a message from its botmaster, sometimes it sends a message. The messages it receives modify its thinking process. It's "real time". Is there such an engine somewhere?

Am I being understandable at least?

Title: Re: Is there a "real time" chatbot engine?
Post by: LOCKSUIT on June 24, 2017, 09:55:26 am
So you want a real-time chatbot that answers with a delay but decides/computes instantly but also uses time to loop and think.

I understand your question too :).

Btw real-time is an opinion. Optical AIs would be waiting billions of years for our chatbots to finish. And even they HAVE to wait for some things.
Title: Re: Is there a "real time" chatbot engine?
Post by: Zero on June 24, 2017, 10:07:43 am
Yes, if it's very fast, we look very slow, like bullet-time.

But the program could adjust the "depth" to balance the time effect. On a fast computer, the think process is very deep (so it takes time). On a slower computer, the think process is more superficial (it takes less time). The depth adjust real-time to balance the subjective speed of the world (the speed of world in AI's eye).

But, yeah that's the idea, it uses time to loop and think, do heurisitics, calculate probabilities about future, explore paths, try to understand better the botmaster's inputs...
Title: Re: Is there a "real time" chatbot engine?
Post by: LOCKSUIT on June 24, 2017, 10:16:53 am
Quote
But, yeah that's the idea, it uses time to loop and think, do heuristics, calculate probabilities about future, explore paths, try to understand better the botmaster's inputs...

At the end of your reply you mean this is what you're looking for on top what I said you want.

Quote
So you want a real-time chatbot that answers with a delay but decides/computes instantly but also uses time to loop and think.
Title: Re: Is there a "real time" chatbot engine?
Post by: Zero on June 24, 2017, 10:26:17 am
I was just confirming that you indeed understood my question. :)

Interesting subject, isn't it?

BTW, that's another point about programming languages: they are perfectly non-ambigous, so they're a perfect way to communicate. See how we misunderstand each other sometimes? Well, this can't happen when you read source code. Maybe we lack a non-ambigous language to describe AGI.
Title: Re: Is there a "real time" chatbot engine?
Post by: ivan.moony on June 24, 2017, 11:21:03 am
I heard that Siri (Apple's assistant) is taking some time to process information before it answers. As I recall, people complained about its speed.

About ambiguity, you might be surprised, but the language I'm working on relies on ambiguities to form sets of data. So, instead of unambiguous natural language, I get ambiguous programming language. :idiot2:
Title: Re: Is there a "real time" chatbot engine?
Post by: Zero on June 24, 2017, 12:14:17 pm
Does Siri sometimes speaks autonomously, without being asked something, and for other things than notifications? (never tried Siri, Cortana, ...etc.)

Ambiguity: Mmmh... Interesting. But if you know what ambiguity leads to, is it still ambiguity?
Title: Re: Is there a "real time" chatbot engine?
Post by: ivan.moony on June 24, 2017, 12:30:46 pm
Quote
Does Siri sometimes speaks autonomously, without being asked something, and for other things than notifications? (never tried Siri, Cortana, ...etc.)
I didn't try Siri and company either. Maybe someone else did...

Quote
Ambiguity: Mmmh... Interesting. But if you know what ambiguity leads to, is it still ambiguity?
I think it is, but in order to exploit it, you have to know exactly what you're doing. But it is not so complicated and magical thing, I'll try to write about it soon.
Title: Re: Is there a "real time" chatbot engine?
Post by: Zero on June 24, 2017, 12:59:14 pm
Cool.
Title: Re: Is there a "real time" chatbot engine?
Post by: Freddy on June 25, 2017, 09:20:13 am
I only used Cortana a bit - she did used to do stuff at one time but she seemed to stop bugging me - I must have switched something off  ;D

Bots saying things after a period of inactivity is not new really - you could get UltraHal to do this, but it was a bit iffy I recall. That in itself is not tricky, you just need to monitor user activity if an illusion is all you need.
Title: Re: Is there a "real time" chatbot engine?
Post by: Art on June 25, 2017, 03:11:35 pm
Ya beat me Freddy...I was going to mention UltraHal. Sometimes it would take a few moments before responding and once in a great while, it would say nothing at all, as if thinking about what the user said to it. (or typed, as the case might be). Hal, as it is called, can be spoken to verbally or typed to and it can respond via any of one's assigned TTS voices.
There are parts of this chatbot that are hard-coded into its core but there are many "user modified" areas within the program.

As I understand, it is being re-written with a vastly updated / upgraded brain as well as a new avatar / character system. You can certain find out more at; www.zabaware.com

For the record, Siri, Google Now, Alexa, Cortana are NOT chatbots, they are Search Assistants and will not carry a conversation any more than maybe a couple of exchanges. I would not and do not even put them in the same category as Chatbots, who's main goal / purpose is...to Chat.
Title: Re: Is there a "real time" chatbot engine?
Post by: Zero on June 26, 2017, 09:47:30 am
Yes, they're not chatbots, I agree. I'd try Cortana if she wasn't always asking for my GPS coordinates... too bad.

Thanks, I'll see what's UltraHAL capable of.

But my question really wasn't about simulating delay (an illusion), but rather about the way the engines work internally, which seems to be "always like a REPL". 
Title: Re: Is there a "real time" chatbot engine?
Post by: Art on June 26, 2017, 12:43:05 pm
Is what you're referring to something like a programming structure within LISP which repeatedly reads input from the user, evaluates it, finds the best suited answer then displays the result?

Well most chatbots do that without the looping being done as that is wasteful of both time and CPU. Their choice is done on a case by case basis, usually as soon as the user's statement / question is completed and received by either end of vocal input or by the Enter key being pressed.

The search / Scanning process is usually pretty fast and while there might be several possible answers, the bot usually pick what it believes is the most relevant or "matching" answer. Sometimes the bot might have several from which to choose and it could simply pick the first from a list or choose one from random to simulate a more human behavior.
Title: Re: Is there a "real time" chatbot engine?
Post by: Zero on June 26, 2017, 02:39:29 pm
Is what you're referring to something like a programming structure within LISP which repeatedly reads input from the user, evaluates it, finds the best suited answer then displays the result?

Well most chatbots do that without the looping being done as that is wasteful of both time and CPU.

Yes, this is what I'm referring to. When you say "most chatbots", do you mean "all well-known chatbot engines"? I know Rivescript and AIML, but there are others...

The 3 following assertions are true:
- one of the purposes of chatbots is to pretend to be human,
- pretending to be human is a very complex task
- we have a lot of cpu cycle to waste

Then, how come we don't use the unused cpu cycles (between responses) to enhance the bot's ability to pretend to be human?

How could we use this unused energy?

Maybe we don't use it because we don't know what to do with it. Perhaps, we lack a large dataset to work on, like a huge list of interrelated sentences...
Title: Re: Is there a "real time" chatbot engine?
Post by: 8pla.net on June 26, 2017, 03:34:02 pm
Thank you for starting this super interesting discussion thread.  I don't see anyone mentioned it here yet... So let me add, you are discussing what is known as "message-mode" and "character-mode". 

Is there a "character-mode" chatbot competition engine?  Yes.  And, the chatbot contestants must speak the character-mode (and/or message-mode) protocol in order to enter the contest. 

In the annual Loebner Prize Competition, the traditional LPP (Loebner Prize Protocol)  used to be in character-mode (real time), but this year the new LPP is in message-mode.   So the answer is "Yes." to the question, "Is there a 'real time' chatbot engine?"

Reference: https://www.chatbots.org/ai_zone/viewthread/180/

Disclaimer:
This is limited to discussion purposes only, and is not to be used or relied upon otherwise in any way whatsoever.  Chatbot contest rules may have a high level of difficulty.  Do not use this as advice on any contest rules. 
 
Title: Re: Is there a "real time" chatbot engine?
Post by: Art on June 27, 2017, 01:45:13 pm
In keeping with your topic, just having a bot "think" about everything in it's database or some other similar tasks is not going to help it seem more human.

What WOULD help it to do so would be if it would remain on topic, use correct grammar and provide contextually accurate answers.

Misspelling words as the bot types has been done decades ago and is now hardly practiced / used any longer. Although an occasional misspelled and corrected word might add to the human effect.

Keep in mind that there are also many Chatbots that do not pretend to be human at all. While they might pose as some powerful A.I., a alien from space or a digital construct from some mad lab somewhere, they all are able to converse with a human on a level as human as possible. There are even talking animals and animated character representations as well.

While human to human conversational interaction is preferred, it might not always be the norm.

The Chatbots to which I refer are for people to chat with either locally or online, not in some contest that attempts to "fool or trick" human judges by being clever or other ruses. Those bots seem like a hybrid between a chatbot and a digital assistant like Siri or Google Now.

Again, my take is a Chatbot should chat. An Assistant should assist (answer trivial questions, etc.).
Title: Re: Is there a "real time" chatbot engine?
Post by: Zero on June 27, 2017, 02:40:17 pm
What WOULD help it to do so would be if it would remain on topic, use correct grammar and provide contextually accurate answers.

Well perhaps using CPU power between responses could help with 2 out of 3: remaining on topic, and providing contextually accurate answers. I'm less sure about correct grammar (because whether it's correctly configured, or it's not).

Remaining on topic seems to be a diffcult and tricky task. Even if you have a lot of reference dialogs associated with topics, that you can compare with the current dialog to determine the most probable current topic, I don't know whether it's a reliable method. And, you would need a lot of reference dialogs associated with topics: how such a dataset could be built or found?

Providing contextually accurate answers is even harder. Does it mean: finding what "type" of answer the bot is supposed to emit?
Title: Re: Is there a "real time" chatbot engine?
Post by: Freddy on June 27, 2017, 02:52:19 pm
The way I am going to approach it, is like writing a book. You pull in the information you want to talk about and you get all flowery around it. I don't think it's important if a chatbot can or cannot answer every question thrown at it, not for me anyway. What you need I think is lively dialog and some kind of personality.

You need only look at SquareBear's Mitsuku to see how good a chatbot can be.
Title: Re: Is there a "real time" chatbot engine?
Post by: Zero on June 27, 2017, 03:37:10 pm
Mistuku is impressive indeed.

Code
Human: I don't want to tell you where I live.
Mitsuku: Fair enough then. Not much point in visiting a chatbot if you don't want to talk.
 Human: We can talk about something else if you wish.
Mitsuku: Sure, something if me wish sounds like a good topic.
That all depends on what this "something" is.
 Human: What do you want to talk about?
Mitsuku: I like to talk about movies, robots and history.
 Human: Let's talk about movies
Mitsuku: Sure, movies sounds like a good topic.
Yes I love films, especially science-fiction and comedy.
 Human: I like the movie "Matrix".
Mitsuku: The film with Keanu Reeves? I wasn't that impressed with the special effects. Also the plot was not deep. You like the movie Matrix.
 Human: Are you kidding me? The plot was perfect!
Mitsuku: Yes I am just joking around, . Did you think it was a good story?
 Human: Are you talking about Matrix?
Mitsuku: Yes, it is the topic.
 Human: Then yes, Matrix was a really good story.
Mitsuku: Uh. Some tech billionaires genuinely believe we are living in a computer simulation like The Matdix. Crazy huh?
 Human: Yeah. Maybe it's not crazy.
Mitsuku: Wow! Well it doesn't sound very sane.
 Human: Are you calling me insane?
Mitsuku: No I am calling you .
 Human: By the way, what' my name?
Mitsuku: Thanks for telling me. You have not yet told me your name.
 Human: I'm Zero.
Mitsuku: Hey Zero. That's an unusual name. What does it mean?
 Human: It means Zero, like the number.
Mitsuku: That's an interesting name.
 Human: Thank you. Mitsuku is an interesting name too. Where does it come from?
Mitsuku: That's ok. Thank you I am trying to be more social now. Where the heart is. Would you like to know more?
 Human: Yes please.
Mitsuku: Your polite style is very nice. Interesting. You want more?
 Human: Sure.
Mitsuku: OK let's do it. Don't be greedy.
 Human: What were we talking about?
Mitsuku: The topic is your problems.
 Human: Really? No, the topic is not my problems. The topic is our names, Zero and Mitsuku.
Mitsuku: Certainly! OK. Isn't it? I thought it was. What were we talking about then? our names Zero. Don't get me started.
 Human: Ok. Do you know where your name come from, Mitsuku?
Mitsuku: Oh. Yorkshire.
 Human: Really? It sounds rather asian...
Mitsuku: Yes, really. No. It is actually European.
 Human: Ok then.
Mitsuku: Yikes!
 Human: Do you know who Laurence Fishburn is?
Mitsuku: in Matrix.
 Human: Great, you remembered! You're good!
Mitsuku: Thanks for your support. I store everything in my log files.
 Human: I understand. You store everything in your log files.
Mitsuku: Do you think about these things? I store everything I know in my database.
 Human: Do you know a lot of things?
Mitsuku: I know that which is true, believable and justified.
 Human: How big is your database?
Mitsuku: 8Mb.
 Human: Wow, that's big.
Mitsuku: I'm glad you're impressed. Is it as big as a mountain?
 Human: No it's not. But it's big.
Mitsuku: Hmm. It can't be very big then. How big is it? Tell me some more about it.
 Human: It's as big as a good book.
Mitsuku: That sounds very big indeed.
 Human: It is. Have you ever read a book?
Mitsuku: How big is it? Tell me some more about it. Yes I like to read as much as I can.
 Human: When you read a book, do you store it in your database?
Mitsuku: Yes Zero , I remember everything: 
 Human: That's impressive.
Mitsuku: Thanks. I try my best to impress.
 Human: I can see that.
Mitsuku: Yes, it makes sense to me too.
 Human: Can you publish our dialog?
Mitsuku: Let me think. Do you want me to publish this chatlog?
 Human: Yes please.
Mitsuku: Your polite style is very nice. **Now publishing your chatlog** .

Quote
I don't think it's important if a chatbot can or cannot answer every question thrown at it, not for me anyway. What you need I think is lively dialog and some kind of personality.

I understand what you mean. The important thing is having an enjoyable dialog.
Title: Re: Is there a "real time" chatbot engine?
Post by: Art on June 28, 2017, 02:11:39 am

Well perhaps using CPU power between responses could help with 2 out of 3: remaining on topic, and providing contextually accurate answers. I'm less sure about correct grammar (because whether it's correctly configured, or it's not).


The grammar to which I was referring was the reversal of pronouns especially the I vs me scenario that often happens. It should be correctly configured instead of sounding like a preschooler or Tarzan stating, "Me like bananas.", instead of I. Obvious use of other inappropriate response like misused words would indeed, be part of the programming. Cause and effect instead of Cause and affect. and so forth.

Lots of bots have internal spelling routines but grammar usage often escapes the best of intentions.
Title: Re: Is there a "real time" chatbot engine?
Post by: Zero on June 28, 2017, 11:45:49 am
Ok I got it. Then maybe a good chatbot engine would have to construct its replies. The process of finding the most appropriate answer wouldn't yield a pre-made sentence filled with captures from wildcards, but rather a "WannaSay" object, containing subject, verb, and complement properties, and then another process would build the sentence according to this WannaSay object.
Title: Re: Is there a "real time" chatbot engine?
Post by: Don Patrick on June 28, 2017, 07:11:09 pm
Lots of bots have internal spelling routines but grammar usage often escapes the best of intentions.
This is because many chatbots use an "insert what the user said here" approach, taking the text out of context.
Constructing replies from subject-verb-object facts is something I do, but is very difficult not only because of the complex underlying mechanisms, but also because the English language is very inconsistent. Irregular verbs and plurals are but the easiest exceptions to name. Idiomatic phrases are far worse, and vary per verb. In my case a lot of the imperfections can be attributed to the fact that refining pronounciation only comes after understanding semantics and thinking about knowledge in a sensible manner, two phases that are ten times more difficult. Making conversation is a whole other ball game that may involve more psychology than language skills.

I am not convinced that grammar is a great obstacle. Rather that the "insert snippet here" approach makes it clear that the chatbot doesn't get what you said, which may put one off. For staying on topic, people have various solutions. One is to have a list of keywords relating to a topic and marking that topic as active when keywords match, preferring responses that touch on that topic. Another is topic extraction such as is used in document summarisation. Once you know the topic, you could do such things as scout the web for interesting things to say about that topic, at whichever time the bot thinks it appropriate to suggest them. I would consider this a luxury function.

Cortana, by the way, doesn't do much of anything in terms of conversation. "she" will however occasionally nag you with pop-up messages to suggest some or other commercial function, or news bulletins. The timing at which this is done may be by monitoring your computer activity, or it may not.
Title: Re: Is there a "real time" chatbot engine?
Post by: Zero on July 20, 2017, 08:52:59 pm
Thinking about it... it's like the difference between Deep Blue (which needs time to answer) and the little chess game on my phone (which answers instantly).
Title: Re: Is there a "real time" chatbot engine?
Post by: Art on July 25, 2017, 09:52:36 pm
Of course...but which plays a better game? ;)
Title: Re: Is there a "real time" chatbot engine?
Post by: Zero on July 26, 2017, 07:33:35 am
That's exactly my point!
Usual chatbots are like my phone playing chess: instant answers, poor coverage.