Record Case Detail

Notes

This function is in beta test. Please help improve it in the issues here.

Stderr

Traceback (most recent call last):
  File "/out/package/game.py", line 694, in run
    action = timed_func(observation)
  File "/out/package/util.py", line 675, in __call__
    result = self.function(*args, **keyArgs)
  File "multiAgents.py", line 281, in getAction
    v.append(self.value(successor,self.depth,1))
  File "multiAgents.py", line 246, in value
    v=[self.value(state.generateSuccessor(agentIndex,action),depth-1,0) for action in actions]
  File "multiAgents.py", line 246, in <listcomp>
    v=[self.value(state.generateSuccessor(agentIndex,action),depth-1,0) for action in actions]
  File "multiAgents.py", line 248, in value
    v=[self.value(state.generateSuccessor(agentIndex,action),depth,agentIndex+1) for action in actions]
  File "multiAgents.py", line 248, in <listcomp>
    v=[self.value(state.generateSuccessor(agentIndex,action),depth,agentIndex+1) for action in actions]
  File "multiAgents.py", line 252, in value
    return sum(v)/len(v)
TypeError: unsupported operand type(s) for +: 'int' and 

Hints

Your answer may be identical to the JOJ answer in the first several lines.

However, the main problem you meet now is Runtime Error. And the exit code of your program is 120, which should be 0.

Please double check your code to solve this problem and try again.

Your Answer

Pacman crashed
Pacman crashed
Pacman crashed
Pacman crashed
Pacman crashed
Pacman crashed
Pacman crashed
Pacman crashed
Pacman crashed
Pacman crashed
*** FAIL: ./test_cases/q5/grade-agent.test (0 of 6 points)
***     0 wins (fail: below minimum value 1)

JOJ Answer

*** PASS: ./test_cases/q5/grade-agent.test (6 of 6 points)