wrappers.py 466 Bytes
Newer Older
Eric Hambro's avatar
Eric Hambro committed
1
2
import aicrowd_gym
import nle
Dipam Chakraborty's avatar
Dipam Chakraborty committed
3
4
from gym.wrappers import TimeLimit

Eric Hambro's avatar
Eric Hambro committed
5
6
7
8
9

def create_env():
    """This is the environment that will be assessed by AIcrowd."""
    return aicrowd_gym.make("NetHackChallenge-v0")

Dipam Chakraborty's avatar
Dipam Chakraborty committed
10
11
12
13
14
15

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
    """
Eric Hambro's avatar
Eric Hambro committed
16
    env = create_env()
17
    env = TimeLimit(env, max_episode_steps=10_000_000)
18
    return env