Someone please respond, code for learning

Tips and questions about scripting your Verbot®.

Moderator: Staff

Someone please respond, code for learning

Postby junfanjohn » Tue Jul 14, 2009 2:57 pm

Update: The learned kb is now storing info, but my bot responds to everything with the word "point"

In this description I'm a little confused and it doesn't seem to work...

I apologize if it's a stupid question.

First of all this is the post I'm trying to refer to...
http://www.verbots.com/forums/viewtopic.php?t=483&highlight=default

It's not working... My bot says "point" every time I type something

I guess maybe I just don't get where the code goes...

It says #input: <--- Do I put that in the input region of the bot, or do I type #input in output?

Code: Select all

Rule

(*default)

input: [inputtext]
output:. """yes just a dot"""
Child of (*default)
Rule
learnmode
input: [inputtexttwo]



    \\Does this all go in one "output textbox"


output: <learn
#name: [inputtext]
#input: [inputtext]   
#output: [inputtexttwo]>
<send [_lastinput]>   

or does each # represent a separate line\\         




My question is the format in this example, the example denotes each things on a separate line. Does that represent each sentence gets it's own output field or is it bundled all together in one output.

Here actually, let me show you what I have...



http://www.junfanjohn.netii.net/Pictures.html

This URL will take you to two pics, one is default, one is the default child, click the thumbs to enlarge the pics
junfanjohn
PosterBot
PosterBot
 
Posts: 10
Joined: Mon Jul 13, 2009 3:50 pm

Postby Matt » Sat Jul 18, 2009 8:32 am

based on your screen shots it looks like the output for your default/capture rule is "." so maybe that is why it's always saying "point"? You probably want to follow up with something like: "I don't have a good answer for: [inputtext], what do you want me to say in the Future?"
then the child rule you have should learn the input and response for next time.

You might want to check out the Teacher KB it does this kind of behavior and should work as an example.
Matt
OmnipotentBot
OmnipotentBot
 
Posts: 2084
Joined: Thu Feb 26, 2004 10:48 pm
Location: Calabasas, CA

As always...

Postby junfanjohn » Sat Jul 18, 2009 10:40 am

As always, Thank you Matt!
junfanjohn
PosterBot
PosterBot
 
Posts: 10
Joined: Mon Jul 13, 2009 3:50 pm


Return to Scripting

Who is online

Users browsing this forum: Effedlyirrevy and 0 guests