Pacman ghost AI

does anyone know how to create ‘smart’ enemy characters for a pacman game? If there is a tutorial or you know how to do it any help would be great!