Games and AI

Games are essentially a chain reaction of decisions, each affecting the following. Sure, that is the saddest and least wonderous interpretation of a game, but if you are a machine, that is how you see this cascading set of choices. My opponent did A; therefore, I will do B, which then causes them to do C. We might have some strategy or tricks up our sleeve, but in the end, we are continuously making choices based upon our known information, what the other person has done, and what we extrapolate as to the most likely future move. 

Suddenly, when you put it like this, playing a game, something that can feel very human (after all, we are the only animal who engages in this kind of play just for entertainment), somehow appears very robotic. The structure of games and choices became even more important when the first personal computers started trying to garner our attention with computer versions of games such as checkers and chess. How to design games based on a seemingly endless process of choices?

Game theory and AI work together more than most people might think. Most popular games nowadays heavily rely on AI and game theory, especially those where more than one person is involved in solving a puzzle. 

To understand how game theory and AI work to create some of our favorite games, there are a few concepts we need to familiarize ourselves with first. 

Nash Equilibrium

Considered to be the core of the game theory, the Nash Equilibrium is the equilibrium of collaboration between players in a game. This means if all players had all of the available information, neither would benefit from changing their strategy. The best example of this is the game the Prisoners Dilemma. In this thought experiment, you and another player get caught holding up a bank:

  • If only one of the two players confesses, they will walk and the other player will spend ten years in jail.

  • If neither confesses, it's just one year in jail for each player.

  • If both confess, each gets five years.

While that one year each sounds like the best option, it's not particularly likely. Instead, the Nash Equilibrium is reached when both players confess. Sure five years is a long time, but no one is going away for so long that they miss their kids grow up. The Nash Equilibrium is all about finding the max profit situation for both players. 

Another excellent example of Game Theory and AI at work is this OpenAI game of hide and seek. If you haven't seen it before, I very much recommend it. There are two teams, red and blue, and they play round after round of hide and seek. After each successful game, however, the teams learn how to adapt and better use the tools available to them. 

How else can game theory and AI be used?

Game theory and AI can be essential tools in developing that stupid and incredibly addictive mobile game you just can't put down. Still, the technology has larger, arguably more important ramifications as well. Generative Adversarial Networks (GANS), machine learning algorithms, imitation and reinforcement learning, and manipulation-resistant systems all require game theory. Essentially, anything where there is more than one person or agent trying to solve a logical problem, we can use game theory's mathematical functions. 

A current and much larger example of this is self-driving cars. It is relatively easy for one automated car to drive around. The equation becomes much more complicated when the algorithm has to take numerous vehicles into account, each trying to make these calculations in real-time. Each car is essentially battling for space on their ideal path to their location, trying to "win" by increasing speed and efficiency and avoiding "losing" by hitting their angry neighbors' mailbox or worse. 

We are overcoming some limitations of game theory and AI by programming in certain decisions- like if in an emergency you have to hit one, an old lady crossing the street, or a mailbox, it's the mailbox every time. Other decisions are more complicated. Game theory expects that each player is competent and selfish, and while when we are stuck in traffic is probably an example of when we are the most selfish, deep down, we are social creatures. We express cooperation and care, sometimes, even in rush hour. We show acts of selflessness by allowing others to merge or by not sneakily parking in the handicapped spot, even if we are just going to be a minute.

To read this article in its original publishing, click here

Previous
Previous

What to consider before investing in AI?

Next
Next

You have to know the past to understand the present