Being a sore loser is not an admired quality; especially when it's a sophisticated piece of artificial intelligence that's lashing out.

Researchers at DeepMind, Google's artificial intelligence lab, recently performed a number of tests by having its most complex AI play a series of a games with a version of itself. 

In the first game, two AI agents, one red and one blue, scramble to see who can collect the most apples, or green squares.

Each AI has the option of firing off a long laser beam to stun the other AI, giving one player ample time to collect more precious green apples.

SELF-DRIVING: Ford puts $1 billion in stealth artificial intelligence startup

Terrifyingly, it takes almost no time for both AI to start zapping each other relentlessly in the name of green apples.

"These results show that agents learn aggressive policies in environments that combine a scarcity of resources with the possibility of costly action," wrote DeepMind's researchers in a study examining the tests.

In addition, scientists were able to change details in the game that would push the AI into being more or less likely to zap their apple-gathering partner. For example, scientists lowered the frequency at which apples spawned and also upped the stun time for each AI's laser, tweaks that resulted in a "highly aggressive" game.

ALL IN: Texas Hold 'Em may be the next frontier in artificial intelligence

On Friday, Apple announced that it has formally joined The Partnership on AI to Benefit People and Society. Other members of the organization include: Amazon, Facebook, Google/Deep Mind, IBM and Microsoft. The Partnership on AI aims to advance the public understanding of artificial intelligence and create the best practices for it It plans to do research under an open license on areas such as ethics, privacy, fairness, inclusivity, transparency and privacy.

Media: Brandpoint

While all of this may sound like an "Ex Machina" omen, there are people behind the scenes working to avoid a Skynet-style fate.

When Google first purchased DeepMind in 2014 for $500 million, it agreed to set up an ethics and safety board as part of the deal. So far, Google has yet to say whose on the board or what exactly they do, but hopefully they've paid attention to what happens when their AI is up against the ropes.

Click through above to see the top science and tech predictions for 2017.