Open zhaoyingnan179346 opened 6 years ago
Thank you for your reply, I haven't read the code carefully. I have another two questions 1.How long does it take to train the I2A agent?(include the environment model and I2A agent) 2.Does I2A exceed A3C or PPO in Atari game Frostbite?
No problem. For your questions:
Thanks, I think so. I just read your gen_data.py and generator.py, which make me feel confused. The codes are complicated.it seems that you generate the game frame manually instead of using the gym simulator(for example, using the code like "frame=env.step()" to generate frame ). Is that true?
Yes, you are correct. As mentioned, I only added to this implementation - I did not build it from the ground up. It would have been much easier (and more flexible) to build the generator using gym. That is definitely a required feature.
Thanks, it helps a lot. Hoping to contact with you again!
Anytime and thanks for your interest! I would be glad to see this completed. You too!
Hi there. Right now, this is not fully implemented but it should not be too hard to integrate.
You would need to build your own data generator, i.e. a small program, that generates screenshots of your atari game of choice and saves them in a format that can be understood by the rest of the code. If you have a look at the file
gen_data.py
you can see what the format should be. Essentially 3 input frames and 1 target frame per datapoint, saved in.npz
format. (This is what the environment model trains on.)Now if you have trained the environment model on a lot of screenshots from your game of choice, you can run
train.py
to train the agent - simply switch out the parameter in line 49. Make sure to pick a valid openai gym environment.I don't know if I will have the time to implement this myself, but maybe you would like to try and create a pull request. Hope this helps a little.