What if you wanted to be a detective but couldn’t interpret social cues and were panicked by noise, the proximity of strangers, or even a parent’s hug?

That’s the premise of Simon Stephens’ Tony Award-winning play The Curious Incident of the Dog in the Night-Time, cleverly adapted from Mark Haddon’s poignant 2003 novel and now being adeptly staged by the Walnut Street Theatre through April 28.

The title refers to a Sherlock Holmes mystery, and, in this instance, to a dog impaled on a garden fork. Intent on solving the dog’s murder is a 15-year-old with autism, Christopher Boone (Austin Nedrow, a Conestoga Valley High School senior), who excels at math, loves computers, imagines himself in outer space, and ardently tends a pet rat named Toby.

But in pursuing the canine case, the alternately irritating and endearing Boone stumbles on a more personal mystery, which will require all his reserves of courage and resilience to unravel. The mystery turns into a quest that will take Boone from his home in small-town Swindon to the teeming, frenetic anonymity of London and back again to a new normal.

That, without spilling too many secrets, is the (somewhat slight) story line. The real achievement of both novel and play is to represent the mental and emotional world of a boy on the high-functioning end of the spectrum, with all the gifts and deficits that entails.

The novel’s style and impact owed much to Boone’s first-person narration. The play (which won seven Olivier Awards and five Tony Awards, including Best Play) uses different techniques, including having Boone’s supportive teacher, Siobhan (the superb Alice Roper), both read and recite Boone’s account of his adventures.

Directed with humor and emotional precision by Bill Van Horn, the Walnut’s 10-person ensemble not only portrays a variety of characters, but also transforms comically into not-quite-inanimate objects, such as a money-spitting ATM. The second act becomes more self-consciously meta and self-referential, as Boone himself improbably (or fittingly — since it is his story) takes charge of the stage directions.

On Broadway, the play was most remarkable for its staging, an evocation of the boy’s mind through design, and for the magnetic (Tony-winning) lead performance of Alex Sharp as Boone. The Walnut’s production design is equally brilliant — an obviously close collaboration among Roman Tatarowicz (set design), Ryan O’Gara (lights), Christopher Ash (projections), and Christopher Colucci (sound). An intricate, constantly morphing grid of flashing, multicolored lights, reflecting Boone’s often overloaded neural circuitry, combines with ethereal projections of numbers, stars, and landscapes to magical effect.

Nedrow inhabits Boone sympathetically, transcending caricature. If he doesn’t dominate the proceedings as fully as Sharp, it’s perhaps a gentler performance, making the play more of an ensemble piece. Karen Peakes and Ian Merrill Peakes, a real-life couple, play Boone’s parents, struggling to love their son, if not each other, and alternating moments of heartbreak. The fine cast includes another husband-and-wife duo, Greg Wood and Susan Riley Stevens, as well as Sara Gliko, Dan Hodge, Justin Lujan, and Jane Ridley, all holding the audience rapt.

Theater

The Curious Incident of the Dog in the Night-Time.

Through April 28 at the Walnut Street Theatre Mainstage, 825 Walnut St. Tickets: $25-$87 (premium tickets $175). Information: 215-574-3550 or 800-982-2787, walnutstreettheatre.org.