def __init__(self, *args, **kwargs): map = """ |---------- |.........+ |---------- """ lvl_gen = LevelGenerator(map=map, lit=True) lvl_gen.set_start_pos((1, 1)) kwargs["options"] = kwargs.pop("options", []) kwargs["options"].append("autopickup") kwargs["max_episode_steps"] = kwargs.pop("max_episode_steps", 50) lvl_gen.add_object(name="death", symbol="/", cursestate="blessed", place=((1, 1))) lvl_gen.add_monster("minotaur", args=("asleep", ), place=(9, 1)) des_file = lvl_gen.get_des() rwrd_mngr = RewardManager() rwrd_mngr.add_kill_event("minotaur") super().__init__(*args, des_file=des_file, reward_manager=rwrd_mngr, **kwargs)
def __init__(self, *args, **kwargs): lvl_gen = LevelGenerator(w=5, h=5, lit=True) lvl_gen.add_object("levitation", "!", place=(0, 0), cursestate="blessed") lvl_gen.set_start_pos((2, 2)) des_file = lvl_gen.get_des() super().__init__(*args, des_file=des_file, **kwargs)
def __init__(self, *args, **kwargs): lvl_gen = LevelGenerator(w=5, h=5, lit=True) lvl_gen.add_object("apple", "%") des_file = lvl_gen.get_des() reward_manager = RewardManager() reward_manager.add_eat_event("apple") super().__init__( *args, des_file=des_file, reward_manager=reward_manager, **kwargs )
def __init__(self, *args, **kwargs): lvl_gen = LevelGenerator(w=5, h=5, lit=True) lvl_gen.add_object("blank paper", "?") des_file = lvl_gen.get_des() reward_manager = RewardManager() reward_manager.add_message_event(["This scroll seems to be blank."]) super().__init__( *args, des_file=des_file, reward_manager=reward_manager, **kwargs )
def __init__(self, *args, **kwargs): lvl_gen = LevelGenerator(w=5, h=5, lit=True) lvl_gen.add_object("enlightenment", "/") des_file = lvl_gen.get_des() reward_manager = RewardManager() reward_manager.add_message_event(["The feeling subsides."]) # TODO change super().__init__( *args, des_file=des_file, reward_manager=reward_manager, **kwargs )
def __init__(self, *args, **kwargs): lvl_gen = LevelGenerator(w=5, h=5, lit=True) lvl_gen.add_object("amulet of life saving", '"') des_file = lvl_gen.get_des() reward_manager = RewardManager() reward_manager.add_amulet_event() super().__init__( *args, des_file=des_file, reward_manager=reward_manager, **kwargs )
def __init__(self, *args, **kwargs): lvl_gen = LevelGenerator(w=5, h=5, lit=True) lvl_gen.add_object("dagger", ")", place=(0, 0)) lvl_gen.set_start_pos((2, 2)) des_file = lvl_gen.get_des() reward_manager = RewardManager() reward_manager.add_wield_event("dagger") super().__init__( *args, des_file=des_file, reward_manager=reward_manager, **kwargs )
def __init__(self, *args, **kwargs): lvl_gen = LevelGenerator(w=5, h=5, lit=True) lvl_gen.add_object("dagger", ")") lvl_gen.add_monster() lvl_gen.add_object() des_file = lvl_gen.get_des() reward_manager = RewardManager() reward_manager.add_wield_event("dagger") super().__init__( *args, des_file=des_file, reward_manager=reward_manager, **kwargs )
def __init__(self, *args, **kwargs): lvl_gen = LevelGenerator(w=5, h=5, lit=True) lvl_gen.add_sink() lvl_gen.add_monster() lvl_gen.add_object() des_file = lvl_gen.get_des() reward_manager = RewardManager() reward_manager.add_positional_event("sink", "quaff") super().__init__( *args, des_file=des_file, reward_manager=reward_manager, **kwargs )
def __init__(self, *args, **kwargs): lvl_gen = LevelGenerator(w=5, h=5, lit=True) lvl_gen.add_altar("random", "neutral", "altar") lvl_gen.add_monster() lvl_gen.add_object() des_file = lvl_gen.get_des() reward_manager = RewardManager() reward_manager.add_positional_event("altar", "pray") super().__init__( *args, des_file=des_file, reward_manager=reward_manager, **kwargs )
def __init__(self, *args, **kwargs): map = """ |---------------------------| |...........................| |---------------------------| """ lvl_gen = LevelGenerator(map=map, lit=True) lvl_gen.set_start_pos((1, 1)) lvl_gen.add_goal_pos((27, 1)) lvl_gen.add_object(name="death", symbol="/", cursestate="blessed", place=((2, 1))) lvl_gen.add_monster("minotaur", args=("asleep", ), place=(26, 1)) kwargs["max_episode_steps"] = kwargs.pop("max_episode_steps", 150) des_file = lvl_gen.get_des() super().__init__(*args, des_file=des_file, **kwargs)
def __init__(self, *args, **kwargs): map = """ ------------------------------------- |.................|.|...............| |.|-------------|.|.|.------------|.| |.|.............|.|.|.............|.| |.|.|----------.|.|.|------------.|.| |.|.|...........|.|.............|.|.| |.|.|.|----------.|-----------|.|.|.| |.|.|.|...........|.......|...|.|.|.| |.|.|.|.|----------------.|.|.|.|.|.| |.|.|.|.|.................|.|.|.|.|.| |.|.|.|.|.-----------------.|.|.|.|.| |.|.|.|.|...................|.|.|.|.| |.|.|.|.|--------------------.|.|.|.| |.|.|.|.......................|.|.|.| |.|.|.|-----------------------|.|.|.| |.|.|...........................|.|.| |.|.|---------------------------|.|.| |.|...............................|.| |.|-------------------------------|.| |...................................| ------------------------------------- """ lvl_gen = LevelGenerator(map=map, lit=True) lvl_gen.add_stair_up((19, 1)) lvl_gen.add_stair_down((19, 7)) lvl_gen.add_monster(name="minotaur", place=(19, 9)) lvl_gen.add_object("death", "/", cursestate="blessed") des_file = lvl_gen.get_des() kwargs["max_episode_steps"] = kwargs.pop("max_episode_steps", 1000) super().__init__( *args, des_file=des_file, **kwargs, )
def __init__(self, *args, **kwargs): lvl_gen = LevelGenerator(w=5, h=5, lit=True) lvl_gen.add_object("levitation", "=", cursestate="blessed") des_file = lvl_gen.get_des() super().__init__(*args, des_file=des_file, **kwargs)
def __init__(self, *args, **kwargs): lvl_gen = LevelGenerator(w=5, h=5, lit=True) lvl_gen.add_object("cloak of invisibility", "[", cursestate="blessed") des_file = lvl_gen.get_des() super().__init__(*args, des_file=des_file, **kwargs)
def __init__(self, *args, **kwargs): lvl_gen = LevelGenerator(w=8, h=8, lit=True) lvl_gen.add_object("frost horn", "(", cursestate="blessed") des_file = lvl_gen.get_des() super().__init__(*args, des_file=des_file, **kwargs)