DiCE의 처음부터 실용적인 논문임을 강조했는데, 이는 단순한 구현방법에 있습니다. MagicBox는 두가지 특성을 만족하면 됐었는데, 이는 다음과 같이 정의함으로써 두가지 성질을 다 가져갈 수 있습니다. 아래선 위를 확인하도록 합니다.
$$ \square (\mathcal{W}) = \exp(\tau - \bot(\tau))$$
$$ \tau = \sum_{w \in \mathcal{W}} \log(p(w;\theta))$$
$$ \bot
$$ \nabla_\theta \square (\mathcal{W}) = \nabla_\theta\exp(\tau-\bot(\tau))$$
$$= \exp(\tau-\bot(\tau))\nabla_\theta(\tau-\bot(\tau))$$
$$=\square(\mathcal{W})(\nabla_\theta\tau-0)$$
$$=\square(\mathcal{W})\sum_{w \in \mathcal{W}}\nabla_\theta \log(p(w;\theta))$$
그리고 magicbox operator를 구현하게되면, 주로 objective와 바로 연관지어 구현하는게 가장 간단한데, 일반적인 RL에선