-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Feature: attitude #2293
Description
In the spirit of Nevermind, I've been working on a skill (perhaps to submit to core, probably not) to teach Mycroft to respond to quite a few common queries and statements. None of them are particularly useful, but all are things a person is liable to say to Mycroft at some point, and he should respond conversationally, rather than telling folks to rephrase their mundane chatter.
I started with, "Can you hear me?" and moved on to, "Can you understand me?" Same premise, different answers, and while I was drawing up answers to, "can you understand," I thought of some obvious easter eggs.
So I threw an RNG in there and gave it a 30% chance of cracking wise or telling you what time it is.
Then I went to get a cup of coffee, and it occurred to me that this could be the first, extremely simple step toward giving Mycroft an attitude. I propose we do it like this:
Core settings should include 1-10 scores (or maybe 1-100) for a variety of response types. These would translate to weighted values, and the speak_dialog() skill would just roll a number, and append the relevant response type to the name of the .dialog file:
MycroftSkill.speak_dialog('expected.response')
response_code = # weighted random number generator returns string
if response_code = "flippant":
# use expected.response.flippant.dialog
else if response_code = "funny":
# use expected.response.funny.dialog
else:
# use expected.response.dialog
The weight wouldn't have to be out of 100, either. I'm not too good at that side of things. The idea, though, is for the user to be able to tune it somewhat, so that Mycroft is only sarcastic if they want sarcastic AI in their house. Come to think of it, something along the lines of TARS and CASE: "Mycroft, set sarcasm to 50%" would indeed have exactly that effect, except that it's tuning the odds of a sarcastic remark rather than the nature of remarks.