World Model 논문 리뷰 (2)

·임성혁

World Model 논문 리뷰 (1)

We have just seen that a policy learned inside of the real environment appears to somewhat function inside of the dream environment. This begs the question – can we train our agent to learn inside of its own dream, and transfer this policy back to the actual environment? 방금 실제 환경에서 학습한 정책이 꿈의 환경에서도 어느 정도 작동하는 것처럼 보인다는 것을 확인했습니다. 그렇다면 에이전트가 스스로 꿈 속에서 학습하고 이 정책을 실제 환경으로 다시 옮기도록(전이하도록) 훈련할 수 있을까요?

If our world model is sufficiently accurate for its purpose, and complete enough for the problem at hand, we should be able to substitute the actual environment with this world model. After all, our agent does not directly observe the reality, but only sees what the world model lets it see. In this experiment, we train an agent inside the hallucination generated by its world model trained to mimic a VizDoom (Kempka et al., 2016) environment. 월드 모델이 목적에 맞게 충분히 정확하고 당면한 문제에 대해 충분히 완벽하다면 실제 환경에서 이 월드 모델로 대체할 수 있어야 합니다. 결국 에이전트는 직접 관찰하는 것이 아니라 세계 모델이 허용하는 것만 보게 됩니다. 이 실험에서는 에이전트에게 VizDoom 환경을 모방하도록 훈련된 세계 모델에서 생성된 환각 내부를 훈련시킵니다.


Figure 14. Our final agent solving VizDoom: Take Cover.
그림 14. 최종 에이전트가 VizDoom을 해결하는 모습 : 엄폐.
Figure 14. Our final agent solving VizDoom: Take Cover. 그림 14. 최종 에이전트가 VizDoom을 해결하는 모습 : 엄폐.

The agent must learn to avoid fireballs shot by monsters from the other side of the room with the sole intent of killing the agent. There are no explicit rewards in this environment, so to mimic natural selection, the cumulative reward can be defined to be the number of time steps the agent manages to stay alive during a rollout. Each rollout of the environment runs for a maximum of 2100 time steps (∼ 60 seconds), and the task is considered solved if the average survival time over 100 consecutive rollouts is greater than 750 time steps (∼ 20 seconds) (Paquette, 2016). 에이전트는 오직 에이전트를 죽일 목적으로 방 반대편에서 몬스터가 발사하는 불덩이를 피하는 방법을 배워야 합니다. 이 환경에는 명시적인 보상이 없으므로 자연 선택을 모방하기 위해 누적 보상을 롤아웃 중에 에이전트가 살아남은 시간 단계 수로 정의할 수 있습니다. 환경의 각 롤아웃은 최대 2100 time steps(~60초)동안 실행되며, 100회 연속 롤아웃의 평균 생존 시간이 750 time steps(~20초) 이상이면 과제가 해결된 것으로 간주합니다.

The setup of our VizDoom experiment is largely the same as the Car Racing task, except for a few key differences. In the Car Racing task, M is only trained to model the next ztz_t. Since we want to build a world model we can train our agent in, our M model here will also predict whether the agent dies in the next frame (as a binary event donetdone_t, or dtd_t for short), in addition to the next frame ztz_t. VizDoom 실험의 설정은 몇 가지 주요 차이점을 제외하고는 자동차 경주 작업과 거의 동일합니다. 자동차 경주 작업에서 M은 다음 ztz_t만 모델링하도록 학습됩니다. 에이전트를 훈련시킬 수 있는 월드 모델을 구축하고자 하므로, 여기서의 M 모델은 다음 프레임 ztz_t외에도 다음 프레임에서 에이전트가 죽는지 (이진 이벤트 donetdone_t, 또는 줄여서 d_t로) 예측할 것 입니다.

Since the M model can predict the done state in addition to the next observation, we now have all of the ingredients needed to make a full RL environment. We first build an OpenAI Gym environment interface by wrapping a gym.Envgym.Env interface over our M if it were a real Gym environment, and then train our agent inside of this virtualvirtual environment instead of using the actual environment. M 모델은 다음 관찰에 더해 완료된 상태를 예측할 수 있으므로 이제 완전한 강화학습 환경을 만드는데 필요한 모든 요소를 갖추게 되었습니다. 먼저 M을 실제 Gym 환경인 것 처럼 gym.Env 인터페이스로 감싸서 OpenAI Gym 환경 인터페이스를 구축한 다음, 실제 환경을 사용하는 대신 이 가상환경 내에서 에이전트를 훈련시킵니다.

In this simulation, we do not need the V model to encode any real pixel frames during the hallucination process, so our agent will therefore only train entirely in a latent space environment. This has many advantages as we will see. 이 시물레이션에서는 환각 과정에서 실제 픽셀 프레임을 인코딩하는 데 V 모델이 필요하지 않으므로 에이전트는 전적으로 잠재 공간 환경에서만 훈련하게 됩니다. 이는 곧 살펴보겠지만 많은 이점이 있습니다.

This virtual environment has an identical interface to the real environment, so after the agent learns a satisfactory policy in the virtual environment, we can easily deploy this policy back into the actual environment to see how well the policy transfers over. 이 가상 환경에서는 실제 환경과 동일한 인터페이스가 있으므로 에이전트가 가상 환경에서 만족스러운 정책을 학습한 후 이 정책을 실제 환경에서 다시 배포하여 정책이 얼마나 잘 전달되는지 쉽게 확인할 수 있습니다.

To summarize the Take Cover experiment, below are the steps taken:

  1. Collect 10,000 rollouts from a random policy.
  2. Train VAE (V) to encode each frame into a latent vector zR32z \in \mathbb{R}^{32}, and use V to convert the images collected from (1) into the latent space representation.
  3. Train MDN-RNN (M) to model P(zt+1,dt+1at,zt,ht)P(z_{t+1}, d_{t+1} | a_t, z_t, h_t).
  4. Define Controller (C) as at=Wc[ztht]a_t = W_c [z_t h_t].
  5. Use CMA-ES to solve for a WcW_c that maximizes the expected survival time inside the virtual environment.
  6. Use learned policy from (5) on actual environment.

테이크 커버 실험을 요약하면 다음과 같습니다:

  1. 무작위 정책에서 10,000개의 롤아웃을 수집합니다.
  2. VAE(V)를 훈련시켜 각 프레임을 잠재 벡터 zR32z \in \mathbb{R}^{32}로 인코딩하고, (1)에서 수집한 이미지를 잠재 공간 표현으로 변환하기 위해 V를 사용합니다.
  3. MDN-RNN(M)을 모델에 학습시키기 P(zt+1,dt+1at,zt,ht)P(z_{t+1}, d_{t+1} | a_t, z_t, h_t).
  4. 컨트롤러(C)를 at=Wc[ztht]a_t = W_c [z_t h_t]로 정의합니다.
  5. CMA-ES를 사용하여 가상 환경 내에서 예상 생존 시간을 최대화하는 WcW_c를 해결합니다.
  6. (5)에서 학습한 정책을 실제 환경에 적용합니다.
MODELPARAMETER COUNT
VAE4,446,915
MDN-RNN1,678,785
CONTROLLER1,088

After some training, our controller learns to navigate around the dream environment and escape from deadly fireballs launched by monsters generated by M. Our agent achieved a scorescore of ∼ 900 time steps in the virtual environment. 약간의 훈련 끝에 컨트롤러는 꿈 속 환경을 탐색하고 M이 생성한 몬스터가 발사하는 치명적인 불덩어리에서 탈출하는 방법을 배웠습니다. 에이전트는 가상환경에서 ~900 타임 스텝이라는 점수를 달성했습니다.


Figure 15. Our agent discovers a policy to avoid hallucinated fireballs. In the online version of this article, the reader can interact with the environment inside this demo.
그림 15. 에이전트가 환각 불덩이를 피하기 위한 정책을 발견합니다. 이 기사의 온라인 버전에서는 독자가 이 데모 내의 환경과 상호작용할 수 있습니다.
Figure 15. Our agent discovers a policy to avoid hallucinated fireballs. In the online version of this article, the reader can interact with the environment inside this demo. 그림 15. 에이전트가 환각 불덩이를 피하기 위한 정책을 발견합니다. 이 기사의 온라인 버전에서는 독자가 이 데모 내의 환경과 상호작용할 수 있습니다.

Here, our RNN-based world model is trained to mimic a complete game environment designed by human programmers. By learning only from raw image data collected from random episodes, it learns how to simulate the essential aspects of the game – such as the game logic, enemy behaviour, physics, and also the 3D graphics rendering. RNN 기반 월드 모델은 인간 프로그래머가 설계한 게임 환경 그대로를 모방하도록 훈련됩니다. 무작위 에피소드에서 수집한 원시 이미지 데이터만으로 학습하여 게임 로직, 적의 행동, 물리, 3D 그래픽 렌더링과 같은 게임의 필수적인 측면을 시뮬레이션하는 방법을 학습합니다.

For instance, if the agent selects the left action, the M model learns to move the agent to the left and adjust its internal representation of the game states accordingly. It also learns to block the agent from moving beyond the walls on both sides of the level if the agent attempts to move too far in either direction. Occasionally, the M model needs to keep track of multiple fireballs being shot from several different monsters and coherently move them along in their intended directions. It must also detect whether the agent has been killed by one of these fireballs. 예를 들어 에이전트가 왼쪽 동작을 선택하면 M 모델은 에이전트를 왼쪽으로 이동하고 그에 따라 게임 상태의 내부 표현을 조정하는 방법을 학습합니다. 또한 에이전트가 어느 방향으로든 너무 멀리 이동하려고 하면 레벨의 양쪽 벽 너머로 이동하지 못하도록 차단하는 방법도 학습합니다. 때때로 M 모델은 여러 다른 몬스터들이 발사하는 여러 개의 불덩이를 추적하여 의도한 방향으로 일관되게 이동시켜야하는 경우도 있습니다. 또한 에이전트가 이러한 불덩어리 중 하나에 의해 사망했는지도 감지해야 합니다.

Unlike the actual game environment, however, we note that it is possible to add extra uncertainty into the virtual environment, thus making the game more challenging in the dream environment. We can do this by increasing the temperature ττ parameter during the sampling process of zt+1z_{t+1}. By increasing the uncertainty, our dream environment becomes more difficult compared to the actual environment. The fireballs may move more randomly in a less predictable path compared to the actual game. Sometimes the agent may even die due to sheer misfortune, without explanation. 그러나 실제 게임 환경과 달리, 가상 환경에 추가적인 불확실성을 더할 수 있다는 점을 주목할 필요가 있으며 이를 통해 꿈 속 환경에서 게임을 더 어렵게 만들 수 있습니다. zt+1z_{t+1}의 샘플링 과정에서 온도 파라미터 ττ를 증가시킴으로써 이를 수행할 수 있습니다. 불확실성이 증가하면 꿈 속 환경은 실제 환경에 비해 더 어려워집니다. 불덩어리는 실제 게임보다 예측하기 어려운 경로로 더 무작위로 움직일 수 있습니다. 때로는 에이전트가 아무런 설명 없이 순전히 불운으로 인해 사망할 수도 있습니다.

We find agents that perform well in higher temperature settings generally perform better in the normal setting. In fact, increasing ττ helps prevent our controller from taking advantage of the imperfections of our world model – we will discuss this in more depth later on. 일반적으로 높은 온도 설정에서 잘 작동하는 에이전트는 일반 설정에서도 더 나은 성능을 발휘합니다. 실제로 ττ를 늘리면 컨트롤러가 월드 모델의 불완전성을 이용하는 것을 방지하는 데 도움이 되는데, 이에 대해서는 나중에 더 자세히 설명하겠습니다.


Figure 16. Deploying our policy learned inside of the dream RNN environment back into the actual VizDoom environment.
그림 16. 꿈 속 RNN 환경에서 학습된 정책을 실제 VizDoom 환경에 다시 배포하는 모습
Figure 16. Deploying our policy learned inside of the dream RNN environment back into the actual VizDoom environment. 그림 16. 꿈 속 RNN 환경에서 학습된 정책을 실제 VizDoom 환경에 다시 배포하는 모습

We took the agent trained inside of the virtual environment and tested its performance on the original VizDoom scenario. The score over 100 random consecutive trials is ∼ 1100 time steps, far beyond the required score of 750 time steps, and also much higher than the score obtained inside the more difficult virtual environment. 가상 환경 내에서 훈련된 에이전트를 가져와 원래 VizDoom 시나리오에서 성능을 테스트했습니다. 100번의 무작위 연속 시도에서 얻은 점수는 ~1100 시간 단계로, 요구되는 점수인 750 시간 단계를 크게 초과하며, 더 어려운 가상 환경 내에서 얻은 점수보다도 훨씬 높습니다.


Figure 17. An interactive VAE of Doom in the online article.
그림 17. 온라인 논문의 Doom의 대화형 VAE.
Figure 17. An interactive VAE of Doom in the online article. 그림 17. 온라인 논문의 Doom의 대화형 VAE.

We see that even though the V model is not able to capture all of the details of each frame correctly, for instance, getting the number of monsters correct, the agent is still able to use the learned policy to navigate in the real environment. As the virtual environment cannot even keep track of the exact number of monsters in the first place, an agent that is able to survive the noisier and uncertain virtual nightmare environment will thrive in the original, cleaner environment. V 모델이 각 프레임의 모든 세부 사항, 예를 들어 몬스터의 수를 정확하게 파악하지 못하더라도 에이전트는 학습한 정책을 사용하여 실제 환경에서 탐색할 수 있음을 알 수 있습니다. 가상 환경은 에초에 몬스터의 정확한 수조차 파악할 수 없기 때문에, 더 시끄럽고 불확실한 가상 악몽 환경에서 살아남을 수 있는 에이전트가 원래의 깨끗한 환경에서 더 잘 작동할 수 있을 것 입니다.

In our childhood, we may have encountered ways to exploit video games in ways that were not intended by the original game designer (Wikipedia, 2017). Players discover ways to collect unlimited lives or health, and by taking advantage of these exploits, they can easily complete an otherwise difficult game. However, in the process of doing so, they may have forfeited the opportunity to learn the skill required to master the game as intended by the game designer. 어린 시절에 우리는 원래 게임 디자이너가 의도하지 않은 방식으로 비디오 게임을 악용하는 방법을 접한 적이 있을 것입니다. 플레이어는 생명력이나 체력을 무제한으로 모으는 방법을 발견하고, 이러한 악용 방법을 이용하면 어려운 게임을 쉽게 완료할 수 있습니다. 그러나 그 과정에서 게임 디자이너가 의도한 대로 게임을 마스터하는 데 필요한 기술을 배울 기회를 잃을 수 있습니다.

For instance, in our initial experiments, we noticed that our agent discovered an adversarial policy to move around in such a way so that the monsters in this virtual environment governed by the M model never shoots a single fireball during some rollouts. Even when there are signs of a fireball forming, the agent will move in a way to extinguish the fireballs magically as if it has superpowers in the environment. 예를 들어, 초기 실험에서 우리는 M 모델이 지배하는 이 가상 환경의 몬스터들이 일부 롤아웃 동안 단 한 번도 파이어볼을 쏘지 않도록 에이전트가 특정한 방식으로 움직이는 적대적 정책을 발견했다는 것을 알아차렸습니다. 심지어 파이어볼이 형성되는 징후가 있을 때조차, 에이전트는 마치 환경에서 초능력을 가진 것처럼 파이어볼을 마법처럼 소멸시키는 방향으로 움직입니다.

Because our world model is only an approximate probabilistic model of the environment, it will occasionally generate trajectories that do not follow the laws governing the actual environment. As we saw previously, even the number of monsters on the other side of the room in the actual environment is not exactly reproduced by the world model. Like a child who learns that objects in the air usually fall to the ground, the child might also imagine unrealistic superheroes who fly across the sky. For this reason, our world model will be exploitable by the controller, even if in the actual environment such exploits do not exist. 월드 모델은 환경에 대한 대략적인 확률적 모델일 뿐이므로, 실제 환경을 지배하는 법칙을 따르지 않는 궤적을 가끔 생성할 것입니다. 앞서 본 것처럼, 실제 환경에서 방 반대편에 있는 몬스터의 수조차도 월드 모델에 의해 정확히 재현되지 않습니다. 공중에 있는 물체가 보통 땅으로 떨어진다는 것을 배우는 아이가 하늘을 날아다니는 비현실적인 슈퍼히어로를 상상할 수도 있는 것처럼 말입니다. 이러한 이유로, 우리의 월드 모델은 실제 환경에서는 그러한 익스플로잇이 존재하지 않더라도 컨트롤러에 의해 악용될 수 있습니다.

And since we are using the M model to generate a virtual dream environment for our agent, we are also giving the controller access to all of the hidden states of M. This is essentially granting our agent access to all of the internal states and memory of the game engine, rather than only the game observations that the player gets to see. Therefore our agent can efficiently explore ways to directly manipulate the hidden states of the game engine in its quest to maximize its expected cumulative reward. The weakness of this approach of learning a policy inside a learned dynamics model is that our agent can easily find an adversarial policy that can fool our dynamics model – it’ll find a policy that looks good under our dynamics model, but will fail in the actual environment, usually because it visits states where the model is wrong because they are away from the training distribution. 그리고 우리가 에이전트를 위한 가상 드림 환경을 생성하기 위해 M 모델을 사용하고 있기 때문에, 우리는 또한 컨트롤러에게 M의 모든 은닉 상태(hidden state)에 대한 접근 권한을 부여하고 있습니다. 이는 본질적으로 우리의 에이전트에게 플레이어가 볼 수 있는 게임 관찰 값만이 아니라 게임 엔진의 모든 내부 상태와 메모리에 대한 접근 권한을 부여하는 것입니다. 따라서 우리의 에이전트는 예상 누적 보상을 최대화하는 과정에서 게임 엔진의 은닉 상태(hidden state)를 직접 조작하는 방법을 효율적으로 탐색할 수 있습니다. 학습된 동역학 모델 내에서 정책을 학습하는 이 접근법의 약점은 우리의 에이전트가 동역학 모델을 속일 수 있는 적대적 정책을 쉽게 찾을 수 있다는 것입니다 – 즉, 우리의 동역학 모델 하에서는 좋아 보이지만 실제 환경에서는 실패할 정책을 찾게 되며, 이는 보통 훈련 분포에서 벗어난 상태들을 방문하여 모델이 틀린 상태들을 방문하기 때문입니다.


Figure 18. Agent discovers an adversarial policy to automatically extinguish fireballs after they are fired during some rollouts.
그림 18. 에이전트가 일부 롤아웃 동안 파이어볼이 발사된 후 자동으로 소멸시키는 적대적 정책을 발견하는 모습.
Figure 18. Agent discovers an adversarial policy to automatically extinguish fireballs after they are fired during some rollouts. 그림 18. 에이전트가 일부 롤아웃 동안 파이어볼이 발사된 후 자동으로 소멸시키는 적대적 정책을 발견하는 모습.

This weakness could be the reason that many previous works that learn dynamics models of RL environments but do not actually use those models to fully replace the actual environments (Oh et al., 2015; Chiappa et al., 2017). Like in the M model proposed in (Schmidhuber, 1990a;b; 1991a), the dynamics model is a deterministic model, making the model easily exploitable by the agent if it is not perfect. Using Bayesian models, as in PILCO (Deisenroth & Rasmussen, 2011), helps to address this issue with the uncertainty estimates to some extent, however, they do not fully solve the problem. Recent work (Nagabandi et al., 2017) combines the model-based approach with traditional model-free RL training by first initializing the policy network with the learned policy, but must subsequently rely on model-free methods to fine-tune this policy in the actual environment. 이러한 약점은 많은 이전 연구들이 RL 환경의 동역학 모델을 학습하지만 실제로 그 모델들을 이용해 실제 환경을 완전히 대체하지 않는 근거가 될 수 있습니다. (Schmidhuber, 1990a;b; 1991a)논문에서 제안된 M 모델에서처럼, 동역학 모델이 결정론적 모델인 경우, 완벽하지 않다면 에이전트에 의해 쉽게 악용될 수 있습니다. PILCO에서처럼 베이지안 모델을 사용하면 불확실성 추정치로 이 문제를 어느 정도 해결하는 데 도움이 되지만, 문제를 완전히 해결하지는 못합니다. 최근 연구는 먼저 학습된 정책으로 정책 네트워크를 초기화하여 모델 기반 접근법과 전통적인 모델 프리 RL 훈련을 결합하지만, 이후에는 실제 환경에서 이 정책을 미세 조정하기 위해 반드시 모델 프리 방법에 의존해야 합니다.

In Learning to Think (Schmidhuber, 2015a), it is acceptable that the RNN M is not always a reliable predictor. A (potentially evolution-based) RNN C can in principle learn to ignore a flawed M, or exploit certain useful parts of M for arbitrary computational purposes including hierarchical planning etc. This is not what we do here though – our present approach is still closer to some of the older system (Schmidhuber, 1990a;b; 1991a), where a RNN M is used to predict and plan ahead step by step. Unlike this early work, however, we use evolution for C (like in Learning to Think) rather than traditional RL combined with RNNs, which has the advantage of both simplicity and generality. 학습하여 생각하기(Learning to Think, Schmidhuber, 2015a)에서는 RNN M이 항상 신뢰할 수 있는 예측자가 아니어도 괜찮습니다. (잠재적으로 진화 기반의) RNN C는 원칙적으로 결함이 있는 M을 무시하거나, 계층적 계획 등을 포함한 임의의 계산 목적을 위해 M의 특정 유용한 부분을 활용하는 방법을 학습할 수 있습니다. 그러나 이것은 우리가 여기서 하는 것이 아닙니다 – 우리의 현재 접근법은 여전히 RNN M이 단계별로 예측하고 계획하는 데 사용되는 몇몇 이전 시스템(Schmidhuber, 1990a;b; 1991a)에 더 가깝습니다. 그러나 이 초기 연구와 달리, 우리는 RNN과 결합된 전통적인 RL 대신 C에 대해 진화를 사용하며(학습하여 생각하기에서처럼), 이는 단순성과 일반성 모두의 장점을 가집니다.

To make it more difficult for our C model to exploit deficiencies of the M model, we chose to use the MDN-RNN as the dynamics model, which models the distribution of possible outcomes in the actual environment, rather than merely predicting a deterministic future. Even if the actual environment is deterministic, the MDN-RNN would in effect approximate it as a stochastic environment. This has the advantage of allowing us to train our C model inside a more stochastic version of any environment – we can simply adjust the temperature parameter ττ to control the amount of randomness in the M model, hence controlling the tradeoff between realism and exploitability. C 모델이 M 모델의 결함을 악용하는 것을 더 어렵게 만들기 위해, 우리는 단순히 결정론적 미래를 예측하는 것이 아니라 실제 환경에서 가능한 결과들의 분포를 모델링하는 MDN-RNN을 동역학 모델로 사용하기로 선택했습니다. 실제 환경이 결정론적이더라도, MDN-RNN은 사실상 이를 확률적 환경으로 근사할 것입니다. 이는 우리가 어떤 환경의 더 확률적인 버전 내에서 C 모델을 훈련시킬 수 있게 해주는 장점이 있습니다 – 우리는 단순히 온도 매개변수 ττ를 조정하여 M 모델의 무작위성 정도를 제어할 수 있으며, 따라서 사실성과 악용 가능성 사이의 트레이드오프를 제어할 수 있습니다.

Using a mixture of Gaussian model may seem like overkill given that the latent space encoded with the VAE model is just a single diagonal Gaussian distribution. However, the discrete modes in a mixture density model is useful for environments with random discrete events, such as whether a monster decides to shoot a fireball or stay put. While a single diagonal Gaussian might be sufficient to encode individual frames, a RNN with a mixture density output layer makes it easier to model the logic behind a more complicated environment with discrete random states. VAE 모델로 인코딩된 잠재 공간이 단순히 단일 대각 가우시안 분포인 것을 고려하면, 가우시안 혼합 모델을 사용하는 것이 과도해 보일 수 있습니다. 그러나 혼합 밀도 모델의 이산 모드는 몬스터가 파이어볼을 쏠지 가만히 있을지를 결정하는 것과 같은 무작위 이산 이벤트가 있는 환경에 유용합니다. 단일 대각 가우시안이 개별 프레임을 인코딩하는 데 충분할 수 있지만, 혼합 밀도 출력층을 가진 RNN은 이산 무작위 상태를 가진 더 복잡한 환경의 로직을 모델링하는 것을 더 쉽게 만듭니다.

For instance, if we set the temperature parameter to a very low value of τ=0.1τ = 0.1, effectively training our C model with a M model that is almost identical to a deterministic LSTM, the monsters inside this dream environment fail to shoot fireballs, no matter what the agent does, due to mode collapse. The M model is not able to jump to another mode in the mixture of Gaussian model where fireballs are formed and shot. Whatever policy learned inside of this dream will achieve a perfect score of 2100 most of the time, but will obviously fail when unleashed into the harsh reality of the actual world, underperforming even a random policy. 예를 들어, 온도 매개변수를 τ=0.1τ = 0.1과 같은 매우 낮은 값으로 설정하면, 사실상 결정론적 LSTM과 거의 동일한 M 모델로 C 모델을 훈련시키게 되는데, 이 꿈 속 환경 내의 몬스터들은 모드 붕괴(mode collpase)로 인해 에이전트가 무엇을 하든 파이어볼을 쏘지 못합니다. M 모델은 파이어볼이 형성되고 발사되는 가우시안 혼합 모델의 다른 모드로 전환할 수 없습니다. 이 꿈 속에서 학습된 어떤 정책이든 대부분의 경우 2100점의 완벽한 점수를 달성하지만, 실제 세계의 가혹한 현실에 놓이면 명백히 실패하며, 심지어 무작위 정책보다도 못한 성능을 보이게 됩니다.

Note again, however, that the simpler and more robust approach in Learning to Think does not insist on using M for step by step planning. Instead, C can learn to use M’s subroutines (parts of M’s weight matrix) for arbitrary computational purposes but can also learn to ignore M when M is useless and when ignoring M yields better performance. Nevertheless, at least in our present C–M variant, M’s predictions are essential for teaching C, more like in some of the early C–M systems (Schmidhuber, 1990a;b; 1991a), but combined with evolution or black box optimization. 그러나 다시 주목할 점은, 학습하여 생각하기(Learning to Think)의 더 단순하고 견고한 접근법은 단계별 계획을 위해 M을 사용하는 것을 고집하지 않는다는 것입니다. 대신, C는 임의의 계산 목적을 위해 M의 서브루틴(M의 가중치 행렬의 일부)을 사용하는 법을 학습할 수 있지만, M이 무용하거나 M을 무시하는 것이 더 나은 성능을 낳을 때는 M을 무시하는 법도 학습할 수 있습니다. 그럼에도 불구하고, 적어도 우리의 현재 C-M 변형에서는 M의 예측이 C를 가르치는 데 필수적이며, 이는 초기 C-M 시스템들(Schmidhuber, 1990a;b; 1991a)에 더 가깝지만 진화 또는 블랙박스 최적화와 결합되어 있습니다.

By making the temperature ττ an adjustable parameter of the M model, we can see the effect of training the C model on hallucinated virtual environments with different levels of uncertainty, and see how well they transfer over to the actual environment. We experimented with varying the temperature of the virtual environment and observing the resulting average score over 100 random rollouts of the actual environment after training the agent inside of the virtual environment with a given temperature: 온도 ττ를 M 모델의 조정 가능한 매개변수로 만듦으로써, 우리는 서로 다른 수준의 불확실성을 가진 환각에 빠진 가상 환경에서 C 모델을 훈련시키는 효과를 볼 수 있고, 그것들이 실제 환경으로 얼마나 잘 전이되는지 확인할 수 있습니다. 우리는 가상 환경의 온도를 변화시키며 실험했고, 주어진 온도로 가상 환경 내에서 에이전트를 훈련시킨 후 실제 환경의 100회 무작위 롤아웃에 대한 평균 점수를 관찰했습니다:

TEMPERATURE τVIRTUAL SCOREACTUAL SCORE
0.102086 ± 140193 ± 58
0.502060 ± 277196 ± 50
1.001145 ± 690868 ± 511
1.15918 ± 5461092 ± 556
1.30732 ± 269753 ± 139
RANDOM POLICYN/A210 ± 108
GYM LEADERN/A820 ± 58

Table 2. Take Cover scores at various temperature settings. 표 2. 다양한 온도 설정에서의 Take Cover 점수.

We see that while increasing the temperature of the M model makes it more difficult for the C model to find adversarial policies, increasing it too much will make the virtual environment too difficult for the agent to learn anything, hence in practice it is a hyperparameter we can tune. The temperature also affects the types of strategies the agent discovers. For example, although the best score obtained is 1092 ± 556 with τ=1.15τ = 1.15, increasing ττ a notch to 1.30 results in a lower score but at the same time a less risky strategy with a lower variance of returns. For comparison, the best score on the OpenAI Gym leaderboard (Paquette, 2016) is 820 ± 58. 우리는 M 모델의 온도를 높이는 것이 C 모델이 적대적 정책을 찾는 것을 더 어렵게 만드는 반면, 너무 많이 높이면 가상 환경이 에이전트가 무언가를 학습하기에는 너무 어려워진다는 것을 볼 수 있으며, 따라서 실제로는 조정할 수 있는 하이퍼파라미터입니다. 온도는 또한 에이전트가 발견하는 전략의 유형에도 영향을 미칩니다. 예를 들어, 가장 좋은 점수는 τ=1.15τ = 1.15에서 1092 ± 556이지만, ττ 를 1.30으로 한 단계 증가시키면 더 낮은 점수를 얻지만 동시에 더 낮은 수익 분산을 가진 덜 위험한 전략을 얻게 됩니다. 비교하자면, OpenAI Gym 리더보드(Paquette, 2016)의 최고 점수는 820 ± 58입니다.