Week 2: Optimal planning with Pacman

Week 2: Optimal planning with Pacman#

What you see#

This show the result of one of the tasks from the first project namely optimal planning with dynamical programming.

You can execute each step of the optimal plan by pressing space. As you can see, Pacman is able to win every time.

How it works#

The objective for pacman is to win by eating the pellet in the corner while avoiding the ghost. In the example, we have implemented a dynamical programming model which corresponds to the Pacman game and then applied dynamical programming to it using \(N=20\). This gives an optimal policy and Pacman simply selects actions using the optimal policy \(u_k = \mu_k(x_k)\) in each time step \(k\).

To practically implement the DP model yourself you should consult Pacman.

Two Ghost version#

This example show dynamical programming applied to the two-ghost version of the problem. In this case Pacman still play optimally but there is no policy which win every time.