Commit c501eea4 authored by Benjamin Beyret's avatar Benjamin Beyret
Browse files

evaluation adds custom agent resolution

parent 50623f27
......@@ -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],
......
......@@ -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)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment