President Trump warned Wednesday that nations must manage potentially dangerous elements of artificial intelligence, acknowledging risks associated with the rapidly advancing technology, while insisting that America cannot fall behind China.