Finished AI

Finished AI with difficulty implement, there still some issues where
pacman die both pacman and ghost will appear at strange place and the
system run very slow (memory leak may be).