Dozens of countries have endorsed a set of guidelines on the responsible use of artificial intelligence in combat. China was among the countries attending a summit that did not sign.