Disclaimer: Premise and characters belong to Steven Moffat, Mark Gatiss, and, of course the incredible Sir Arthur Conan Doyle, I'm only borrowing them for a bit of non-profit fun.
"When I was seven, Mycroft instructed me to create a catalogue of behaviors which instigated violence. His intention was that once I had such a catalogue I would desist in those behaviors. At the time," Sherlock's expression twisted disdainfully, "I admired Mycroft, I did as he asked."
"The question complex: responses varied with gender, age, class, cultural background, situation and of course, the individual; although the last is almost irrelevant when 'acceptable behavior' holds sway . At present, given 30 seconds to observe the subject, I can simulate their response in public with 90% accuracy. My accuracy drops to 70% in a private setting."
"If that were true-" John began
"I would pretend for Sargent Donavan that the unfortunate fate of a random stranger means more to me than the opportunity to exercise the abilities that make me feel alive?" .
"By the time I was nine, I was capable of carrying out socially acceptable interactions. It pleased Mycroft and Mummy. It was unbearably tedious. One minute of observation and a script rolled out in my brain which I would be compelled to follow it, like a programed robot."
"So, one day, instead of asking Lady Scottsdale about her thoroughbreds, I asked her why the romantic attentions of her groom enticed her more than those of her husband..." Sherlock smiled. "Then I bolted."