Her Vs. Ex-Machina: Writing Artificial Intelligence