Pac-Man Design: Deterministic and Random Ghosts


My recent deep dive into Pac-Man’s design and high-level gameplay got me thinking about randomness and deterministic design elements. I’m quite a fan of randomness in game design, though it has its pros and cons. Pros include variation and unpredictability that force player improvisation. Cons include a lowered skill ceiling and a lack of player control. 

The original Pac-Man arcade version strikes a delicate balance between randomization and determinism with its Ghost AI design. In Pac-Man the Ghosts change back and forth between chase and scatter AI modes. In both modes, Ghost movement is determined by a number of factors including the other Ghosts’ positions and Pac-Man’s position. Given the same positions, the Ghosts will act the same way every time.

When Pac-Man eats a power-pellet, the Ghosts run from Pac-Man in a frightened state. At every turn, they make a random decision which way to go. During this time, Pac-Man usually has zero threats on the field, so the random Ghost movement mostly affects the player’s ability to maximize score as opposed to limiting their ability to make informed decisions at times when their life is on the line. It’s a touch of randomness that that proves the skill of the designer and the potency of randomness as a design element.

On the highest difficulty levels, Ghosts don’t turn blue and don’t become vulnerable even when Pac-Man eats a Power-Pellet! Here, the exact positions of Ghosts is the result of a complex web of deterministic rules. If you play precisely the same way every time, the Ghosts will move predictably through the maze. Of course, it takes considerable planning and skill to work out a whole pathing “patterns” for these levels, but some elite players have done it and can pull them off reliably.

images from images from

If the perfectly planned pathing pattern is mistimed by even a frame or two, if Pac-Man’s movements are not in exactly the right place at the right time, the Ghost AI will react differently, starting a chain reaction of unplanned and less predictable Ghost movement. When that happens, even the best players have to improvise.

Low- and high-level players both experience the pros of randomness playing the Pac-Man arcade game. The random Ghost frighten movement creates unpredictable challenges without threatening the player in a way that creates unfair deaths. Both knowledge and adaptation (improvisation) are required to succeed. But on the final level of difficulty, expert players engage Pac-Man in a new way, using their skill to maximize score and minimize the unknown. To play at this level of skill, players need impeccable timing and incredible precision. With a microscopic misstep, even the most pre-planned gameplay turns back into the Pac-Man experience that everyone is familiar with.

Reblog: Assault Android Cactus – Official Trailer

Assault Android Cactus is an arcade style twin-stick shooter set in a vivid scifi universe. Currently on Steam Early Access, Assault Android Cactus will be released on PC, Playstation 4, Playstation Vita and WiiU later this year.

Richard says: I got a chance to play Assault Android Cactus about a year and a half ago at GDC2014. It was one of those experiences where I kinda got a feel for the basics and then struggled to stay alive as the game got progressively harder. I’m not sure if playing it co-op made the game easier. Enemy chase AI and aiming has subtle complexity when there are more players on the field. Instead of the Geometry Wars style cone of enemies following the player, new enemies patterns are created as they switch back and forth between co-op players. Just having more “present bodies” on the field is a big deal.

Mike says: I’m curious to see how this game will rate on the Vlambeer Scale. Looks like it could do pretty well. Lots of big shiny bullets and explosions with a relatively minimal but effective amount of screenshake. I’m concerned a little about feedback clarity, because it looks like there can be a lot going on at once. Perhaps 3D graphics add to the clutter here, as well, since they’re more complex to interpret than the 2D sprites typically used in bullet hell shooters. The bullet count in Assault Android Cactus looks like it’s much lower than your typical bullet hell shooter, so maybe there won’t be a such a feedback issue. I sure hope feedback works out well, because this looks like a game I’ll enjoy.

Guest Jonathan says: The dynamic shifting arenas and enemy variety make it stand out from other twin-stick shooters that I played from the PSN store. The glowing blue bullets are great and as long as enemies and particle effects don’t obscure that, the game should be good with visual clarity.

Look forward to our Design Oriented Chat with the developers of Assault Android Cactus next week. 

Pac-Man Design: What’s Interesting About Pac-Man’s Gameplay?


Have you ever been afraid taking a closer look at a favorite and classic game might reveal that it isn’t as good as you remember? Have you wondered if your memories of a game are just a phantom, a collection of scattered thoughts you follow in an endless loop? Have you chased feelings of nostalgia trying to relive what once was? If so, then you probably can relate to the Ghosts in Pac-Man. For well-designed games, what makes them good back in the day is the same thing that makes them good today. Pac-Man’s fame is still recognized because of its polished, well-tuned gameplay. What makes Pac-Man great can be summed up like this:

Pac-Man is an action game that challenges players to move through a maze. The goal is to navigate through the twists and turns of the maze to consume each dot and Power Pellet. How you navigate is up to you: there are hundreds of ways to beat each maze. And where you need to go is easy to determine: Simply follow the trail. Playing Pac-Man would be a trivial challenge if it weren’t for the Ghosts. Avoiding, kiting, and turning the tables on the enemy Ghosts adds complexity and depth to the gameplay. The threat of running into a Ghost makes a simple pathing decision into a much more complicated one. Where you go, when you go, and why depends on the where the Ghosts are, how they’re moving, and how close Pac-Man is to Power Pellet.

A key factor in what makes Pac-Man so fun is clear feedback. With all the level and enemy elements clearly visible at a glance, the player has all the information needed to make well-informed decisions. Though Pac-Man only features a MOVE mechanic, players constantly make decisions about where and when to move by leveraging this clear feedback. Especially when players are under pressure because of the speed at which events unfold, having such good feedback keeps the Ghosts movement from feeling like frustrating ambushes from out of nowhere.


Perhaps the depth of Pac-Man gameplay can best be understood by considering how each aspect of the enemy Ghost elements makes the goal of eating all the dots and Power Pellet in the maze more difficult. Without Ghosts, the goal is easily obtained. Throw one Ghost in the maze, and crossing its path is generally the only thing a player would have to worry about. In fact, if the Ghost is constantly chasing the player, it stops becoming a threat as it will not be able to catch up to Pac-Man. One ghost is not enough. But throw in four Ghosts, and things get more interesting… at least initially. With a little maneuvering, the same problem exists. As long as the player can get all four Ghosts to follow in Pac-Man’s wake they will not be a threat.

The monotony of the chorale-and-run-away play strategy is shaken up by the Ghost AI personalities and AI modes.

“Ghosts’ movement patterns in the “scatter” phase once they’ve reached their home corner.” Image from the amazaing Pac-Man Dossier by Jamey Pittman See the Ghost switch from chase to scatter From youtube video How to Win at Pac-Man- Proper Arcade Version by stevepiers See the Ghost switch from chase to scatter From youtube video How to Win at Pac-Man- Proper Arcade Version by stevepiers

Each Ghost has a personality that determines how it moves through the maze. Yes, in general all the Ghosts appear to just follow Pac-Man around, but if we look closely only the red Ghost, “Blinky”, is completely dedicated to directly hunting Pac-Man. It always tries to close in on  Pac-Man’s exact position. In contrast “Pinky” prefers to move into the space that is a few squares in front of where Pac-Man is facing. What’s interesting is players generally interpret Pinky’s unique AI personality as being non-confrontational and easily spooked. Put Blinky and Pinky in the maze together and they often work together to head Pac-Man off and pin him from both sides.

Ghost AI modes shake things up in a much more obvious way. Ghosts will switch between “chase” and “scatter” modes on a timer. They’ll spend most of their time in “chase” mode and brief periods where they’ll “scatter.” Even if the Ghosts are closing in for the kill, when the timer goes off the Ghosts will ignore Pac-Man and retreat to their respective home corner. So even if a player manages to string the Ghosts along, it will only last as long as the AI mode timer allows. When Pac-Man grabs an energizer Power Pellet the Ghosts switch to a frightened AI mode, in which they will reverse direction and choose random turns as they run away. Between the automatic, timer-based modes (chase, scatter) and the player-activated mode (frightened), the apparent dominant strategy of kiting the Ghosts is minimized in effectiveness and players have to adjust to the constantly changing and partially unpredictable game state.


Here are more nuances and wrinkles to Pac-Man’s design that increase the challenge for players aiming for high scores:

  • Rules that determine when Ghosts leave the Ghost House
  • Bonus Fruit, an optional pickup out of the way of any necessary path
  • Blinky’s (the red Ghost) speed increase when there are fewer and fewer dots left on the field
  • Increasing difficulty of subsequent levels. Variables include Pac-Man Speed, Pac-Man Dots Speed, Ghost Speed, Ghost Tunnel Speed, Fright. Pac-Man Speed, Fright Pac-Man Dots Speed,  Fright Ghost Speed, Fright. Time (in sec.), # of Flashes
  • Warp tunnels on the sides of the map that Ghosts travel through more slowly


If you take all of these aspects into account, you can see how Pac-Man’s gameplay has enough challenge and complexity for players to spend years enjoying and mastering the game.

With relatively few mechanics, elements, and rules, Pac-Man achieves gameplay that is deep, challenging, and that dynamically changes with each play. Next in this article series, we’ll look at how Pac-Man’s design and gameplay hold up in the Google Doodle and the Google Map versions.