Microsoft Creates an AI to Beat Ms. Pac-Man

Pac-Man is one of the most popular and best-selling arcade games of all time and is simple to follow. The player is placed in a maze filled with food (depicted as pellets or dots) and needs to eat all of it to advance to the next level. This task is made difficult by four ghosts that pursue Pac-Man through the maze. If Pac-Man contacts any of the ghosts, the player loses a life. After all three lives are lost, the game’s over. In the making of Ms. Pac-Man, in order to increase the difficulty, the creators added in a few new mazes and decided to make the fruit, a high point item, and more of a challenge to collect by making it move across the field. Also, instead of having a set time when the ghosts switch between scatter and chase mode, they completely randomized it.

The ghosts in Pac-Man are always in one of three possible modes: Chase, Scatter, or Frightened. This is when the ghosts pursue Pac-Man, avoid Pac-Man, or turn blue and can be eaten by Pac-Man. In order to be successful in Pac-man, you must understand ghost behavior. The key to understanding ghost behavior is the concept of a target tile. Most of the time, each ghost has a specific tile that it is trying to reach, and its behavior revolves around trying to get to that tile from its current one. When approaching “intersection” tiles, which is indicated in green in the picture, the choice of which direction to turn is made based on which tile adjoining the intersection will put the ghost nearest to its target tile, measured in a straight line. The ghost will choose the path with the shorter straight line. However, this can result in the ghosts selecting the “wrong” turn when the initial choice places them closer, but the overall path is longer. Note that target tiles are only used in chase and scatter mode. In frightened mode, the ghosts pseudorandomly decide which turns to make at every intersection.

The ghosts’ AI is very simple, which makes the complex behavior of the ghosts even more impressive. Ghosts only ever plan one step into the future as they move about the maze. Whenever a ghost enters a new tile, it looks ahead to the next tile that it will reach and decides which direction it will turn when it gets there.

With the ghost’s behavior being more random in Ms. Pac-Man, Microsoft’s AI, the player, had to rely on assigning every object on the maze a priority which then influenced the player’s behavior as it moved throughout the maze. For example, the player knew how to avoid the ghost because of the huge priority it had the closer it got to it. When the ghost turned to frighten mode and could be eaten, the priority then flipped and the player knew to follow after it. With the use of priorities and a heat map of the game.

The AI was able to navigate through every level of the game while avoiding all of the ghosts and eating all of the food on each maze. This led to the AI being the first player to ever beat Ms. Pac-Man with a perfect score of 999990. However, because this wasn’t an actual person, the actual world record is held by a player who obtained a score of 933580 themselves.

https://www.gameinformer.com/b/features/archive/2015/11/03/inside-the-development-of-ms-pac_2d00_man.aspx

https://www.youtube.com/watch?v=TpB1B9Tr_ck

2 thoughts on “Microsoft Creates an AI to Beat Ms. Pac-Man

  1. AI is becoming an increasing trend in all aspects of life from automated homes to video games and sports. While AI is being used to advance our abilities in the digital world such as in the game of Pack Man as stated above it is also starting to become more prevalent in the physical world. AI is starting to be used a lot more in sports in being able to predict the other teams next move or to analyze the players in order to help improve their abilities. As shown in the article above AI was able to predict the movements and behavior patterns of the ghosts in order to beat the game with a perfect score. This same technology is also starting to used in sports. Sports such as baseball are starting to use AI to determine how the players are placed on the field for different batters on the other team to maximize the potential of getting an out. AI is also becoming so advanced that there is the possibility of AI replacing referees in sports as now AI can see and track the movements and call out penalties in sports.

Leave a Reply