Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: More rewrites, but some CSS could really help...

...

  1. Select 'File->New' to create a new plist. Save it as 'cake.plist'.
  2. Inside cake.plist, select the People tab and create a new person named 'cake vendor'.This person will handle the initial greeting exchange.

    Image Added

    Info
    titleA note on
    'people'
    "People" in NPCEditor
    , each person
    Each "person" in a plist represents a domain, which contains the list of answers the system chooses from. Domains can have inheritance, so greetings may always be accessible, while some details may only come up at specific points in a conversation.

    Make sure you set both 'first name' and 'last name' for your person. If your person/domain's name is just one word, you can set the last name or the first name to be a space or you can split the word into 2 parts, one for the first name and the other for the last name, such as 'CakeVendor' or 'Cake Vendor'

  3. :Image Removed
  4. Now define the connection NPCEditor uses to communicate with the rest of the Virtual Human Toolkit architecture. Select the 'Accounts' tab, then click on 'Add' and select 'Smarbody'. Test the connection by clicking on 'Connect': the button will change to 'Disconnect' and the row corresponding to the NPCEditor in the Launcher will become green. This should be defined once and associated only to one of the defined persons: the one that defines the initial domain
    .Image RemovedImage Added
  5. Image RemovedImage AddedNext select as type of dialog manager 'scriptable' in the 'Conversations' tab. A new 'Dialog Manager' tab next to 'Conversations' will appear containing an initial script for a dialog manager. The script is written in Groovy and can be edited to suit your needs.
  6. Set the parent property of 'cake vendor' to 'Anybody' (default value). This step defines an inheritance hierarchy among the various domains. In this case the 'cake vendor' domain inherits the utterances defined for the 'Anybody' domain.
  7. Create all the other persons defined in the dialog graph above: 'cavities', 'xylitol', 'diabetes', 'cake type', 'sponge cake flavor', 'cheese cake flavor'. Set the parent property of each of them to the 'Anybody' domain.
  8. Create a 'type' and 'speaker' category in the 'Setting' tab. The first is used by the default dialog manager script to handle off topic utterances from the user. The second (speaker) needs to be set for proper communication with the rest of the modules in Virtual Human Toolkit.
  9. Image RemovedImage Added
  10. Make sure the 'toss' category is set to be included in the answers and used by the classifier.
  11. The previous steps end the setup, from now on we will add the utterances we want the agent to understand and we will define the appropriate answers. To define the reply the agent will give when it doesn't understand what the user said; add a new answer and select the type to be 'opaque'. Then define an appropriate text (e.g. "i didn't understand what you said, try to rephrase it"). For all answers you want the agent to be able to speak and animate, set the speaker to 'brad'.
  12. Image RemovedImage AddedNext add the various utterances. The first defines the agent's answer to the user's statement 'Hi'. Here leave the type of the answer unset (because it's not an answer to be associated with non understanding). Set the speaker to 'brad' as usual and the domain to 'cake vendor'. On the user pane (the left half) set the text to 'Hi'. Finally click on both newly added utterances (they both become blue) and then set the link strength to 6 to define that the one on the right should be the answer for the utterance on the left. Similarly do for adding the replies for 'thank you' and 'bye'.
  13. Now we will see how to make a change of state when the user says a particular utterance. We will change from 'cake vendor' to 'cavities' when the user says that s/he wants to get a cake from the agent. To do so, in addition to the setup done for the other utterances in the previous step, just set the toss property to the 'cavities' domain.
  14. Follow this procedure and complete all steps as represented in the dialog graph given at the beginning. You can see also the complete /wiki/spaces/VHTK/pages/14582324 file.
  15. Image RemovedImage AddedBefore running the example, remember to train the classifier. Select all the rows in the table in teh tab 'Classifiers'. Then check the box 'Test on training data' (because the training data is too small to be split) and then click on 'Start Training'. You can change the optimization criteria. Also, in this example, the Anybody classifier will fail because it contains no links to learn between user utterances and system answers.
  16. :If during the testing of the example, you see that the classifier returns multiple answers instead on just the correct one, you can adjust the threshold of that classifier by selecting the classifier in question and double-clicking the threshold displayed, as seen in this screen capture:

...

After creating a new example and saving the . plist file, to make it load automatically every time the NPCEditor is started from the Virtual runs, you'll need to edit the config for theVirtual Human Toolkit launcher is sufficient to modify . Editing the NPCEditor launching launch script that is found in svn_vhtoolkit/trunk/tools/launch-scripts/run-toolkit-npceditor.bat and then re-compile vhtoolkit.sln.  If , or, if you want to make this change without having to re-compile, edit the file bin/launcher-scripts/run-toolkit-npceditor.bat.
In that script change the pointer from the default plist file to your new plist file. Also consider setting set the option 'Connect at startup' in the 'People' tab for the person/domain associated with the Smartbody connection.

...

To modify the default behavior and move the tossing from the end of the utterance to the beginning of the utterance, move the two selected lines from the method npcBehavior_done to the method npcBehavior_begin as displayed in the following image:

Image RemovedImage Added

Note On Debugging

...