President Trump has signed an executive order to block states from regulating artificial intelligence.