This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2012-06-29 16:10:47

dankill51
Scratcher
Registered: 2012-01-22
Posts: 85

Learning chat bot

I'm making a learning chat bot and I need help with how it responds. The way I have it is you can choose to talk to it or to teach it. When you teach it, it will say "what should I say" after anything you say. Whatever you say after it says "what should I say" is what it remembers. So when you choose talk then if you say something you taught it then it will respond with whatever you told it to say. The problem is it only says the one thing you taught it to say and you can't reteach it. I want it to pick from different things to say. So for example if I choose talk and I say "Hi" I want it to pick randomly from different responses like "Hi" or "Hello" or "Hey" Instead of just saying one thing forever. Also I don't want it to pick a random word or phrase either, like if I say "hi" I don't want it to say something like "banana" or some other random response.

Offline

 

#2 2012-06-29 16:25:40

wolfdude999
Scratcher
Registered: 2012-01-07
Posts: 1000+

Re: Learning chat bot

What you could do is create a list for everything that the user inputs and then have all of the possibilities to respond with in that list.  For example, you would have a list named "Hi" and that list would contain "Hi", "Hello", and "Hey."  Then when the program responds, you would have it pick a random value from one to the length of the list and that is what it would say.


http://i48.tinypic.com/15yxmp4.png

Offline

 

#3 2012-06-29 16:30:26

dankill51
Scratcher
Registered: 2012-01-22
Posts: 85

Re: Learning chat bot

I thought of that but I would have to program it with everything the user could possibly input.. Unless I could have a script that makes a list but I don't think that's possible.

Offline

 

#4 2012-06-29 16:42:11

ftf841
Scratcher
Registered: 2012-02-19
Posts: 1000+

Re: Learning chat bot

dankill51 wrote:

I thought of that but I would have to program it with everything the user could possibly input.. Unless I could have a script that makes a list but I don't think that's possible.

that's not possible but you could make it so that if it says somthing it dosn't recognise it could say somthing random.


http://mag.racked.eu/cimage/i9002/Achievement++get%21/Hi+there./mca.png
http://mag.racked.eu/mcimage/i354/Achievement++get%21/CAKE%21%21%21%21%21/mca.png

Offline

 

#5 2012-06-29 16:50:10

dankill51
Scratcher
Registered: 2012-01-22
Posts: 85

Re: Learning chat bot

I was just gonna make it say like "huh.." or "I don't understand" or something like that when it doesn't recognize something

Offline

 

#6 2012-06-29 17:00:06

Molybdenum
Scratcher
Registered: 2012-06-17
Posts: 1000+

Re: Learning chat bot


"The Enrichment Center is required to remind you that you will be baked, and then there will be cake."
(|Balls and Platforms: Stay on!|) (|NaOS-H: An operating system... Or is it?|)

Offline

 

#7 2012-06-29 18:13:54

dankill51
Scratcher
Registered: 2012-01-22
Posts: 85

Re: Learning chat bot

Doesn't that just pick random responses even if they're unrelated to the topic?

Offline

 

#8 2012-06-29 18:17:17

Molybdenum
Scratcher
Registered: 2012-06-17
Posts: 1000+

Re: Learning chat bot

No. It depends on what its learns (or to be more exact, what you teach it). If you say random things, yes it will.
Are you sure you looked at the script properly?


"The Enrichment Center is required to remind you that you will be baked, and then there will be cake."
(|Balls and Platforms: Stay on!|) (|NaOS-H: An operating system... Or is it?|)

Offline

 

#9 2012-06-29 18:21:33

dankill51
Scratcher
Registered: 2012-01-22
Posts: 85

Re: Learning chat bot

Honestly the script kinda confused me. I was just going off of when I used it cuz it seemed kinda random

Offline

 

#10 2012-06-29 18:22:04

Molybdenum
Scratcher
Registered: 2012-06-17
Posts: 1000+

Re: Learning chat bot

I think the topic and project notes describes it.


"The Enrichment Center is required to remind you that you will be baked, and then there will be cake."
(|Balls and Platforms: Stay on!|) (|NaOS-H: An operating system... Or is it?|)

Offline

 

#11 2012-06-29 18:26:01

dankill51
Scratcher
Registered: 2012-01-22
Posts: 85

Re: Learning chat bot

Oh, that makes more sense now.

Offline

 

Board footer