From 26f2e1311d91ec95ba3a89f3c08146f9cdaa4223 Mon Sep 17 00:00:00 2001 From: RAHUL KUMAR <55033230+pctablet505@users.noreply.github.com> Date: Tue, 19 Jan 2021 21:48:51 +0530 Subject: [PATCH] Update agents4e.py Grab action is not needed in simple XYEnvironment Grab action is added in WumpusEnvironment by overriding XYEnvironment. I saw codes in julia and there is no Grab action in XYEnvironment --- agents4e.py | 5 ----- 1 file changed, 5 deletions(-) diff --git a/agents4e.py b/agents4e.py index 75369a69a..a63523e09 100644 --- a/agents4e.py +++ b/agents4e.py @@ -510,11 +510,6 @@ def execute_action(self, agent, action): agent.direction += Direction.L elif action == 'Forward': agent.bump = self.move_to(agent, agent.direction.move_forward(agent.location)) - # elif action == 'Grab': - # things = [thing for thing in self.list_things_at(agent.location) - # if agent.can_grab(thing)] - # if things: - # agent.holding.append(things[0]) elif action == 'Release': if agent.holding: agent.holding.pop()