Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Neural MMO
neural-mmo-starter-kit
Commits
2be9cd06
Commit
2be9cd06
authored
Jun 24, 2021
by
Siddhartha Laghuvarapu
Browse files
Include policy id in compute actions
parent
746f16f0
Changes
1
Hide whitespace changes
Inline
Side-by-side
agents/neural_baseline_agent.py
View file @
2be9cd06
...
...
@@ -13,13 +13,12 @@ class NeuralBaselineAgent(NeuralMMOAgent):
def
register_reset
(
self
,
observations
):
obs
=
{
0
:
observations
}
actions
,
self
.
state
,
_
=
self
.
trainer
.
compute_actions
(
obs
)
actions
,
self
.
state
,
_
=
self
.
trainer
.
compute_actions
(
obs
,
state
=
{},
policy_id
=
'policy_0'
)
# action = self.get_action(observations)
return
actions
[
0
]
def
compute_action
(
self
,
observations
,
info
=
None
):
obs
=
{
0
:
observations
}
actions
,
self
.
state
,
_
=
self
.
trainer
.
compute_actions
(
obs
)
actions
,
self
.
state
,
_
=
self
.
trainer
.
compute_actions
(
obs
,
state
=
{},
policy_id
=
'policy_0'
)
# action = self.get_action(observations)
return
actions
[
0
]
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment