This is an example to train a task with TRPO algorithm (PyTorch).

Uses Ray sampler instead of MultiprocessingSampler. Here it runs InvertedDoublePendulum-v2 environment with 100 iterations.

trpo_pendulum_ray_sampler(ctxt=None, seed=1)

Set up environment and algorithm and run the task.

  • 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.