Game Theory and AI

Game theory, as we have been studying, is a great way to help you choose the best options when playing any sort of game that fits under the conditions of game theory. However, how could we teach AI this concept in order to help AI understand games better?

Developers have already worked with implementing game theory into a specific type of game AI called “GANs”. These are AI setups that consist of two nerual networks: a generator and a discriminator. The generator creates random game states, and then the discriminator decides whether or not if it could be true.

Generally, these AIs use what is called a “neural network”. These are AIs that develop themselves by mimicking human evolution. You define a reward, as we would as game theory specifies for any given game, and let it go at it. It will compare the reward it achieved between two iterations, and discard the one that scored lower. Using this and giving it plenty of time, it will learn how to play games!

By setting these two neural network setups in a GAN to compete with each other, they will eventually through time end up finding a Nash Equilibrium between each other after a while of competition.

There is a certain AI program that uses this, called Libratus, which was developed to play poker. Libratus managed to defeat several of the top poker players by using game theory!

Furthermore, it is being considered to take these kinds of AI to apply game theory and neural networks to the real world. Although, this could be disastrous if the AI is poor. We must make the utmost caution to make the best AI possible if we are to take this further into the real world!

A neural network learning to play “Mario”

AI is masterful when we teach concepts to it correctly. By teaching it game theory correctly, it is scary how good at games AI can become.

Source: https://www.analyticsvidhya.com/blog/2019/11/game-theory-ai/

Graphs and Video Game Matchmaking

Have you ever had one guy throwing your match in that MOBA (multiplayer online battle arena) game, FPS (first person shooter), or other game? A lot of the time I certainly had this occur, and its not fun. Sometimes, when matched up with teammates of similar skill as well as opponents of similar skill, these result in the best possible matches you can have as things get super close. Zhenxing Chen, a researcher at Northeastern University, has created a matchmaking algorithm that uses familiar items we have learned in class.

The algorithm begins by taking all other players in the que and puts them into a complete graph. Each edge has what is called a “churn” rating. Essentially, this is measured by how much time has elapsed since the last matchmaking decision was made and the time elapsed before the player chose to play the game again. Players are matched by attempting to pair the minimum sum of edges.

This model focuses on maximizing player engagement, rather than on player skill like other matchmaking systems including the “Bradley-Terry” model or the “elo” model. While this may cause some more imbalance in terms of player skill for matchmaking, this model will result in more player engagement, and therefore more player retention.

A phrase commonly used in MOBAs for someone who really wants to play mid

But how do we measure player engagement correctly? Some factors that we can say for sure are both time spent playing and/or money spent playing the game. Additionally, as discussed above, time between sessions can also be a good factor. If a player had a very poor matchmaking experience, this makes it more likely that they will want to quit the game or take a long break from it. However, good matchmaking experiences will make players want to play more, therefore resulting in a shorter time period between matchmaking processes.

There where a few very interesting finds when experimenting with this algorithm. For the scenario of a players total wins plus the total amount of losses is greater than two times the amount of draws, then our engagement matchmaking algorithm is approximately equal to the skill based models discussed previously. However, if it is less than rather than greater than, then skill based matchmaking ends up being the worst form of matchmaking.

When testing out the engagement matchmaking algorithm, it was tested with a random sample of players between 100 to 500 in size. The matchmaking systems used were worst matchmaking, skill based matchmaking, random matchmaking, and our engagement matchmaking. The engagement matchmaking managed to have slightly higher player retention than all the other forms of matchmaking.

It is very cool to see how graphs can be used for video game matchmaking like this, especially when it is within your favorite hobby. Graphs can be very useful in the most unexpected ways!

Source: https://arxiv.org/pdf/1702.06820.pdf