Before artificial intelligence became a buzzword for a kind of souped-up autocomplete function on your phone, science fiction dealt with questions of self-aware AI within somewhat limited frameworks.