Skip to content

Latest commit

 

History

History
136 lines (104 loc) · 7.02 KB

gail.rst

File metadata and controls

136 lines (104 loc) · 7.02 KB

GAIL

Overview

GAIL (Generative Adversarial Imitation Learning) was first proposed in Generative Adversarial Imitation Learning, is a general framework for directly extracting policy from data, as if it were obtained by reinforcement learning following inverse reinforcement learning. The authors deduced the optimization objective of GAIL from the perspective of occupancy measure. Compared to other learning methods, GAIL neither suffers from the compounding error problem in imitation learning, nor needs to expensively learn the inter-mediate reward function as in inverse reinforcement learning. But similar to other methods, GAIL is also exposed to "the curse of dimensionality", which makes the scalability much valuable in high-dimension-space problems.

Quick Facts

  1. GAIL consists of a generator and a discriminator, trained in an adversarial manner.
  2. The generator is optimized for a surrogate reward provided by the discriminator, usually by policy-gradient reinforcement learning methods, like TRPO, for its sampling nature.
  3. The discriminator can be simply optimized by typical gradient descent methods, like Adam, to distinguish expert and generated data.

Key Equations or Key Graphs

The objective function in GAIL's adversarial training is as below:

where pi is the generator policy, D is the discriminator policy, while H(π) is the causal entropy of policy pi. This is a min-max optimization process, and the objective is optimized in an iterative adversarial manner. During training, D has to maximize the objective, while pi has to counter D by minimizing the objective.

Pseudo-Code

Extensions

Implementation

The default config is defined as follows:

ding.reward_model.gail_irl_model.GailRewardModel

Benchmark

environment best mean reward evaluation results config link expert

LunarLander

(LunarLander-v2)

200

image config_link_l <https:// github.com/opendilab/ DI-engine/tree/main/dizoo/ box2d/lunarlander/config/ lunarlander_dqn_gail_ config.py> DQN

BipedalWalker

(BipedalWalker-v3)

300

image config_link_b <https:// github.com/opendilab/ DI-engine/tree/main/dizoo/ box2d/bipedalwalker/ config/bipedalwalker_sac_ gail_config.py> SAC

Hopper

(Hopper-v3)

3500

image config_link_h <https:// github.com/opendilab/ DI-engine/tree/main/dizoo/ mujoco/config/hopper_sac_ gail_default_config.py> SAC

Reference

  • Ho, Jonathan, and Stefano Ermon. Making efficient use of demonstrations to solve hard exploration problems. [https://arxiv.org/abs/1606.03476 arXiv:1606.03476], 2019.
  • Song, Jiaming, et al. Multi-agent generative adversarial imitation learning. [https://arxiv.org/abs/1807.09936 arXiv:1807.09936], 2018.
  • Finn, Chelsea, et al. A connection between generative adversarial networks, inverse reinforcement learning, and energy-based models. [https://arxiv.org/abs/1611.03852 arXiv:1611.03852], 2016.

Other Public Implementations