The Department of Defense announced on Friday that it had struck deals with seven leading artificial intelligence companies.