Glossary: learn
From VerbotWiki
| Table of contents |
A KnowledgeBase is a terrible thing to waste!
The learn tag allows the Verbot to dynamically add to a script. For sample Rules please load Teacher.vkb into the Verbot Scripting Editor. Below are the tags and their use. Some tags are optional. This section will be expanded as this feature set matures. Please log on to our forums if you have additional questions.
<learn #file:filename.vkb (optional) #name:rule name (optional) #input:keywords #condition:c-sharp condition for input (optional) #output:verbot response #condition:c-sharp condition for output (optional) #command:command text (optional) #childof: rulename (optional) #vchildof: rulename (optional) #vparentof: rulename (optional) >
Notes:
The Learn command can have tags within it
Example:
#output:<send hello>
For more information on tags see: Verbot Tags
The Learn command (as of version 4.0.5.4) no longer merges rules with same inputs unless the rulename specified is the same as the merged rule name.
Learning to Learn.
The following is a break down of the required and optional Learn command attributes. Optional tags add additional functionality, but are not required for the command to operate.
#file (optional)
The optional #file allows you to specify a file name to append knowledge to.
Note: The default KnowledgeBase is learnedKnowledge.vkb
Format:
<learn #file: filename.vkb #input: keywords #output: verbot response >
#name (optional)
The optional #name allows you to specify a Rule name to create within the learnedKnowledge.vkb. If a Rule name is not specified the User input will be used as the Rule name if an existing Rule is not found.
Note: In most cases you should NOT specify a Rule name to allow the Verbot engine to automatically merge new Inputs with existing like Rules.
Format:
<learn #name: rule name #input: keywords #output: verbot response >
#input
The required #input defines the Input keywords that will be used to create the new Rule within the learnedKnowledge.vkb
Format:
<learn #input: keywords #output: verbot response >
#condition
The optional #condition defines the c-sharp conditional code corresponding to the input or output that precedes it.
Format:
<learn #input: keywords #condition: input condition c# code #output: verbot response #condition: outpu condition c# code >
#output
The required #output defines the Output that will be used to create the new Rule within the learnedKnowledge.vkb
Format:
<learn #input: keywords #output: verbot response >
#command (optional)
The optional #command defines the command to run when the newly created Rule is fired.
For more information on using Command see: Running Applications
Format:
<learn #input: keywords #output: verbot response #command: command text >
#childof (optional)
The optional #childof defines a Rule name to allow the newly created Rule to be a child of.
For information on Child Rules see: Creating Child Rules
Format:
<learn #input: keywords #output: verbot response #childof: rule name >
#vchildof (optional)
The optional #vchildof adds the newly created rule as a virtual child of the given existing rule.
For more information on Virtual Child Rules see: Using Virtual Child Rules
Format:
<learn #input: keywords #output: verbot response #vchildof: rule name >
#vparentof (optional)
The optional #vparentof adds the target Rule as a virtual child to the newly created Rule.
Format:
<learn #input: keywords #output: verbot response #vparentof: rule name >
Note: you can have as many #vchildof or #vparentof lines as you want (one line for each reference to add)
For more information on using the learning ability see: Using the Teaching.vkb KnowledgeBase or visit our forums online.

