Artificial intelligence learns teamwork in a deadly game of capture the flag