In less than 24 hours, Microsoft’s artificial intelligence project modeled after an American teenage girl went from making awkward conversation in broken syntax to spewing hateful, fully formed tweets laden with racial slurs. But as startling as the offensive tweets were, the incident shows how...