A holodeck recreation of Victorian London in which Data plays Sherlock Holmes with Geordi La Forge as Watson, and from which the self-aware Professor Moriarty arises.
The Sherlock Holmes programme lets Data act out his admiration for Arthur Conan Doyle's detective, an interest that begins in Lonely Among Us. On the holodeck he takes the part of Holmes at 221B Baker Street, with Geordi La Forge as Dr Watson.
In Elementary, Dear Data, Dr Pulaski argues that Data can only solve cases he has already read. To settle the matter Geordi asks the computer for an opponent able to defeat Data, and the computer answers by giving the hologram of Professor Moriarty awareness of himself and of the ship. Moriarty seizes Pulaski and takes hold of some of the ship's controls before Picard persuades him to wait in storage.
In Ship in a Bottle, Reginald Barclay wakes Moriarty by accident while repairing the programme, and the professor traps Picard, Data and Barclay in a simulation in a bid for freedom.