How Pac-Man actually works
If you've played Pac-Man for an hour, you've probably noticed the ghosts don't all behave the same way. The red one chases you directly. The pink one seems to anticipate where you're going. The other two are weirder — sometimes harmless, sometimes lethal at exactly the wrong moment.
That's not random. Toru Iwatani designed each ghost with a distinct personality and the 1980 code assigns each one a different targeting algorithm. Once you understand the four behaviors, Pac-Man stops being a panic simulator and starts being a strategy game.
The maze and why it never changes
The original 1980 Pac-Man has exactly one maze. Every level uses the same layout: 240 small dots, 4 power pellets in the corners, two warp tunnels on the left and right edges, and a ghost house in the center where the four ghosts respawn.
What changes between levels isn't the maze — it's:
- Ghost speed (faster each level)
- Pac-Man's speed (also faster, but the ratio shifts to favor ghosts)
- How long the power pellets affect the ghosts (shorter each level — by level 19 they have no effect at all)
- Which fruit appears in the center and what it's worth
This is one reason Ms. Pac-Man, released in 1981, was so popular: it added four rotating mazes, which broke the monotony of memorizing one layout.
The four ghosts and their AI
This is the most important thing to understand about Pac-Man. Each ghost has a unique targeting algorithm. Once you know which is which, you can predict where they'll go and exploit the gaps.
Blinky (red) — the Shadow
Blinky is the pure pursuit ghost. His target is always your exact tile, on every frame. He just chases you directly.
There's one twist: once you've eaten a certain number of dots in a level, Blinky enters "Cruise Elroy" mode and speeds up. By the late game he's faster than you.
How to use this: Blinky is the easiest to predict but most dangerous late-game. Always keep a planned exit route mapped for him specifically.
Pinky (pink) — the Speedy / Ambusher
Pinky targets the tile four spaces in front of where you're facing. She's trying to cut you off, not chase you.
There's a famous bug in the original code: when Pac-Man is facing up, Pinky's target is calculated as four tiles up AND four tiles to the left, because of an overflow in the original assembly code. Speedrunners exploit this — facing up makes Pinky behave more erratically and predictably.
How to use this: If a ghost feels like it's reading your mind, that's Pinky. Reverse direction suddenly when you see her closing in from ahead — her target was based on your old direction, and she has to recalculate.
Inky (cyan) — the Bashful
Inky is the strangest. His target depends on both your position and Blinky's position. The game draws a vector from Blinky's tile through the tile two spaces in front of Pac-Man, then doubles that vector. Wherever it lands becomes Inky's target.
In plain English: Inky tries to flank you from the opposite side of where Blinky is approaching.
How to use this: Inky is the hardest to predict because his behavior depends on two other things moving simultaneously. The general rule — if Blinky is behind you, Inky will try to get in front.
Clyde (orange) — Pokey
Clyde is the wild card. When he's more than 8 tiles away from Pac-Man, he behaves like Blinky and chases directly. When he's closer than 8 tiles, he flees to his designated scatter corner (the bottom-left of the maze).
This makes Clyde almost harmless if you're paying attention — he'll never close the gap. He's most dangerous when you're already cornered by another ghost.
How to use this: When Clyde appears alone, don't panic. Move away calmly and he'll often run from you.
Scatter mode vs chase mode
All four ghosts have two modes: chase (where the AI above applies) and scatter (where each ghost retreats to a specific corner of the maze and circles it).
The game switches between modes on a fixed timer:
- Scatter 7s → Chase 20s → Scatter 7s → Chase 20s → Scatter 5s → Chase 20s → Scatter 5s → Chase (forever)
These timings get shorter in later levels. The scatter phase is your breathing room — it's the safe window to grab pellets in dangerous areas.
There's a third mode, frightened, triggered when Pac-Man eats a power pellet. The ghosts turn blue, slow down, reverse direction, and choose random turns at every intersection. This is the only time you can attack them.
Power pellets and the scoring chain
The four flashing pellets in the corners turn ghosts blue for a brief window. Each ghost you eat during one power pellet's duration scores progressively:
| Ghost eaten | Points |
|---|---|
| 1st | 200 |
| 2nd | 400 |
| 3rd | 800 |
| 4th | 1,600 |
Eating all four ghosts on a single power pellet is worth 3,000 points — over 10x the value of eating them one at a time across the level. Top scorers chain ghost eats on every power pellet through level 17 or so, after which power pellets become useless.
The fruit and bonus items
A piece of fruit appears in the middle of the maze twice per level. Eating it gives bonus points:
| Level | Fruit | Points |
|---|---|---|
| 1 | Cherry | 100 |
| 2 | Strawberry | 300 |
| 3–4 | Orange | 500 |
| 5–6 | Apple | 700 |
| 7–8 | Melon | 1,000 |
| 9–10 | Galaxian flagship | 2,000 |
| 11–12 | Bell | 3,000 |
| 13+ | Key | 5,000 |
The key appears every level from 13 onward. Eating both keys at every level is essential for high scores.
The level 256 kill screen
This is the most famous bug in arcade history. Pac-Man uses a single byte (8 bits) to store the current level number. A byte can hold values from 0 to 255. When you complete level 255 and the game tries to load level 256, the level counter overflows.
The game uses this same byte to figure out how much of the level-256 screen to fill with dots. Because of the overflow, the right half becomes a garbled mess of characters, numbers, and symbols pulled from the game's data tables.
You can still play the left half normally, but you can't clear all the dots, so the level can never be completed. This is the "kill screen." Reaching it is considered the equivalent of beating the game.
How patterns work
Because Blinky and Pinky's behavior is deterministic (no randomness in chase mode), expert players use patterns — fixed sequences of moves that, if executed precisely from a known starting state, guarantee a survivable run through the maze.
The most famous is the "first board pattern": a memorized sequence that clears level 1 without any close calls. Once you reach a power pellet, executing it perfectly lets you chain all four ghost eats every time.
Patterns break down at higher levels because the timings get tighter and the AI starts behaving slightly differently due to speed changes. From level 17 onward, players have to rely on adaptive play rather than memorization.
Where to play
If you want to test what you just read, try it on one of these:
- Classic Pac — the closest recreation of the 1980 arcade Pac-Man on this site
- Flash Pac — slightly modernized visuals, identical mechanics
- Ms. Tapman — if you want to see how Ms. Pac-Man's four rotating mazes change the strategy
- Anti-Pacman — for a perspective shift: play as a ghost trying to catch Pac-Man
Related guides
- What Type of Game Is Pac-Man?
- Make a Pac-Man game in Scratch
- Every Pac-Man variant ranked →
- Pac-Man for every player →
- The complete history of Pac-Man →
Deep-dive articles:
- Is Pac-Man faster than the ghosts?
- The Pac-Man kill screen bug
- Pac-Man cheat codes
- Pac-Man vs. Ms. Pac-Man
💡 Browse our full directory of Pac-Man games online — 34 games, no download required.