WHEN I WAS a 13-year-old girl, I didn't hang out with wizards or wield swords or negotiate underground labyrinths. In "The Light of Excalibur," however, 13-year-old computer geek Agnes does all that and more.

That a female math whiz is the protagonist of an adventure story should lighten parents and educators of their "Reviving Ophelia" anxieties about preteen girls. Agnes lacks neither confidence nor analytical skills, boldly proclaiming early on that she wants to be a mathematician or a scientist when she grows up. Yet like many youngsters, Agnes contains her feelings and deflects the emotions of others, declaring that she prefers equations to people, as people are so unpredictable.

Agnes attends her mother, who has cancer. Angry at her father, who doesn't visit the hospital often enough, Agnes equally scorns her English homework assignments with their "useless King Arthur stuff." Through the magical intervention of a nurse, Agnes is transported to the Middle Ages, where she meets the young Arthur, whom she must help ascend the throne and so save England from war. Developed by local playwright Norman Allen, "The Light of Excalibur" was commissioned by the Kennedy Center for its "Imagination Celebration" performance series for young people and families.

Rana Kay's Agnes captures the rapid-fire speech patterns of a young teenager who tries to hide difficult feelings such as grief or fear that peek out nonetheless. Allen credits his "wonderful nieces" as a source for the character, saying "they are extremely intelligent girls and very practical and feisty and 'go get 'em' in the same way Agnes is -- they were the model."

Along with Agnes, other characters in "Excalibur" expand conventional notions about gender. Merlin the magician (Michael Kramer) appears in Agnes' contemporary world as a gentle and attentive nurse to her mother. "I certainly want to either ignore or break down any kind of barriers or pigeon holes that people are put in," Allen says. "That's always true of my plays. It adds layers to the character so that Merlin -- who is a very majestic, magician figure -- [is also] a very nurturing, almost maternal character."

Allen's exploration also enriches the character of young Arthur (Scott Kerns). The future king is blessed with the gift of "Sight," meaning the intuitive ability to understand and communicate with others. "Arthur is a product of both his parents," Allen emphasized. "He gets sort of a kingly, macho strength from Uther, his father, and he gets Sight with a capital S from his mother, Igraine. What will make him a great king is that he can combine those things."

Arthur's Sight would seem to make him the polar opposite of Agnes. Yet the two become easy friends, especially as they have similar family backgrounds: Both have lost or are losing their mothers, both have distant relationships with their fathers, and both have had to take on adult responsibilities a bit before their time. Agnes is initially skeptical about Arthur's Sight, yet she eventually develops the skill herself. Ultimately, Agnes uses both intuition and analysis to help her friend.

Once Arthur achieves his crown, he asks Agnes to remain at court as his companion. She insists, however, that she must get back to her mother, whom she is eager to embrace and comfort. "By the end of the play, Agnes and Arthur each gain that piece from the other," summed up Allen. "They go on into their lives more complete."

Scott Kerns plays Arthur, the boy who would be king, in "The Light of Excalibur."