[penlin] resolve the bug of variable name state resused in line 42 in pacmanAgents.py