Commit d13f6606 authored by Eric Hambro's avatar Eric Hambro
Browse files

Move wrappers to envs/

parent 23f06985
import aicrowd_gym
import nle
from gym.wrappers import TimeLimit
from envs.nethack_make_function import nethack_make_fn
def create_env():
"""This is the environment that will be assessed by AIcrowd."""
return aicrowd_gym.make("NetHackChallenge-v0")
def addtimelimitwrapper_fn():
"""
An example of how to add wrappers to the nethack_make_fn
Should return a gym env which wraps the nethack gym env
"""
env = nethack_make_fn()
env = create_env()
env = TimeLimit(env, max_episode_steps=10_000_000)
return env
\ No newline at end of file
......@@ -2,7 +2,7 @@ from agents.random_batched_agent import RandomAgent
from agents.torchbeast_agent import TorchBeastAgent
# from agents.rllib_batched_agent import RLlibAgent
from submission_wrappers import addtimelimitwrapper_fn
from envs.wrappers import addtimelimitwrapper_fn
################################################
# Import your own agent code #
......@@ -28,7 +28,7 @@ class SubmissionConfig:
## Add a function that creates your nethack env
## Mainly this is to add wrappers
## Add your wrappers to wrappers.py and change the name here
## Add your wrappers to envs/wrappers.py and change the name here
## IMPORTANT: Don't "call" the function, only provide the name
submission_env_make_fn = addtimelimitwrapper_fn
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment