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
eed51f36
Commit
eed51f36
authored
3 years ago
by
Dipam Chakraborty
Browse files
Options
Downloads
Patches
Plain Diff
Revert "Merge branch 'eric/agents' into 'master'"
This reverts merge request
!2
parent
680571d0
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
agents/random_batched_agent.py
+9
-1
9 additions, 1 deletion
agents/random_batched_agent.py
agents/rllib_batched_agent.py
+0
-0
0 additions, 0 deletions
agents/rllib_batched_agent.py
submission_config.py
+2
-2
2 additions, 2 deletions
submission_config.py
with
11 additions
and
3 deletions
agents/random_agent.py
→
agents/random_
batched_
agent.py
+
9
−
1
View file @
eed51f36
...
...
@@ -3,11 +3,19 @@ import numpy as np
from
agents.batched_agent
import
BatchedAgent
class
RandomAgent
(
BatchedAgent
):
"""
This random agent just selects an action from the action space.
"""
def
__init__
(
self
,
num_envs
,
num_actions
):
super
().
__init__
(
num_envs
,
num_actions
)
self
.
seeded_state
=
np
.
random
.
RandomState
(
42
)
def
preprocess_observations
(
self
,
observations
,
rewards
,
dones
,
infos
):
return
observations
,
rewards
,
dones
,
infos
def
postprocess_actions
(
self
,
actions
):
return
actions
def
batched_step
(
self
,
observations
,
rewards
,
dones
,
infos
):
rets
=
self
.
preprocess_observations
(
observations
,
rewards
,
dones
,
infos
)
observations
,
rewards
,
dones
,
infos
=
rets
actions
=
self
.
seeded_state
.
randint
(
self
.
num_actions
,
size
=
self
.
num_envs
)
actions
=
self
.
postprocess_actions
(
actions
)
return
actions
\ No newline at end of file
This diff is collapsed.
Click to expand it.
agents/rllib_agent.py
→
agents/rllib_
batched_
agent.py
+
0
−
0
View file @
eed51f36
File moved
This diff is collapsed.
Click to expand it.
submission_config.py
+
2
−
2
View file @
eed51f36
from
agents.random_agent
import
RandomAgent
from
agents.random_
batched_
agent
import
RandomAgent
# from agents.torchbeast_batched_agent import TorchBeastAgent
# from agents.rllib_agent import RLlibAgent
# from agents.rllib_
batched_
agent import RLlibAgent
from
submission_wrappers
import
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