I’m not an expert in Reinforcement Learning, but your description seems to point towards this field of machine learning, which uses rewards as a training signal and thus can be used to learn how to play video games.
One interesting thing in my opinion is the creation of rewards.
Let’s stick to video games, since you’ve mentioned them. While some “moves” might give a negative reward after their execution (you might lose life or points in any sense), they might be beneficial in the long run and you might even win the game with them.
Also, it’s always funny to watch when some agents are focusing on the “wrong” rewards while playing games, such as here:
CoastRunners 7

The learned movement of grabbing these “turbo” boxes gave apparently more points than winning the game and was thus considered to be better. 
This is also an interesting article from OpenAI:

  
      
      OpenAI – 17 Sep 19
  
  
    

Emergent Tool Use from Multi-Agent Interaction 1

We've observed agents discovering progressively more complex tool use while playing a simple game of hide-and-seek.