mila-iqia/babyai

refactor GoToObj and GoNextTo

rizar opened this issue · 3 comments

rizar commented

As discussed with @saleml , I will take care of this. We don't want GoToObj to put GoNextTo on the stack.

Please elaborate on your reasoning. I’d like to be kept in the loop a bit more here, considering I might have to maintain this code.

rizar commented

Sure. I feel uneasy about our practice of having GoToObj put GoNextTo on the stack, and then having GoNextTo delete itself from it:

https://github.com/mila-udem/babyai/blob/master/babyai/bot.py#L607

I don't yet full understand how this works so far, but it seems to me that we could refactor this part to have GoToObj.take_action() call GoNextTo.take_action(), in the same way as GoToObj.get_action() calls GoNextTo.get_action().

rizar commented

Fixed by #26