Which is exactly the plot of Ex Machina right? And also why I think that film is so much more believable than it's contemporaneous AI-themed sibling, Her.
The whole “Cogito Ergo Murder” trope isn't very realistic at all, and Ex Machina if anything seems to be very subtle in this regard: Ava might be just a goal-maximising algorithm with a very broad toolbox, Kyoko (insofar as she transcends her programmed limits and deeply surprises her creator) might be the “True AI” in the show.