0

I am aware of the way to create a custom environment in Open AI.But is it possible to do it based on a trained neural network?

I have a trained neural network which specifies the relationship between states and action/reward. I am thinking about loading the network into the init function and use it in the step function. Does this sound the correct way to do it?

ycenycute
  • 688
  • 4
  • 10
  • 20
  • Anyway, I'm not fully sure I understand your question. Is the neural network your RL agent? – nbro Feb 05 '21 at 20:55
  • @nbro No, it is not the RL agent. The neural network specifies the underlying dynamics of the environment, which we build based on empirical data. – ycenycute Feb 05 '21 at 21:01
  • Then, yes, I would probably try to make it a field that is part of the environment and that you can call from the step function. However, I would like to note that in the past I tried to dynamically inject some methods and fields into the custom environment and I had run into a few problems. For example, have a look at this: https://stackoverflow.com/q/65615438/3924118. In any case, I never had to do what you're trying to do, so I'm not sure what is the best solution. You probably also want to look into "gym wrappers". – nbro Feb 05 '21 at 21:03

0 Answers0