Lisa sets out to restore the tarnished reputation of Springfield’s first female inventor. To find her invention, she scours an abandoned asylum and a restaurant that caters to men. Bart joins Lisa at the asylum, stealing one of the homicidal patient’s notebooks, and bragging to the boys at school that he wrote the entries himself. This revelation causes Homer and Marge to believe he is a sociopath, which Bart decides to use to his advantage until things go too far
Lisa participates in an Alternative Energy Derby with a car moved by sun light, but the Duff Blimp flies past, making her car stop inches from the finish line. She's mocked because of this, and that's when the Old Jewish Man comments about Amelia Vanderbuckle, a Springfieldian inventor who lived in the 19th century and was committed to the Springfield Asylum, where she continued to make her inventions. Lisa realizes that the only way to bring her reputation back is to break into the asylum with Bart and find one of her inventions.
At the asylum, Bart finds the diary of Nathan Little, a sociopath who lived there. He decides to take the diary to school and show it to his friends, terrorizing Ralph, who later tells about Bart's diary to Chief Wiggum. Wiggum informs Marge about Bart's condition of sociopath, making Marge and Homer worried. They decide to do a sociopath test with him, disguised as a "Jet Sky Dude or Motocross Maestro" test, but the label fell off and Bart discovered their parents' intentions, and decides to answer all the questions as if he was the worst sociopath that ever existed.
This makes Homer and Marge even more worried, and they decide to take Bart to an Asylum. As all the kids there have no reactions, an army general says that they're perfect to test U.S. Air Force Drone Simulators. Bart manages to destroy all targets, but later the kids are informed that they were actually controlling a real drone, killing real people. Bart is the only kid who gets worried about it, so he's diagnosed as being sane and is free to go back home.
Meanwhile, Lisa pairs up with Milhouse to find Amelia's invention, that's buried under a feminist club,which is now a Hooters-like restaurant. The kids ask Groundskeeper Willie to help them drill the building's basement and find her invention. They're successful and find what at first glimpse looks like a loom, but it's actually the first computational device ever invented. Lisa accomplished her objective and Amelia's invention is donated to the museum, even though nobody but Lisa is interested in seeing it.