Paths of Glory (The Simpsons)

"Paths of Glory" is the eighth episode of the twenty-seventh season of the animated television series "The Simpsons", and the 582nd episode of the series overall. It aired in the United States on Fox on December 6, 2015.
Plot.
Lisa participates in an Alternative Energy Derby with a car moved powered by solar energy, but the Duff Blimp passes over making her car stop inches from the finish line. She is mocked because of this, and the Old Jewish Man comments about Amelia Vanderbuckle, a Springfieldian inventor of the 19th century who was committed to the Springfield Asylum, following an accident caused by one of her inventions beheading one of the town's aldermen, however, 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, Lisa discovers a clue from a voice recording of Amelia's which reveals a secret diary with details of an invention that could restore Amelia's reputation. 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, which terrorizes Ralph Wiggum, who later tells about the diary to his father Chief Wiggum. Wiggum assumes Bart wrote the diary himself and informs Marge that he is a sociopath, making her and Homer worried. They decide to do a sociopath test with him, disguised as a "Jet ski Dude or Motocross Maestro" test, but the label falls off and Bart discovers his 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 children there have no reactions, so an army general says that they are perfect to test U.S. Air Force Drone Simulators. Bart manages to destroy all targets, but later the USAF General informs the children that they were actually controlling a real drone, killing real people (as in "Ender's Game"). While the other kids react enthusiastically, Bart is horrified by this news and tearfully says he didn't, and doesn't, want to kill anyone; the General and a civilian staffer tell Bart he has shown he is a good person with genuine emotions, and that he will be sent home because that makes him completely useless for their project. To Bart's relief, the kids are told that the first revelation was a lie and that the program "is" in fact a simulation, but unlike Bart, the other kids have "passed" the test and can expect work in the future.
Meanwhile, Lisa pairs up with Milhouse to find Amelia's invention, that is buried under a former feminist club, that is now a Knockers restaurant. They ask Groundskeeper Willie to help them drill the building's basement and find her invention. They are successful and find what at first glimpse looks like a loom, but is actually the first computational device ever invented. Lisa accomplishes her objective and Amelia's invention is donated to the museum, even though nobody but Lisa is interested in seeing it.
During the credits, Homer uses the loom to view erotic images when Marge walks in on him and he tries to get rid of it to no avail.
Reception.
"Paths of Glory" scored a 2.3 rating and was watched by 5.53 million viewers, making it Fox's highest rated show of the night.
Dennis Perkins of "The A.V. Club" gave the episode a B- saying, "The bummer here is that there are enough clever, thoughtful details in these half-stories that, given time to breathe and develop, they both could have been much more compelling episodes of "The Simpsons". As it is here, ‘Paths of Glory’ goes out of its way to call attention to the slapdash way the episode is constructed, with all the Simpson family coming in for a big group hug, each rotely rattling off the reasons why they’re so grateful to be back together. Like that hug, the episode itself ends in a big, sloppy heap of unearned sentiment."