This is an example to train a task with DQN algorithm in pixel environment.
Here it creates a gym environment Pong, and trains a DQN with 1M steps.
- dqn_pong(ctxt=None, seed=1, buffer_size=int(50000.0), max_episode_length=500)¶
Train DQN on PongNoFrameskip-v4 environment.
ctxt (garage.experiment.ExperimentContext) – The experiment configuration used by Trainer to create the snapshotter.
seed (int) – Used to seed the random number generator to produce determinism.
buffer_size (int) – Number of timesteps to store in replay buffer.
max_episode_length (int) – Maximum length of an episode, after which an episode is considered complete. This is used during testing to minimize the memory required to store a single episode.