"Pretty Hate Machine" is the twentieth episode of the third season, and 64th episode overall from the Fox series Gotham. The show is itself based on the characters created by DC Comics set in the Batman mythology. The episode was written by co-executive producers Steven Lilien and Bryan Wynbrandt and directed by Danny Cannon. It was first broadcast on May 29, 2017. The episode is named after the 1989 studio album by American industrial rock band Nine Inch Nails of the same name.