Implementation of a Pacman agent