Quote Originally Posted by Traveler
Very interesting! I once made a pacman clone myself and did exactly what he said. That is, I made a pacman class, ghost class etc. I even added a path finding algorithm to make the ghosts chase pacman. It did the job well and I never even gave it a second thought.

Not only does this video show that there are multiple ways to solve a problem, it also shows that often there's an even better solution than the one you already have.
I'll agree that this is an interesting solution and there are often multiple ways to solve a problem but in this particular case there's a small issue with the solution as far as I can see.

Imagine a setup like this:
# #
##########|###
-G -PG
########## ###
# #

#: Wall
G: Ghost
P: Pacman
- or |: Trail

The first ghost and Pacman are moving left while the second ghost is moving downwards. The first ghost has caught pacmans sense and is chasing him. As we can see Pacman is in trouble. However the second ghost has just reached a crossroad section and has to decide where to go next. There's no trail from Pacman to follow so he'll just choose a random direction and with a bit of luck Pacman msy survive this situation even though he should clarly be dead.

As far as I can see, this method is good for making ghosts chasing Pacman where Pacman has already been but if he's coming right towards a ghost, the ghost will not discover it unless the AI is improved on.