The Wayback Machine - https://web.archive.org/web/20240714092859/https://www.geeksforgeeks.org/game-theory-in-ai/
Open In App

Game Theory in AI

Last Updated : 30 Dec, 2021
Improve
Improve
Like Article
Like
Save
Share
Report

Game theory is basically a branch of mathematics that is used to typical strategic interaction between different players (agents), all of which are equally rational, in a context with predefined rules (of playing or maneuvering) and outcomes. Every player or agent is a rational entity who is selfish and tries to maximize the reward to be obtained using a particular strategy. All the players abide by certain rules in order to receive a predefined playoff- a reward after a certain outcome. Hence, a GAME can be defined as a set of players, actions, strategies, and a final playoff for which all the players are competing. 
Game Theory has now become a describing factor for both Machine Learning algorithms and many daily life situations. 
Consider the SVM (Support Vector Machine) for instance. According to Game Theory, the SVM is a game between 2 players where one player challenges the other to find the best hyper-plane after providing the most difficult points for classification. The final playoff of this game is a solution that will be a trade-off between the strategic abilities of both players competing. 

Types of Games: 
Currently, there are about 5 types of classification of games. They are as follows: 

  1. Zero-Sum and Non-Zero Sum Games: In non-zero-sum games, there are multiple players and all of them have the option to gain a benefit due to any move by another player. In zero-sum games, however, if one player earns something, the other players are bound to lose a key playoff.
  2. Simultaneous and Sequential Games: Sequential games are the more popular games where every player is aware of the movement of another player. Simultaneous games are more difficult as in them, the players are involved in a concurrent game. BOARD GAMES are the perfect example of sequential games and are also referred to as turn-based or extensive-form games.
  3. Imperfect Information and Perfect Information Games: In a perfect information game, every player is aware of the movement of the other player and is also aware of the various strategies that the other player might be applying to win the ultimate playoff. In imperfect information games, however, no player is aware of what the other is up to. CARDS are an amazing example of Imperfect information games while CHESS is the perfect example of a Perfect Information game.
  4. Asymmetric and Symmetric Games: Asymmetric games are those win in which each player has a different and usually conflicting final goal. Symmetric games are those in which all players have the same ultimate goal but the strategy being used by each is completely different.
  5. Co-operative and Non-Co-operative Games: In non-co-operative games, every player plays for himself while in co-operative games, players form alliances in order to achieve the final goal.

Nash equilibrium: 
Nash equilibrium can be considered the essence of Game Theory. It is basically a state, a point of equilibrium of collaboration of multiple players in a game. Nash Equilibrium guarantees maximum profit to each player. 
Let us try to understand this with the help of Generative Adversarial Networks (GANs). 

What is GAN? 
It is a combination of two neural networks: the Discriminator and the Generator. The Generator Neural Network is fed input images which it analyzes and then produces new sample images, which are made to represent the actual input images as close as possible. Once the images have been produced, they are sent to the Discriminator Neural Network. This neural network judges the images sent to it and classifies them as generated images and actual input images. If the image is classified as the original image, the DNN changes its parameters of judging. If the image is classified as a generated image, the image is rejected and returned to the GNN. The GNN then alters its parameters in order to improve the quality of the image produced. 
This is a competitive process which goes on until both neural networks do not require to make any changes in their parameters and there can be no further improvement in both neural networks. This state of no further improvement is known as NASH EQUILIBRIUM. In other words, GAN is a 2-player competitive game where both players are continuously optimizing themselves to find a Nash Equilibrium. 

But how do we know if the game has reached Nash Equilibrium? 
In any game, one of the agents is required to disclose their strategy in front of the other agents. After the revelation, if none of the players changes their strategies, it is understood that the game has reached Nash Equilibrium. 
Now that we are aware of the basics of Game Theory, let us try to understand how Nash Equilibrium is attained in a simultaneous game. There are many examples but the most famous is the Prisoner’s Dilemma. There are some more examples such as the Closed-bag exchange Game, the Friend or For Game, and the iterated Snowdrift Game. 
In all these games, two players are involved and the final playoff is a result of a decision that has to be made by both players. Both players have to make a choice between defection and co-operation. If both players cooperate, the final playoff will turn out to be positive for both. However, if both defect, the final playoff will be negative for both players. If there is a combination of one player defecting and the other co-operating, the final playoff will be positive for one and negative for another. 
Here, Nash Equilibrium plays an important role. Only if both players jot out a strategy that benefits each other and provide both with a positive playoff, the solution to this problem will be optimal. 
There are many more real examples and a number of pieces of code that try to solve this dilemma. The basic essence, however, is the attainment of the Nash Equilibrium in an uncomfortable situation.

 Where is GAME THEORY now? 
Game Theory is increasingly becoming a part of the real-world in its various applications in areas like public health services, public safety, and wildlife. Currently, game theory is being used in adversary training in GANs, multi-agent systems, and imitation and reinforcement learning. In the case of perfect information and symmetric games, many Machine Learning and Deep Learning techniques are applicable. The real challenge lies in the development of techniques to handle incomplete information games, such as Poker. The complexity of the game lies in the fact that there are too many combinations of cards and the uncertainty of the cards being held by the various players.
 



Similar Reads

Coalitional Game theory
Coalitional game theory has now become the dominant group of game theory which makes sure of the group preference rather than individual actions. It focuses more on the group than an individual agent as the basic modelling unit. More precisely, we will still be modelling the individual preferences of agents, but definitely not their possible action
5 min read
Decoding Game Theory's Folk Theorem
The folk theorem, which came into existence in the late fifties became a widespread phenomenon in artificial intelligence and game theory. This article is all about exploring Game theory and Folk Theorem. Game TheoryGame theory is an area of mathematics and economics that investigates strategic interactions between rational decision-makers. It prov
9 min read
Rough Set Theory | An Introduction
The notion of Rough sets was introduced by Z Pawlak in his seminal paper of 1982 (Pawlak 1982). It is a formal theory derived from fundamental research on logical properties of information systems. Rough set theory has been a methodology of database mining or knowledge discovery in relational databases. In its abstract form, it is a new area of unc
4 min read
Rough Set Theory | Properties and Important Terms
Prerequisite - Rough Set Theory The main goal of the rough set analysis is the induction of approximations of concepts. Rough sets constitute a sound basis for Knowledge Discovery in Database. It offers mathematical tools to discover patterns hidden in data. It can be used for feature selection, feature extraction, data reduction, decision rule gen
4 min read
Mastering Generalized Cross-Validation (GCV): Theory, Applications, and Best Practices
Generalized Cross-Validation (GCV) is a statistical method used to estimate the prediction error of a model, particularly in the context of linear regression and regularization techniques like ridge regression. It is an extension of the traditional cross-validation method, designed to be rotation-invariant and computationally efficient. In this art
15 min read
ML | Dempster Shafer Theory
Dempster-Shafer Theory was given by Arthur P. Dempster in 1967 and was later developed by his student Glenn Shafer in 1976. This theory was released because of the following reason:- Bayesian theory is only concerned about single evidence.Bayesian probability cannot describe ignorance.Dempster Shafer TheoryDempster Shafer Theory(DST) is an evidence
4 min read
Information Theory in Machine Learning
Information theory, introduced by Claude Shannon in 1948, is a mathematical framework for quantifying information, data compression, and transmission. In machine learning, information theory provides powerful tools for analyzing and improving algorithms. This article delves into the key concepts of information theory and their applications in machi
5 min read
Gesture Controlled Game in Machine Learning
Let us discuss gesture-controlled game using TensorFlow, I hope this article will be much interesting as it provides a holistic gaming experience at the end. We begin by describing the modules necessary to develop this game. Necessary LibrariesWe start our coding by importing the necessary libraries, including cv2 for capturing video from the webca
11 min read
AI Driven Snake Game using Deep Q Learning
Content has been removed from this Article
1 min read
How to Use ChatGPT Canva Plugin to Up Your Social Media Game
OpenAI has added many new plugins to improve the user experience and make it more meaningful. In the digital landscape era, a fusion is required between Canva and ChatGPT to create visual wonders, and this is available in ChatGPT Canva plugin form. Canva is the most widely used graphic design platform by content creators, digital marketers, busines
11 min read