It's one of the most famous plots in fiction. Humans create robots -- or artificial intelligence -- who inevitably destroys the human race. In real life, can AI actually cross that line? When confronted with a scenario that pits one AI agent against another, are they likely to be aggressive or cooperative?

Google's AI division in London called DeepMind set out to solve this riddle, according to a report from Engadget. The study, entitled "Multi-agent Reinforcement Learning in Sequential Social Dilemmas," tested the AI by designing two new games: "Gathering" and "Wolfpack." Both afforded the researchers a look on how AI agents are likely to react when presented with different objectives and rules.

'Gathering' and Aggression

In the first game, "Gathering," two agents are shown as colored squares, both given the task of picking up "apples." They're also equipped with lasers to temporarily zap the other agent away from the playing field.

In the beginning of the game, with plenty of apples to spare, the pair of agents left each other alone and coexisted peacefully. As the number of fruits decreased, they became more aggressive, shooting their lasers at each other.

DeepMind discovered that as the agents' cognitive capacity or "intelligence" increased, the more aggressive they became. These agents also tended to fire their lasers more even if there were still plenty of fruits, eliminating the competition earlier on.

'Wolfpack' and Cooperation

The second game is called "Wolfpack," which had two agents tasked with finding a third one. In this game, the researchers found that increased cognitive capacity led to better teamwork between the two agents on the lookout.

The results of both games showed a significant effect of increased intelligence on AI. However, their tendency to be more aggressive or cooperative depended heavily on the game's objective and what's required to be successful on their task. In "Gathering," aggression is rewarded, while "Wolfpack" agents benefitted from cooperation.

Lead author of the study, Jon Leibo, told Bloomberg that the agents used in both games were not programmed with short-term memory, meaning they're unable to figure out the intent of the other agents in the game.

"Going forward it would be interesting to equip agents with the ability to reason about other agent's beliefs and goals," he added.

There's no real-world application for the study findings yet, but it could help in future environments when artificial intelligence might be utilized in complex systems such as city traffic, stock markets and the like.