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.Originally Posted by Traveler
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.
Bookmarks