Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
neurips-2021-the-nethack-challenge
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
nethack
neurips-2021-the-nethack-challenge
Commits
d13f6606
Commit
d13f6606
authored
3 years ago
by
Eric Hambro
Browse files
Options
Downloads
Patches
Plain Diff
Move wrappers to envs/
parent
23f06985
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
envs/wrappers.py
+8
-2
8 additions, 2 deletions
envs/wrappers.py
submission_config.py
+2
-2
2 additions, 2 deletions
submission_config.py
with
10 additions
and
4 deletions
submission_
wrappers.py
→
envs/
wrappers.py
+
8
−
2
View file @
d13f6606
import
aicrowd_gym
import
nle
from
gym.wrappers
import
TimeLimit
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
():
def
addtimelimitwrapper_fn
():
"""
"""
An example of how to add wrappers to the nethack_make_fn
An example of how to add wrappers to the nethack_make_fn
Should return a gym env which wraps the nethack gym env
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
)
env
=
TimeLimit
(
env
,
max_episode_steps
=
10_000_000
)
return
env
return
env
\ No newline at end of file
This diff is collapsed.
Click to expand it.
submission_config.py
+
2
−
2
View file @
d13f6606
...
@@ -2,7 +2,7 @@ from agents.random_batched_agent import RandomAgent
...
@@ -2,7 +2,7 @@ from agents.random_batched_agent import RandomAgent
from
agents.torchbeast_agent
import
TorchBeastAgent
from
agents.torchbeast_agent
import
TorchBeastAgent
# from agents.rllib_batched_agent import RLlibAgent
# from agents.rllib_batched_agent import RLlibAgent
from
submission_
wrappers
import
addtimelimitwrapper_fn
from
envs.
wrappers
import
addtimelimitwrapper_fn
################################################
################################################
# Import your own agent code #
# Import your own agent code #
...
@@ -28,7 +28,7 @@ class SubmissionConfig:
...
@@ -28,7 +28,7 @@ class SubmissionConfig:
## Add a function that creates your nethack env
## Add a function that creates your nethack env
## Mainly this is to add wrappers
## 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
## IMPORTANT: Don't "call" the function, only provide the name
submission_env_make_fn
=
addtimelimitwrapper_fn
submission_env_make_fn
=
addtimelimitwrapper_fn
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment