You may recall DeepMind as the computer that bested human Go players for the first time last years. Now, researchers have been using it to explore the limits of game theory — a field of psychology that analyzes how people respond to cooperative and competitive opportunities. The team found that when DeepMind suspects that it’s about to lose, it will switch to “highly aggressive” tactics to either win or maximize damage to its opponents.

Researchers ran a simple fruit gathering program in which two versions of DeepMind would compete to gather as many apples as possible. After tens of millions of turns, the team found that as long as there was enough fruit for both AI, there wasn’t a problem. But when things got tight, the AI would try to eliminate one another and steal all the apples.

What’s particularly interesting is that this aggression only popped up when Google used more powerful versions of DeepMind. The more powerful the network of computer systems fueling the AI’s algorithms, the more likely they were to use aggressive tactics.

“This model … shows that some aspects of human-like behavior emerge as a product of the environment and learning… Less aggressive policies emerge from learning in relatively abundant environments with less possibility for costly action,” Joel Leibo, a researcher on the project told WIRED. “The greed motivation reflects the temptation to take out a rival and collect all the apples oneself.”

The good news is that when working with a different game, the team got notably more pro-social behavior out of DeepMind. In a different game, the AI were taught to cooperate with one another for mutual benefit. This shows that the AI can analyze its environment and then create and teach itself the optimal strategy for survival.

In many ways, this mirrors what we’ve seen in the real world. The two species closest to humans are Chimps and their slightly smaller cousins the Bonobos. Both live in very close proximity, but for the most part Bonobos are peaceful and solve most of their problems with sex. Chimps, on the other hand, are ruthless, violent, and sometimes cannibalistic. Many evolutionary anthropologists have suggested that this difference is the natural result of resource scarcity. Chimps have to struggle to survive, whereas Bonobos have things comparatively easy.

Google suggests that the most important conclusion of the study is how to construct environments and learning scenarios that reinforce cooperation. If we take the right approach and give AI the right priorities, there’s no reason we couldn’t prevent an AI apocalypse. Similarly, it reinforces some modern conclusions about our society — namely that systems like capitalism actively encourage destructive and exploitive tactics. But if you can change the structure of the game we’re all playing, then it’s possible we’ll all be a little more altruistic.