title: Pacman: how do the eyes find their way back to the monster hole?
body: <p>I found a lot of references to the AI of the ghosts in Pacman, but none of them mentioned how the eyes find their way back to the central ghost hole after a ghost is eaten by Pacman.</p>
  
  <p>In my implementation I implemented a simple but awful solution. I just hard coded on every corner which direction should be taken.</p>
  
  <p>Are there any better/or the best solution? Maybe a generic one that works with different level designs?</p>