Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Ozan Catal
Animal Ai Env
Commits
c501eea4
Commit
c501eea4
authored
Aug 09, 2019
by
Benjamin Beyret
Browse files
evaluation adds custom agent resolution
parent
50623f27
Changes
2
Hide whitespace changes
Inline
Side-by-side
examples/submission/agent.py
View file @
c501eea4
...
...
@@ -9,13 +9,17 @@ class Agent(object):
"""
Load your agent here and initialize anything needed
"""
# You can specify the resolution your agent takes as input, for example set resolution=128 to
# have visual inputs of size 128*128*3 (if this attribute is omitted it defaults to 84)
print
(
'Resoluton {}'
.
format
(
self
.
resolution
))
# Load the configuration and model using ABSOLUTE PATHS
self
.
configuration_file
=
'/aaio/data/trainer_config.yaml'
self
.
model_path
=
'/aaio/data/1-Food/Learner'
self
.
brain
=
BrainParameters
(
brain_name
=
'Learner'
,
camera_resolutions
=
[{
'height'
:
84
,
'width'
:
84
,
'blackAndWhite'
:
False
}],
camera_resolutions
=
[
{
'height'
:
self
.
resolution
,
'width'
:
self
.
resolution
,
'blackAndWhite'
:
False
}],
num_stacked_vector_observations
=
1
,
vector_action_descriptions
=
[
''
,
''
],
vector_action_space_size
=
[
3
,
3
],
...
...
examples/submission/test_submission/testDocker.py
View file @
c501eea4
...
...
@@ -26,6 +26,15 @@ def main():
print
(
'Your agent could not be reset:'
)
raise
e
try
:
resolution
=
submitted_agent
.
resolution
assert
isinstance
(
resolution
,
int
)
except
AttributeError
:
resolution
=
84
except
AssertionError
:
print
(
'Resolution must be an integer'
)
return
env
=
AnimalAIEnv
(
environment_filename
=
'/aaio/test/env/AnimalAI'
,
seed
=
0
,
...
...
@@ -33,6 +42,7 @@ def main():
n_arenas
=
1
,
worker_id
=
1
,
docker_training
=
True
,
resolution
=
resolution
)
env
.
reset
(
arenas_configurations
=
arena_config_in
)
...
...
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