In my imagined version, somebody's stolen the Socrates software design for their substitution-plot android. They've given it a fairly typical complement of goal threads, plus one for learning about Miles and pretending to be Miles. Some or all of the other goal threads also come out templatey. Perhaps Sherlock is this bot's version of Vista, all noticing everything. One or more of the other goal threads are run by the co-author, most likely including the goal thread for actually conducting the mission.