Artificial intelligence can learn to play a complex war game