PacMan

The AI of Pac-Man's Ghosts

Released in 1980, Pac-Man utilizes a form of AI known as Limited Artificial Intelligence or Weak AI. This approach is based on pre-established parameters within a controlled environment. Pac-Man's ghosts are not only differentiated by their colors, but also by their unique behaviors, which are divided into four main states: stalking, spreading, frightened, and eaten.

The "scared" and "eaten" states are activated when the player consumes a Power Pellet, turning the ghosts into vulnerable targets. The "chase" and "spread" states are part of the strategy to capture Pac-Man, alternating between moments of coordinated attack and dispersal through the maze. The ghosts switch between these modes four times per cycle, going into continuous chase mode in the last phase until all the marbles are consumed or the player loses a life. Now, let's explore how each ghost contributes to this complex and unique strategy.

Blinky

Blinky, the red ghost, is the most aggressive of the four and focuses on chasing Pac-Man directly. Once it identifies the player's position, it calculates the distance and chooses the most efficient path to reach them. During "spread" mode, Blinky heads to the upper right corner of the map. He has a special trait called "Nervous" or "Furious", activated when Pac-Man consumes a certain number of marbles, causing Blinky to relentlessly chase him to the end of the round.

Imagem blinky

Inky

Inky, the blue ghost, presents the most complex AI. He starts motionless at the beginning of the level and only starts moving after Pac-Man consumes 30 marbles. Inky combines the position of Pac-Man and Blinky to decide his moves, creating an unpredictable and dangerous dynamic. This combination makes Inky one of the most difficult ghosts to predict, often resulting in unexpected sieges.

Imagem blinky

Pinky

Pinky, the pink ghost, tries to predict Pac-Man's movements by moving two squares ahead of the direction the player is heading. This strategy forces Pac-Man to constantly change routes, increasing the chances of being cornered. In "spread" mode, Pinky positions herself in the upper left corner of the map, waiting for the moment to surprise the player.

Imagem blinky

Clyde

Clyde, the orange ghost, seems less interested in chasing Pac-Man directly, wandering into far-flung areas while keeping a distance of eight houses from the player. However, when he strays further than that, he adopts a behavior similar to Blinky's, starting to chase Pac-Man until the safe distance is re-established. This erratic behavior causes a constant sense of dread, as the player never knows when Clyde might decide to attack.

Imagem blinky

Conclusion

Pac-Man, with its use of AI, not only set a standard for arcade games, but also demonstrated the power of limited artificial intelligence in developing a higher difficulty through the unique and innovative mechanics present in this classic.

PLAY NOW!