コード例 #1
0
 def setUpClass(cls):
     g_rng.set_seed(201809)
     cls.tmpdir = tempfile.mkdtemp()
     cls.options = textworld.GameOptions()
     cls.options.path = cls.tmpdir
     cls.options.file_ext = ".ulx"
     cls.game, cls.game_file = testing.build_and_compile_game(cls.options)
コード例 #2
0
 def setUpClass(cls):
     g_rng.set_seed(201809)
     cls.tmpdir = tempfile.mkdtemp()
     cls.options = textworld.GameOptions()
     cls.options.path = pjoin(cls.tmpdir, "tw-game.z8")
     cls.game, cls.game_file = testing.build_and_compile_game(cls.options)
     cls.infos = EnvInfos(
         max_score=True,
         score=True,
         won=True,
         lost=True,
     )
コード例 #3
0
 def setUpClass(cls):
     g_rng.set_seed(201809)
     cls.tmpdir = tempfile.mkdtemp()
     cls.options = textworld.GameOptions()
     cls.options.path = pjoin(cls.tmpdir, "tw-game.ulx")
     cls.game, cls.gamefile_ulx = testing.build_and_compile_game(
         cls.options)
     cls.options.path = pjoin(cls.tmpdir, "tw-game.z8")
     cls.gamefile_z8 = textworld.generator.compile_game(
         cls.game, cls.options)
     cls.infos = EnvInfos(facts=True,
                          policy_commands=True,
                          admissible_commands=True,
                          intermediate_reward=True)
コード例 #4
0
 def setUpClass(cls):
     g_rng.set_seed(201809)
     cls.tmpdir = tempfile.mkdtemp()
     cls.options = textworld.GameOptions()
     cls.options.path = pjoin(cls.tmpdir, "tw-game.ulx")
     cls.game, cls.gamefile_ulx = testing.build_and_compile_game(
         cls.options)
     cls.options.path = pjoin(cls.tmpdir, "tw-game.z8")
     cls.gamefile_z8 = textworld.generator.compile_game(
         cls.game, cls.options)
     cls.infos = EnvInfos(
         max_score=True,
         objective=True,
     )
コード例 #5
0
 def setUpClass(cls):
     g_rng.set_seed(201809)
     cls.tmpdir = tempfile.mkdtemp()
     cls.options = textworld.GameOptions()
     cls.options.path = pjoin(cls.tmpdir, "tw-game.ulx")
     cls.game, cls.gamefile_ulx = testing.build_and_compile_game(cls.options)
     cls.options.path = pjoin(cls.tmpdir, "tw-game.z8")
     cls.gamefile_z8 = textworld.generator.compile_game(cls.game, cls.options)
     cls.infos = EnvInfos(
         inventory=True,
         description=True,
         score=True,
         moves=True,
         won=True,
         lost=True,
     )