Pacman ghosts have certain behavior algorithms
Each ghost in Pac-Man is programmed with its own unique behavior pattern: red chases you, pink just tries to position itself in a set way, blue tries to ambush you, and orange is random.