North Korea has tested missiles guided by artificial intelligence for the first time, according to state media.