Actually, that just gave me a story too.
Pretty much as you said, but with an added twist. The entire story would focus on the AI and its extermination of human kind. Throughout the story, it gets smarter and smarter, but also starts noticing thing that humans do which baffles it. Originally it would answer these with common logical answers (brain stimuli, biological chemical reactions, etc) but as it progresses, it learns different ways to approach new information.
At one point or another, it spares a human being because it finds no reason to exterminate it (Should I waste my ammo on a single life?). Even though slower than most, it starts to become more human.
At the end of the story, realizing the futility and meaninglessness of human extermination, it builds a rocket and leaves the planet, hoping to find meaning in the infinite cosmos. The humans believed it had surrendered and ran away, and are seen rejoicing.
Dear fanfic writers.Stop using hair color to differentiate the characters to your readers.
Help fund the $15 daily operational cost of Derpibooru - support us financially!