mila-iqia / babyai

BabyAI platform. A testbed for training agents to understand and execute language commands.
BSD 3-Clause "New" or "Revised" License
700 stars 146 forks source link

Impossible missions are sampled? #103

Closed wcarvalho closed 3 years ago

wcarvalho commented 3 years ago

GoToLocal seems to not be working.

image

There is no yellow box in the env?

Code to reproduce:

import ipdb
import babyai.levels.iclr19_levels as iclr19_levels

def main():
    import argparse
    parser = argparse.ArgumentParser(formatter_class=argparse.ArgumentDefaultsHelpFormatter)
    parser.add_argument('--level', help='BabyAI level', default='GoToLocal')
    parser.add_argument('--num-missions', help='# of unique missions', default=10)
    args = parser.parse_args()

    env_class = getattr(iclr19_levels, "Level_%s" % args.level)
    env = env_class()

    for mission_indx in range(args.num_missions):
        env.seed(mission_indx)
        obs = env.reset()
        env.render()
        ipdb.set_trace()

if __name__ == "__main__":
    main()
wcarvalho commented 3 years ago

For some reason, it seems that many missions I sample are impossible...

image

image

Out of 10 samples, only 1 was valid: image

wcarvalho commented 3 years ago

It was a bug in the rendering. Made a pull request in gym minigrid library.