For movies like Terminator and The Matrix not to be fundamentally flawed those robots would have to be controlled by an actual human. Because, why would robots want to stay on earth if they had the intelligence and access to live anywhere else. They must be protecting someone.