이 글은 현재 활동중인 팀블로그에 함께 작성 되었습니다.

https://ropiens.tistory.com/215

 

editor, Seungeon Baek(백승언)

Reinforcement learning Research Engineer


 

[Kor]

안녕하세요, 오랜만에 블로그를 쓰게 되네요! 이번 글은 논문 리뷰가 아닌, 강화학습 관련한 저의 첫 포스팅 글입니다.

 

 이번에 작성하는 글에서 다루고자 하는 내용은 "강화학습은 어떤 문제를 풀 수 있는가?"입니다. 이와 관련하여, 비슷한 글이 있는지 여러 키워드로 검색을 해 보았는데 강화학습이 어떤 문제를 풀 수 있는지에 대한 내용보다는, 강화학습이 현재 적용되고 있는 분야와 관련된 블로그들이 대부분임을 알 수 있었습니다. (Application of RL, Usage of RL,... etc)

 

 그렇기에, 부족하지만, 제가 한 번 강화학습이 어떤 문제를 풀 수 있는지에 대한 것을 주제로 글을 작성해보자 하는 생각이 들어, 해당 주제를 선정하였습니다. (요즘 핫한 ChatGPT도 슬쩍 끼워 넣어 보았습니다 :D)

 

그럼, 본격적인 포스팅 시작 하겠습니다!

 

[Eng]

 Hello, it's been a while since I wrote a blog post! This post is not a review of a paper but rather my first post on the topic of reinforcement learning.

 

 In this post, I want to cover the topic of "What problems can reinforcement learning solve?". In researching this topic, I searched for various keywords to see if there were any similar articles. Still, I found that most of the blogs related to reinforcement learning were focused on the current fields where it is being applied(Application of RL, Usage of RL,..., etc.) rather than what problems reinforcement learning can solve. (I also sneakily inserted ChatGPT, which is trendy these days :D)

 

Therefore, even though it may be lacking, I have decided to write a post on what RL can do.

 

So without further ado, let's get started with the post!

 

제목

[Kor]

 이번 포스팅 자료의 제목은 What can RL do?로 선정하였습니다. 최근 들어, 유명한 ChatGPT에도 강화학습(RLhf)이 적용 되며, 강화학습에 대한 관심이 늘었지만, 과연 "내 문제에도 강화학습을 적용할 수 있을까?"를 고민하고 계시는 분들께 도움이 될만한 자료라고 생각해주시면 될 것 같습니다.

 

[Eng]

 The title of this post is "What can RL do?". Recently, reinforcement learning(RL) has been applied to famous models like ChatGPT, which has increased interest in RL. However, for those who are wondering, "Can RL be applied to my problem?" this post can be a helpful resource

 

목차

[Kor]

 발표 순서는 다음과 같습니다. 먼저 도입부에서 강화학습이 무엇인지에 대해 간단히 설명을 드리고, 강화학습이 집중해서 풀어온 문제들에 대해, 알고 있는 지식 하에서, 8가지 범주로 나누어 설명을 드리고자 합니다. 흐흐 이렇게나 많은 문제를 풀 수 있다니!

  • Control problem
  • Multi-armed bandit problem
  • Combinatorial optimization
  • Cooperative behavior learning
  • Competitive behavior learning
  • Mixed behavior learning
  • Learning from human experts
  • Learning from human feedback

 

[Eng]

 The presentation order is as follows. First, in the introduction, I will briefly explain what RL is. Then, based on existing knowledge, I will explain the problems that reinforcement learning has been focused on solving, divided into eight categories. Wow, RL can solve so many problems!

  • Control problem
  • Multi-armed bandit problem
  • Combinatorial optimization
  • Cooperative behavior learning
  • Competitive behavior learning
  • Mixed behavior learning
  • Learning from human experts
  • Learning from human feedback

 

[Kor]

먼저, 도입부입니다.

 

[Eng]

First, let's begin with the introduction

 

Basics of RL

[Kor]

이 장과 다음 장에서는, 강화학습의 정의, 목적, 강화학습의 몇몇 중요 요소들에 대해서 말씀을 드리고자 합니다.

 

 강화학습의 정의는 다음과 같습니다.

  • "agent와 환경이 상호 작용을 하며, 이를 통해 얻은 행동에 대한 피드백과 경험들을 토대로 agent를 학습할 수 있게 하는 머신러닝 기법의 종류 중 하나".

 

 또한, 강화학습의 목적은 다음과 같습니다.

  • "에피소드의 끝까지 agent가 받는 보상의 총 합(sum of reward)를 최대화하는 것"
  • 혹은 "최대화 할 수 있게끔 하는 정책(policy)을 학습하는 것" 

 

 강화학습의 중요 요소들은 다음과 같습니다. 이 장에서는, 공학적인 용어보다는 중요한 용어들을 위주로 준비해 두었습니다.

  • Agent: 강화학습 내에서 학습을 수행하는 것 혹은 의사 결정자
  • Environemnt: 에이전트를 제외한 모든 것들을 포함하는 것
  • Step: 환경과 에이전트의 단위 상호작용
  • Episode: 시스템이 끝나거나, 종료 상태에 도달 할 때까지의 스텝의 길이

 

[Eng]

In this slide and the next, I would like to discuss the definition, purpose, and some important components of RL.

 

The definition of RL is as follows:

  • "Type of machine learning technique that enables an agent to learn in an interactive environment by trial and error using feedback from its action and experience"

 

In addition, the purpose of RL is as follows:

  • "To maximise the total sum of rewards(return) received by the environment until the end of the episode"
  • Or "To learn a ppolicy that can maximise the reward"

 

The important elements of RL are as follows. In this chapter, I have prepared important terms rather than mathematical terms.

  • Agent: What performs learning and decision-making in RL
  • Environment: Everything outside the agent
  • Step: Unit interaction between the agent and the environment
  • Episode: The length of steps until the system ends or reaches a terminal condition(state)

 

Basics of RL

[Kor]

강화학습의 중요 요소들은 다음과 같습니다.

  • Action: Agent가 실행 가능한 모든 가능한 움직임들
  • State: 환경으로 부터 받은 현재 상황
  • Reward: 마지막 행동에 대한 평가로써, 환경으로 부터 받은 순시 반환 값피드백
  • Policy: 현재 상황을 기반으로, 다음 액션을 정의함에 있어서, 에이전트가 활용하는 전략
    •  정책 policy는 state space S로부터 action space A로의 사상이며(정의역이 상태 공간, 치역이 행동 공간인 함수!) 보통 theta라고 하는 파라미터로 모수화 되어 있음.

 

 이러한 사전 지식을 활용하여, 장애물을 모두 피해서 도착 지점에 잘 도착하는 슈퍼 마리오(agent)를 학습시키는 예제에 대해서 설명해 보겠습니다.

 

 슈퍼 마리오(RL agent)는 방향키와 대쉬, 점프 키(action) 등을 활용하여, 도착 지점(terminal state)에 도착하기 위해 스테이지 내에서(environment) 이런저런 시도를 해보며(trial and error), 환경으로 부터 점수(feedback)를 받고(굼바를 못 피하면 -10, 거북이를 못 피하면 -10, 금화를 먹으면 +1, 도착점에 도착하면 + 200 등), 이를 통해 특정 상황(state)에서, 어떤 방향키(action) 및 특수 키를 눌러야 하는지에 대한 승리 전략(policy)을 수립하게 된다!

 

어지럽다고요? 죄송합니다. 필력이 좋지가 않네요ㅎ

 

[Eng]

The important elements of reinforcement learning are as follows.

  • Action: All the possible moves that the agent can exert
  • State: Current situation returned by the environment
  • Reward: An immediate return sent back from the environment to evaluate the last action
  • Policy: The strategy that the agent employs to determine the next action based on the current state
    • Policy, parameterized with \theta is a mappping from state space S to action space A

 Using this prior knowledge, let me explain an example of training Super Mario(agent) to arrive at the destination point by avoiding all obstacles.

 The Super Mario(reinforcement learning agent) uses directional keys, dash, jump key(action), etc., to try various approaches(trial and error) to reach the destination point(terminal state) in certain stage(environment). The Super Mario receives score(feedback) from the environment(such as -10 if it fails to dodge a Goomba, -10 for failing to dodge a Koopa Troopa, +1 for collecting a coin, and +200 for arriving at the destination point). Through this, the agent establishes a 쟈ㅜwinning strategy(policy) for which direction key(action) and special key to press in a specific situation(state).

 

Confusing? I'm sorry. My writing skills are not that great.

 

[Kor]

 이 장부터는 본격적으로 강화학습이 집중해서 풀어온 문제들에 대해, 각각의 카테고리 별로 간단한 설명과, 예제 문제들을 소개해 드리도록 하겠습니다.

 

[Eng]

 Starting from this slide, I will focus on the problems RL has been tackling and introduce summaries and examples for each category.

 

Control problem

[Kor]

 먼저, 강화학습 agent는 control problem을 해결할 수 있습니다. Control problem이란, 특정 환경 내에서, 강화학습 agent가 object를 제어하는 문제라고 말씀드릴 수 있을 것 같습니다.

 

 이때, 강화학습 agent는 해당 문제를 다양한 레벨로 다룰 수 있습니다. 인지 - 의사결정 - 제어의 모든 과정을 end-to-end로 다룰 수가 있고, 이러한 연구는 한정된 환경에서 학습을 수행하는 로봇 연구에서 많이 채택됩니다. 또한, 의사결정 - 제어의 부분만 강화학습 agent가 다룰 수 있습니다. 이는 인지 기술이 많이 발달한 자율주행자동차 연구에서 주로 행해지는 것 같습니다. 뿐만 아니라, 강화학습은 시스템의 일부를 제어만 할 수도 있습니다.

 

 이러한 강화학습을 이용해 control problem을 해결 해온 연구의 예시로는, 로봇 팔 도메인에서 블록 쌓기 등의 복잡한 task를 end-to-end로 학습하는 사례들이 있으며, 또한, 자율주행 자동차 도메인에서 decision and control problem을 학습하는 사례 등이 있을 것 같습니다.

 

[Eng]

 First, an RL agent can solve control problems. Control problems can be described as problems where the RL agent controls an object in a particular environment.

 

The RL agent can handle the problem at various levels in this case. It can handle the entire perception, decision-making, and control process end-to-end. This type of research is often adopted in a robot domain where learning is performed in a limited environment. In addition, the agent can only handle decision-making and control as part of the process. This is mainly done in autonomous driving research, where perception technology has advanced. Furthermore, RL can also control only part of the system.

 

 Examples of research that have solved control problems using RL include learning complex tasks such as block stacking in the robot arm domain through end-to-end learning and learning decision and control problems in the autonomous driving domain.

 

Multi-armed bandit problem

[Kor]

 두 번째로, 강화학습 agent는 multi-armed bandit problem을 해결할 수 있습니다. Multi-armed bandit problem이란 특정 집합에서 행동을 선택하는 문제라고 말씀드릴 수 있을 것 같습니다.

 

 이때, 강화학습 agent는 해당 문제를 다양한 horizon으로 다룰 수 있습니다. 유한한 길이의 문제 뿐만 아니라, 무한한 길이의 문제도 잘 다룰 수 있다는 것이 근본 책, 논문 등에서 수학적으로 다루어져 왔습니다.

 

 이러한 강화학습을 이용해 multi-armed bandit problem을 해결해온 연구의 예시로는, 보드 게임 도메인에서의 연구가 있을 것 같습니다. 바둑 같은 경우, 매 스텝 빈칸 중 승률이 높아 보이는 칸을 선택하는 문제로 해석할 수 있지요! 또한, 추천 시스템 도메인 역시 매 트리거 타임마다 user에게 item set 중 아이템을 선택하여 유저에게 추천해 주기 때문에, 많은 연구가 수행되고 있는 것으로 알고 있습니다. 또한, CS 도메인에서는 매 스텝 머신에게 job을 할당하는 문제인 job-shop scheduling 문제에서 강화학습이 이러한 관점으로 적용이 되고 있다고 알고 있습니다.

 

[Eng]

 Secondly, an RL agent can solve the multi-armed bandit problem, which can be described as a problem of selecting actions from a specific set.

 

 In this case, the RL agent can handle this problem from various horizons. It has been mathematically treated in the literature as well as in papers, not only for finite-length problems.

 

 Examples of research that have solved the multi-armed bandit problem using RL include studies in board game domains. For example, in the game of Go, the problem can be interpreted as selecting a blank space with a high winning probability at each step. In addition, in the domain of recommendation systems, many studies have been conducted as the system recommends an item to a user by selecting an item from an item set at each trigger time. Also, in the computer science domain, RL is being applied from this perspective in job-shop scheduling problems where a machine is assigned a job at each step.

 

Combinatorial optimization problem

[Kor]

 다음으로, 강화학습 agent는 combinatorial optimization problem을 해결 할 수 있습니다. Combinatorial optimization problem이란 주어진 특정 집합 내에서 최적의 결정들(결정들의 조합)을 내리는 문제라고 말씀드릴 수 있을 것 같습니다.

 

 이때, 강화학습 agent는 이를 1 step MDP로 간주 하여, 해당의 조합 최적화 문제를 해결해 낼 수 있다는 것이 최근 들어 많은 연구 사례들이 보여주고 있습니다.

 

 이러한 강화학습을 이용해 combinatorial optimization problem을 해결 해 온 연구의 예시로는, 웨이퍼 상에 칩들을 배치하는, chip placement도메인에서의 연구가 있을 것 같습니다. 또한, routing problem 분야에서도, 단일 차량 혹은 다중 차량의 운행 순서를 정해주는 등 강화학습을 이용하여 여러 연구들이 진행되고 있는 것으로 알고 있습니다.

 뿐만 아니라, 강화학습은 수학 문제를 해결할 수 있는데, 지도학습에서 특정 task를 학습하기 위해 어떤 loss 식이 좋은지를 graph 혹은 symbolic으로 표현된 term들의 최적의 조합을 찾는 방식으로 해당 문제를 해결하는 것이 가능합니다.

 

[Eng]

 Next, an RL agent can solve combinatorial optimization problems. Combinatorial optimization problems refer to problems of making optimal decisions(combination of decision) witn a certain set.

 

 In this case, the reinforcement learning agent can consider it as a 1-step MDP and solve the combinatorial optimization problem, as many recent reserach cases have shown.

 

 Examples of research that has used reinforcement learning to solve combinatorial optimization problems include chip placement domains, where chips are placed on a wafer, and the routing problem field, where reinforcement learning is used to determine the operating order of single or multiple vehicles.

In addition, reinforcement learning can solve mathematical problems. In supervised learning, it is possible to solve problmes by finding the optimal combination of graph or symbolically expressed terms that are good for a given loss function used to learn a specific task.

 

Cooperative behavior learning problem

[Kor]

 또한, 강화학습 agent는 cooperative behavior learning problem을 해결할 수 있습니다. 협력적인 행위를 학습한다는 것은, 주어진 특정 환경 내에서 여러 객체들이 하나의 목표를 달성하기 위한 행위들을 학습한다는 것으로 말씀드릴 수 있을 것 같습니다.

 

 이때, 강화학습은 해당 문제를 individual reward만을 줘서 해결 할지, team reward를 주어 credit assignment까지 풀어낼지를 세팅하여 해결할 수 있습니다.

 

 강화학습을 이용해 cooperative behavior를 학습해온 연구의 예시로는, 통신 도메인에서 기지국이 모든 사용자들을 고려해 편익이 최대로 하는 방향으로 resource를 분배하는 등의 연구가 있을 것 같습니다.

또한, 게임 분야에서도, 이러한 협력적인 행위를 학습하기 위한 연구들이 많이 수행되고 있으며, 대표적으로 SMAC이라고 하는, 3s vs 5z 등 다중 유닛이 협력하여 상대방을 쓰러뜨리는 행위를 학습하는 환경에서 여러 연구들이 수행되고 있는 것으로 알고 있습니다.

 

[Eng]

 Moreover, an RL agent can solve cooperative behavior learning problems. Learning cooperative behavior menas learning actions by multiple objects within a given environment to archive a team goal.

 

 In this case, RL can solve the problem by setting wheter to give individual rewards or team rewards, and solving the credit assignment when giving team rewards.

 

 Examples of research that has used RL to learn cooperative behavior include studies in the communication domain, such as the dstribution of resource by base stations considering all users for maximum benefit.

In addition, in the game domain, many studies are being conducted to learn such cooperative behavior, and there are several studies carried out in environments where multiple units cooperate to take doooown opponents, such as 3s vs 5z, known as SMAC envrionment.

 

Competitive behavior learning problem

[Kor]

 더욱이, 강화학습 agent는 competitive behavior learning problem을 해결 할 수 있습니다. 경쟁적인 행위를 학습한다는 것은, 주어진 특정 환경 내에서 여러 객체들이 zero-sum game을 수행하고, 각자가 상대에 대응해 이기기 위한 전략을 학습한다는 것으로 말씀드릴 수 있을 것 같습니다.

 

 강화학습을 이용해 competitive behavior를 학습해온 연구의 예시로는, 가장 유명한 AlphaGo, AlphaStar 등이 있을 것 같습니다. 워낙 유명한 연구들이지요.

 

[Eng]

 In addition, an RL agent can solve competitive behavior learning problems. Learning competitive behavior menas that multiple objects perform a zero-sum game in a given environment and learn strategies to truimph against each other.

 

 Examples of studies that have used RL to learn competitive behavior include the famous AlphaGo and AlphaStar. Theses studies are very well known!

 

Mixed behavior learning problem

[Kor]

 이 뿐만 아니라, 강화학습 agent는 cooperative behavior와 competitive behavior가 혼합된, mixed behavior를 학습할 수 있습니다. 예시로 슬라이드에 첨부한 Predetor-Prey game 환경처럼, 동일 그룹 내에서는 협력적인 행위를, 타 그룹과는 경쟁적인 행위를 동시에 학습할 수 있는 것이죠.

 

 이러한 강화학습의 능력에 힘입어, game domain에서는 11 vs 11 축구를 관제하는 big brother와 같은 centralized agent를 학습할 수 있었고(Google Research Football Environment), 자율주행 자동차 도메인 내에서는 Mixed autonomy 하에서 일반 차량들과 조화를 이루는 자율주행 자동차의 제어 방법이 연구되고 있습니다.

 

[Eng]

 Furthermore, an RL agent can learn mixed behaviors, which combine cooperative and competitive behaviors. For example, in an environment such as Predetor-Prey game figured to the slides, agents can learn both cooperative behavior within the same group and competitive behavior with other groups.

 

 Thanks to this ability of RL, centralized agents like the big brother controlling 11 vs 11 soccer games in the game domain(Google Research Football Environment) have been developed, and in the autonomous vehicle domain, research is being conducted on controlling autonomous vehicles that harmonize with human vehicles under mixed autonomy. 

 

Learning from human experts problem

[Kor]

 그리고, 강화학습 agent는 learning from human experts(demonstration)컨셉으로 학습할 수 있습니다. 해당 방법론을 이용하는 강화학습 기법들은 인간(전문가)의 시연데이터를 통해 학습을 수행하기 때문에, 밑바닥부터 학습하는 기존의 강화학습들에 비하여 복잡한 task를 상대적으로 쉽게 학습해 낼 수 있다고 말씀드릴 수 있을 것 같습니다.

 

 이러한 방식을 통해 학습한 강화학습 연구의 예시로는, 자율주행 자동차 도메인 내에서 복잡한 시나리오(회전 교차로, 신호 교차로, 도심부 주행 등) 에서의 계획 및 제어를 수행하는 연구가 있을 것 같습니다. 또한, 금융 분야에서 복잡한 시장 상황을 고려하여 주식을 사고파는 트레이딩 봇 같은 경우도 이러한 RLfD(Reinforcement Learning from Demonstration) 컨셉의 연구들이 있는 것으로 알고 있습니다.

뿐만 아니라, 최근 DeepMind의 GATO라고 하는 agent는 실제 사람처럼 "여러 개"의 게임을 사람 이상의 실력으로 클리어하는 괴물과 같은 모습도 보여주었습니다. 해당 agent는 human experts의 demonstration을 통해 학습이 이루어졌답니다.

 

[Eng]

 And then, an RL agent can learn from human experts(demonstration). RL techniques that use this concpet can leaern complex tasks relatively easily compared to traditional RL methods, as they leveraging the knowledge through human demonstration data rather than starting from scratch.

 

 Examples of RL research learned through this approach, there are studies that perform planning and control in complex scenarios(such as turning intersections, signal intersections, and urban driving) in the autonomous vehicle domain. Also, in the finantial sector, there are studies on trading bots that buy and sell stocks considering complex market situations based on the RLfD(Reinforcement Learning from Demonstration) concept.

Moreover, DeepMind's recent agent called GATO showed a monstrous capability to clear "multiple games" with human-level proficiency. The agent learned through demonstration from human experts.

 

Learning from human feedback(preference) problem

[Kor]

 마지막으로, 강화학습 agent는 learning from human feedback(preference)컨셉으로 학습할 수 있습니다. 해당 방법론을 이용하는 강화학습 기법들은 인간의 직접적인 feedback을 받아 학습을 수행하기 때문에, 자연스러운 action을 생성해 낼 수 있다는 것이 장점으로 생각됩니다.

 

 이를 실현하기 위해, 기존의 강화학습과는 조금 다르게, 환경은 reward를 제공하지 않게 됩니다. 대신에, 사람이 observation을 보고 feedback을 주면, 특별한 모델인 reward predictor가 사람의 feedback을 통해 reward 함수를 모델링, 해당 reward 모델과 함께 강화학습 agent가 학습되는 방식인 것 같습니다.

 

 이러한 방식을 통해 학습한 강화학습 연구의 예시로는, 유명한 Open AI의 로봇 "손" 큐브 풀기 연구(DAgger)가 있을 것 같습니다. 사실은 reward predictor를 이용해 학습이 되지는 않았지만, 계속하여 사람이 더 좋은 행위를 개입해서 알려주는 DAgger의 방식이 RLhf(RL frorm human preference)와 철학적으로는 비슷하다고 생각하여 넣어 보았습니다.

더욱이, 해당 방식은 LLM(Large Language Model)과 결합하여, 최근 돌풍을 일으키고 있는 ChatGPT!!를 가능하게 한 기술이기도 합니다. RLhf 덕분에 ChatGPT는 조금 더 친절하고, 조금 더 자연스럽고, 또한 혐오 발언 등을 자제할 수 있었다고 합니다.

 

[Eng]

 Finally, an RL agent can also learn from human feedback(preference). The RL techniques that use human feedback can generate natural actions as they receive direct feedback from humans.

 

 To achieve this, the environment does not provide rewards as in traditional RL. Instead, humans give feedback based on observations, and a special model called the reward predictor models the reward function based on the human feedback. The RL agent is trained with this reward model.

 

 An example of RL research using this approach is the famous OpenAI's robot hand solving a Rubik's cube using the DAgger algorithm. Although not trained using the reward predictor, the DAgger approach continuously incorporates better behaviores informed by human feedback, which is similaar philosophically to RLhf(Reinforcement Learning from human preference)

Moreover, this approach can be combined with LLM(Large Language Model) technology, which has recently gained popularity in the form of ChatGPT. Thanks to RLhf, ChatGPT can be more friendly, natural, and also avoid hate speech.

 

Thank you!!

[Kor]

 정말로 오랜만에 블로그 글을 쓰게 되었는데, 여기까지 읽어 주신 모든 분들께, 짧지 않은 글을 읽어 주셔서 감사하다는 말씀을 드립니다. 궁금하신 점들은 댓글을 통해 질문을 주시면 가끔씩이라도 들러 답변을 드릴 수 있도록 하겠습니다.

 

[Eng]

 This is my first time writing a blog post in Eng, and I would like to thank those who have read this lengthy post. If you have any question, please feel free to leave a comment and I will try to drop by and provide answers whenever possible.

강화학습 논문 리뷰 연재 두번째입니다.

 

DeepMind의 이번 연구는, 기존 강화학습 알고리즘의 benchmark로써 자주 활용되곤 하는 모든 Atari 2600 게임에서(수 백개중 벤치마크로써 사용되는 57개의 게임) 사람보다 뛰어난 성능을 보여준 Agent 57이라고하는 agent에 대한 내용을 포함하고 있습니다.

 

계속해서 대단한 성과를 보여주는 DeepMind가 다음엔 어떤 연구를 보여줄지 기대가 되네요ㅎㅎ

 

그럼, 본격적인 리뷰 시작하겠습니다!

 

논문의 제목은 굉장히 직관적입니다. "Atari 2600 game 환경에서 human benchmark를 상회하는 실력을 보여주는 Agent57!" 이지요.

이 논문을 기점으로, DeepMind는 DeepMind에서 제공한 강화학습 환경인 Arcade Learning Environment에서의 연구를 졸업했다? 라고 생각해야 할지도 모르겠습니다.

 

목차는 다음과 같습니다.
가장 먼저, Atari 2600 game으로 강화학습을 시험해 볼 수 있는 환경인, Arcade Learning Environment(이후 ALE로 사용)에 대한 설명과, 이전의 ALE에서 얻은 성과, ALE에서 학습을 수행할 시 발생했던 challenging issue들을 먼저 도입부에서 설명드리려고 합니다.

 

그 후, 본론에서 Agent 57의 핵심 개념인 Decomposition of Q funciton, Meta-controller에 대해 설명을 드리고, 실험 및 결과를 평가한 내용에 대해 설명을 드리는 것으로 자료를 준비했습니다.

 

이 논문에서 ALE는 DeepMind에서 제공하는, 강화학습 agent 개발을 쉽게 할 수 있도록 해주는 개발 프레임워크라고 설명이 되어 있습니다.

 

이 ALE는 고전 게임인 Atari 2600 game의 수 백여개의 게임을 환경으로써 사용할 수 있도록 하는 interface를 제공하고 있으며, 특히 그중 57개의 game은 RL 관련 논문에서 벤치마크로써 주로 사용되곤 합니다. 

 

제 세대(94년생입니다..ㅎ)들도 한 번쯤 들어보았던 Space invader(갤러그), break-out(벽돌 부수기 게임) 또한 이 환경에서 제공해준다고 합니다.

 

저는 Agent 57의 결과가 어느 정도로 대단한 것인지 알기 위하여, ALE에서 기존의 deep RL Agent들이 얻은 성과들을 정리해 보았으며, 이 장은 정리한 결과를 보여주고 있습니다.

 

1) 2015년 DQN 논문으로도 유명한 Human-level control through deep RL에서는, DQN agent가 23개의 Atari game에서 HNS, Human noalized score를 넘었다고 합니다. HNS의 식은 자료에 기술해 두었습니다. 같은 해에 나온 DRQN 논문의 경우 일부 십 여 개의 게임에 대해서만 성능 평가가 이루어 져서, 생략 하겠습니다.

 

2) 2018년, DQN, PER, DDQN, Double DDQN 등 DQN 계열 아이디어의 집합체였던 Rainbow DQN의 경우, 괄목할만한 성과를 거두어 53개의 Atrai game에서 HNS를 능가하는 결과를 얻었다고 합니다.

 

3) 또한, 2019년 R2D2의 경우도, 52개의 Atari game에서 HNS를 능가하는 결과를 얻었다고 합니다. 하지만, Rainbow와 R2D2의 경우, sparse reward가 주어지는 환경 등에 약한 모습을 보여 모든 게임에서 좋은 결과를 얻지는 못하였습니다.

 

4) 2019년, AlphaGo, AlphaZero에 이어  Model-based learning 알고리즘인 MuZero가 발표 되었고, 이 Agent의 경우, 57개의 게임 중 51개의 game에서 HNS를 능가하는 정도의 결과를 얻었지만, 전체 game에서 평균 점수 등이 R2D2, IMPALA 등을 상회화는 결과를 얻었다고 합니다.

 

이렇듯, 최근에 발표된 deep RL Agent들은 Agent57이 정복한 57개의 게임 중, 몇몇 게임들은 해결하지 못 하였으며, 이러한 문제는 다음과 같은 해결해야할 이슈들을 남겼습니다.

 

1) 첫 번째는 Long-term credit assignment 문제입니다.

이 문제는, 현재 많은 강화학습 알고리즘들이 MDP를 수학적 프레임워크로 사용하고 있기 때문에 생긴 문제로써, 이전에 행했던 일련의 행동들(long-term) 중 어떤 행동에 credit을 주고, 어떠한 행동에 penalty를 줘야할 지 분배(assignment)하는 것이 어렵기 때문에 발생했습니다.

이 문제를 설명하기 위한 예시로, 이 논문은 Atari game중 하나인 Skiing에 대한 예시를 들었습니다.

 

2) 두 번째는 Exploration in large high dimensional state space 문제입니다.

이 문제는 sparse reward를 주는 환경인 몬테수마의 복수(Montezuma's revenge) 게임 등에서 특히 발생한 문제로, reward를 적게 받더라도 agent가 문제 해결을 하기 위해서 지속적인 탐험을 해야한다는 문제였습니다.

이 문제 또한 MDP 프레임워크를 사용할 경우 immediate reward만을 받기 때문에 기존의 강화학습 알고리즘이 해결하기 어려운 문제였습니다.

 

2 번째 문제는 초창기 강화학습 알고리즘에서도 많이 다루어 왔던 문제로, 이를 해결하기 위해 여러 방법들이 제시되어 왔으며, 보통 다음과 같은 범주에 속한다고 합니다.

1) Randomize value function

2) Unsupervised policy learning

3) Intrinsic motivation

4) Combining handcrafeted features of domain-specific knowledge

 

이 중, general AI의 컨셉에 맞는, 가장 팬시한 방법은 3) intrinsic motivation이라고 생각이 되며, 이에 관련하여 DeepMind는 Agent 57이전에 Never Give Up!(이후 NGU)이라고 하는 논문을 발표하기도 하였습니다.

 

이 장부터는, Agent57이 어떻게, benchmark로서 자주 사용되는 57개의 game을 모두 정복할 수 있었는지에 대해 말씀드리겠습니다.

 

간단히 요약하면, Agent57의 경우 완전히 새로운 개념을 도입한 것은 아니고, NGU에서 발표한 intrinsic reward 개념과 R2D2를 기반으로 조금 엔지니어링을 첨가한?! 논문이라고 볼 수 있을 것 같습니다.

 

그리하여 저자들이 말하는 Agent57의 contribution은 다음과 같다고 합니다.

1) State-action value function(Q-function)을 intrinsic reward와 extrinsic reward로 decomposition하여 구한 점

2) Meta-controller 개념을 이용해 exploration/exploitation을 adaptive하게 선택한 점

3) 1)과 2)를 통해 결과적으로 57개의 atari game 모두에서 human baseline을 능가한 점 이라고 합니다.

 

여기서 Intrinsic reward와 extrinsic reward에 대해 간단히 말씀 드리면, intrinsic reward는 내적 동기 즉, 호기심, 배움의 의지, 행동의 의미 와 관련이 있다고 생각하시면 될 것 같고, extrinsic reward는 점수, 즉각적인 보상, 페널티에 대한 두려움 등과 관련이 있다고 생각하시면 될 것 같습니다.

 

이 장에서는 3개의 주된 contribution 중 첫 번째에 대해서 먼저 말씀드리겠습니다.

Agent 57의 경우 state-action value를 extrinsic reward를 통해 학습 되는 Q_extrinsic과 intrinsic reward를 통해 학습 되는 Q_intrinsic의 두 개의 component로 나누어 구했으며, 이를 beta라고 하는 hyper parameter를 통해 조절하였습니다.

 

여기서 extrinsic reward는 우리가 알고 있는 환경에서 주는 immediate reward이며, intrinsic reward의 경우 NGU에서 소개한 호기심과 관련된 reward를 의미합니다. 이에 대해 자세한 내용은 추후 NGU를 리뷰하며 다시 한 번 다루도록 하겠습니다.

 

또한, 이 논문에서는 Q value function network를 두 개로 나누어 학습한 결과와, NGU에서 제시한 single network로 reward만 extrinsic, intrisic reward로 나누어 받도록 학습한 결과가 최적점에서 같다는 증명을 수행 하였으며, 실제 학습시에는 network를 decomposition 하는 것이 결과가 좋았다는 얘기를 했습니다. 

 

Agent57의 주된 contribution 중 두 번째인 Meta-controller입니다.

Meta-controller는 최신 연구 분야 중 하나인 Meta-RL과 관련되어 나온 개념이 아닌가 생각됩니다. 이 부분은 저의 뇌피셜이니, 논문에 기술된 내용만 소개하자면...

 

이 논문에서 Meta-controller은 다음과 같이 동작합니다.

1) Agent가 탐험이 필요한 초기에는 intrinsic reward의 계수인 beta를 크게, 할인율 gamma를 작게 선택하고, 학습이 진행될 수록 그 반대의 pair를 선택합니다.

2) 또한, 이렇게 pair를 선택하는 방식을 multi-arm bandit algorithm을 통해 구현했다고 하며, 이 multi-arm bandit algorithm의 경우 r_extrinsic 만을 이용하는 UCB(Upper confidence bounds) algorithm을 통해 동작하게끔 구현했다고 합니다.

 

정리를 해 보면, Agent57의 agent는 1) 호기심을 통해 선택해 본 적이 없는 행동에 대한 선택을 할 수 있으며, 2) 현재 호기심을 부려야 할지, 지금껏 학습한 대로 행동해야 할지 또한 판단할 수 있는 agent라고 할 수 있습니다. 이것을 수학적으로, 그리고 프로그래밍적으로 설계하고 구현한 DeepMind가 정말 대단한 것 같습니다.

 

다음 장 부터는 실험을 수행한 내용과 그 결과에 대해서 설명드리겠습니다.

 

이 장부터는, Agent57과 타(他) agent사이의 비교를 어떻게 수행했는지에 대한 내용과, Agent57의 학습 결과에 대해서 말씀드리겠습니다.

 

1) Agent57을 이용해 57개의 모든 게임을 학습 시켜 본 뒤, 학습이 오래 걸렸던 10개의 게임을 선택했습니다.

2) 10게의 게임에 대해 자료에 도시한 3개의 대조군 및 여러 대조군들과의 비교 및 분석을 수행했다고 합니다.

 

이 장에서 소개한 대조군에 대해 간단히 설명 드리면, seperate net, long trace, bandit이 NGU와 Agent57의 차이라고 볼 수 있고, 그렇기 때문에 상기의 3개의 대조군을 비교를 위해 설정했다고 보시면 될 것 같습니다.

 

그래프를 보시게 되면, 결과는 물론 Agent 57이 가장 좋았습니다.

 

R2D2 논문을 읽어야 더욱 정확한 분석이 가능할 것 같아, 현재 분석 및 작성 중입니다.

 

결론은 다음과 같습니다.

 

1) 환경으로써 사용된 57개의 game에 대해 Agent57의 경우, 모든 게임에서 human score를 능가하는 결과를 얻었다고 합니다.

2) 모든 게임에 대해 평균과 중앙 값을 계산해보면 MuZero가 가장 뛰어나다는 것을 알 수 있었지만, MuZero의 경우, Pitfall, Venture등의 게임에서 random policy 정도의 성능을 보여주었음을 알 수 있었다고 합니다.

3) 또한, R2D2에 meta-controller 개념을 추가시켜 학습한 결과, 기존의 R2D2와 비교하여 더욱 좋은 성능을 보였다는 것과 함께 meta-controller의 성능을 과시하였습니다.

 

본문에는 Appendix로 추가한, 전체 57개 게임에 대한 결과입니다. 표의 열은 각각 game 명, Average human, random, Agent 57, 타 알고리즘 들로 구성되어 있습니다.

 

몇 몇 game에서는 타 알고리즘이 Agent 57을 압도하는 경우도 있지만, 전체 game에서 Average human을 이긴 Agent 57이 ALE 환경에서 DeepMind가 얘기하였던 general AI에 가장 가까운게 아닌가 생각이 듭니다.

 

이번에도 긴 글을 읽어주신 점 감사드립니다.

 

논문의 링크와, 전체 슬라이드는 밑에 준비되어 있습니다.

 

arxiv.org/abs/2003.13350

 

Agent57: Outperforming the Atari Human Benchmark

Atari games have been a long-standing benchmark in the reinforcement learning (RL) community for the past decade. This benchmark was proposed to test general competency of RL algorithms. Previous work has achieved good average performance by doing outstand

arxiv.org

0123456789101112

+ Recent posts