Hmm...I tried to implement this exact concept in my Pacman game, but it took too long so I said the heck with it and that's why the AI sucks.