async-rl icon indicating copy to clipboard operation
async-rl copied to clipboard

How to adapt this code to a new environment?

Open pranv opened this issue 9 years ago • 5 comments

Hi,

This looks great. How would you go about and adapt this to Open AI Gym for example?

Can you please provide a set of places where changes have to be made?

How Generic is the code to adapt to any environment?

pranv avatar May 27 '16 17:05 pranv

Adding examples of applying A3C for OpenAI Gym's continuous tasks is on my To-Do list.

Since DoomEnv used by train_a3c_doom.py has a similar interface with gym.Env, modifying train_a3c_doom.py so that it can handle another gym.Env-like environments is straightforward. You may need to define your model that inherits a3c.A3CModel and appropriate phi function.

muupan avatar May 28 '16 03:05 muupan

Thanks!

I will try and see how it goes.

pranv avatar May 28 '16 12:05 pranv

Is it only for gym? What about other problems?

gowthamnatarajan avatar Jul 05 '16 05:07 gowthamnatarajan

You only need to define an original environment class that has reset and step methods. Please check doom_env.py for example.

muupan avatar Jul 05 '16 05:07 muupan

Thanks. I will rewrite those methods. Mine problem is not even a game.

gowthamnatarajan avatar Jul 05 '16 07:07 gowthamnatarajan