MontePacMan is a project mainly written in Java, it's free.
Ms Pac-Man AI Using Monte Carlo Tree Search