DriveML Huawei Autonomous Vehicles Challenge Forum

Go back to competition Back to thread list Post in this thread

> Defining my own agent and environment

Hello!

I wanted to give more functionality to my agent, so I created my own class MyAgent which inherits Agent. This means that instead of the gym_hiway.env.competition.py I have my own my_gym.env.competition.py that imports MyAgent instead of SimpleAgent. I have renamed the environment and registered it. My code works on my machine, but when I upload it to the server I see that the evaluation script is importing gym_hiway.env.competition.py (instead of my_gym.env.competition.py), so I get errors. Can you explain how I can fix this? I am also wondering if we are not allowed to define our own agents and environments and do all our customisation in policy.py, but this sounds a bit restrictive.

Cheers!

Posted by: Team_29 @ Nov. 8, 2019, 11:16 a.m.

Hello,

The ability to subclass the agent was purposely restricted as the API gives full control of the simulation interface. What it additionally provides would impact the difficulty level we were aiming for with this competition.

Posted by: HuaweiUK @ Nov. 8, 2019, 2:05 p.m.
Post in this thread