Chat Parser

Discussion in 'Avatars & NPCs' started by icekiss, May 25, 2016.

Thread Status:
Not open for further replies.
  1. icekiss

    icekiss Avatar

    Messages:
    90
    Likes Received:
    149
    Trophy Points:
    8
    Gender:
    Male
    Location:
    Germany
    I had a bit of a frustrating experience with the NPC parser, and it made me think.
    Maybe someone who knows can chime in with what the current implementation looks like?

    First my experience:
    - I tried to ask the adventure trainer in Soltown about master trainers for skills (which he said in dialogue he could tell me about) by typing the skill names, and only got "if you say so" answers
    - I tried to ask the guards in Ardoris where I can find Cugel, their guard captain, and only got "please rephrase that". I thought that the NPCs did not have that knowledge (which would be really dumb), but later learned that I had to ask "where is Cugel?" instead of "Cugel" or "captain of the guard" ...

    What do those two examples in common? In both cases I could not get at information the NPCs had because the parser did not get what I wanted. It was too rigid. And it gave no helpful feedback what so ever.
    If you go to the trouble to write a lot of responses for the NPCs, do you not want to make them discoverable for the player?

    I do not know how the SOTA parser is technically realised. But I do know how good interactive fiction game parsers solve this conversation problem (they actually do way more, but this is the basis):
    - The parser first looks whether there is an exact match with an expected phrase (e.g.: "Where is Cugel?"). Obviously, SOTA has that, whichever way it internally works.
    - If there was no match, the parser looks whether the input is a part of an expected phrase (the input "cugel" would be a part of "Where is Cugel?" [case insensitive comparison]). If there is exactly one match, proceed. If there is more than one match - either have a rating for obscurity and answer for the more common phrase, or ask back: "Do you want to know where Cugel is, or do you want to know about Cugels twin brother?"
    The big advantage of asking back is, that its a great way to make the NPCs appear more alive, actually trying to communicate with you.
    (Fun aside: In many interactive fiction games, this even works with parts of words, so you could put "hel", and if "help" was the only matching valid phrase, it would work :-O)

    Bonus points for accessiblily (e.g. people with dyslexia): If nothing matched as part of an expected phrase, look for spelling mistakes (I admit I would have to research how to implement that, but it is definitely possible): "I do not know of any 'Cougel'. Did you mean to ask about Cugel?"

    Ideally all queries to NPCs should be logged by the game server, with the response the NPC chose. This way, the developers can always have a look at what queries are not understood yet.

    It would be great if there was some documentation about how to use the parser beyond the basic topics all NPCs know (name, help, health, bye).

    PS: Getting any parser system correctly localized into another language is a hell of a lot of work... (And I have not even touched grammar parsing here.)
    PPS: I am wondering whether there is a way to ask NPCs where the exit of the current map is. :)
     
  2. Daxxe Diggler

    Daxxe Diggler Avatar

    Messages:
    2,692
    Likes Received:
    5,711
    Trophy Points:
    153
    Gender:
    Male
    Location:
    Virtue Oasis - Hidden Vale
    Wait, Cugel has a twin brother? :p
     
  3. Turk Key

    Turk Key Avatar

    Messages:
    2,561
    Likes Received:
    4,012
    Trophy Points:
    153
    Gender:
    Male
    @Lum just in case this gets overlooked.
     
Thread Status:
Not open for further replies.