Broken action logic for NPCs in python implementation
edran opened this issue · comments
Nantas Nardelli commented
When one or more NPCs are added to the games using _add_agent
, env.act
gets stuck in a recursive call, causing call stack overflow. This is because of https://github.com/facebook/MazeBase/blob/master/py/mazebase/games/mazegame.py#L422, where current_agent
is simply invoked too soon. A quick fix is to replace actor = self.current_agent() with actor = self._acting
, however it's unclear whether it'd cause other nasty side effects.
Adding NPCs using _add_item
instead simply makes the game ignore the NPC steps, as their id never gets assigned to self._acting
.