https://en.wikipedia.org/wiki/I_Have_No_Mouth,_and_I_Must_Scream
The story is set against the backdrop of World War III, where a sentient supercomputer named AM, born from the merging of the world’s major defense computers, eradicates humanity except for five individuals. These survivors—Benny, Gorrister, Nimdok, Ted, and Ellen—are kept alive by AM to endure endless torture as a form of revenge against its creators. The story unfolds through the eyes of Ted, the narrator, detailing their perpetual misery and quest for canned food in AM’s vast, underground complex, only to face further despair.