본문 바로가기
논문 리뷰/Autonomous racing

Autonomous Overtaking in Gran Turismo Sport Using Curriculum Reinforcement Learning

by heesungsung 2024. 2. 17.
https://arxiv.org/abs/2103.14666
 

Autonomous Overtaking in Gran Turismo Sport Using Curriculum Reinforcement Learning

Professional race-car drivers can execute extreme overtaking maneuvers. However, existing algorithms for autonomous overtaking either rely on simplified assumptions about the vehicle dynamics or try to solve expensive trajectory-optimization problems onlin

arxiv.org


 

Introduction

1.  [Baseline; Single-race]  “Super-Human Performance in Gran Turismo Sport Using Deep Reinforcement Learning”, Sony AI and RPG in University of Zurich (2021 RA-L)

2.  [+ Vision Input]  “Expert Human-Level Driving in Gran Turismo Sport Using Deep Reinforcement Learning with Image-based Representation”, Sony AI (2021 NeurIPS)

3.  [+ Overtake; Multi-race]  “Autonomous Overtaking in Gran Turismo Sport Using Curriculum Reinforcement Learning”, Sony AI and RPG in University of Zurich (2021 ICRA)

4.  [Current SOTA]  “Outracing Champion Gran Turismo Drivers with Deep Reinforcement Learning”, Sony AI (2022 Nature)

RA-L 논문을 baseline으로 multi-player racing 상황에서 overtaking maneuver를 학습하는 알고리즘을 소개하고 있다. (2021 ICRA)

Fig. 1: A system overview of the proposed curriculum reinforcement learning method for addressing the autonomous overtaking problem in Gran Turismo Sport.

아래는 연구팀에서 공개한 영상이다. 더 자세한 정보는 링크를 참고 바란다.

 

Methodology

RL agent 개발의 goal은 다음과 같다.

Design a controller that achieve the best trade-off btw two objectives :  1) minimizing total overtake time,  2) avoiding collisions.

Reward function

우선, 기본적으로 지금까지 사용해왔던 course-progress racing reward를 적용했다. 마지막 항은 wall collision에 대한 penalty 이다.

$$ r_t^{racing} = (cp(\mathbf{s}_t) - cp(\mathbf{s}_{t-1})) - c_w \rho_w \left\|\mathbf{v}_t \right\|^2 \tag{1} $$

이번에는 multi-player 환경을 고려하고 있기 때문에, 다음의 overtaking reward가 제안되었다. Racing reward에 두 가지 항이 추가되는데, Eqn.(2)의 두 번째 항은 다른 agent들과의 충돌에 대한 penalty를, 세 번째 항은 근처 agent들과의 빠른 gap reduction에 대한 encouragement를 의미하고 있다.

$$ \begin{align*} r_t^{overtaking} = r_t^{racing} - c_c \rho_c \left\|\mathbf{v}_t \right\|^2 + \sum_{\forall i \in C\setminus \left\{k \right\}} \left\{ \rho^i c_r [\triangle cp(s_{t-1}^i, s_{t-1}^k) - \triangle cp(s_t^i, s_t^k)] \right\} \end{align*} \tag{2} $$

$$ \begin{align*} \text{where,} \quad & \triangle cp(s_t^i, s_t^k) = cp(s_t^i) - cp(s_t^k) \\ & \rho^i = \rho(s_t^i, s_t^k) = \left\{\begin{matrix} 1, & \left| \triangle cp(s_t^i, s_t^k) \right| < c_d \\ 0, & \text{otherwise} \\ \end{matrix}\right. \end{align*} $$

Feature representation

Input features

$$ \mathbf{o}_{t} = \left [ \mathbf{v}_t, \dot{\mathbf{v}_t}, \theta_t, \mathbf{d}_t, \delta_{t-1}, f_t, f_c, \mathbf{c}_L \right ] $$

변경된 점으로, 2D LiDAR measurement 라는 input을 사용했다. 물론 RA-L에서도 이와 같은 역할을 하는 rangefinder를 사용했었지만, 굉장히 긴 측정 거리를 가져서 실제 센서와는 거리가 멀었다. 여기서는 216°의 FOV 및 20m의 측정 거리를 갖는 센서를 사용했다. (물론, 측정된 값은 GT 정보이다. 그리고, 어떻게 게임 상에 이런 센서를 구성했는지 의문이다...)

Output features

$$  \mathbf{a}_t = \left[ \delta_t, \omega_t \right] $$

RL training specification

기존 SAC 구조를 유지하면서도 효과적으로 다양한 maneuver를 학습할 수 있도록 개선한 "Curriculum SAC" 를 제안하고 있다.

SAC는 off-policy 기법으로, extrapolation error를 갖는다. 예를 들어, overtaking task에 대해 학습을 진행하기 위해 agent는 수 없이 많은 exploration을 통해 overtasking scene을 찾게 된다. 이렇게 되면 학습의 초반 단계에 agent는 어떻게 주행해야 하는 것인지에 대한 학습을 전혀 진행하지 못하게 된다는 문제점이 존재한다.

이를 해결하기 위해 다음의 두 가지 개선점을 제안하고 있다.

Three-stage curriculum RL

Fig. 2: An illustration of the proposed three-stage curriculum reinforcement learning for autonomous race car overtaking.

3개의 stage에 걸쳐 network를 학습시키며, 각 stage는 이전 stage에서 학습 완료된 weight를 initial weight로 설정하여 학습된다. 단, 학습 parameter들은 stage 특성에 맞게 초기화시킨다.

(a) Racing

  • Goal :  Train policy for high-speed racing
  • Single-player environment
  • Maximize reward function of Eqn.(1)

(b) Racing & Overtaking

  • Goal :  Train policy for aggressive racing and overtaking
  • Multi-player environment
  • Maximize reward function of Eqn.(2)

(c) Racing & Overtaking & Avoidance

  • Goal :  Train policy for overall behavior, include collision avoidance
  • Multi-player environment
  • Maximize reward function of Eqn.(2) w/ increased ((c_c)) and ((c_w))

Distributed sampling strategy

NuerIPS 논문에서와 같이 4개의 PS4를 사용했으며, 각 PS4에는 20개의 agent들이 존재한다. Image 취득이 필요 없기 때문에 20배 더 빠른 sampling 속도를 갖는다. 또한, 많은 차량들이 한 번에 주행하게 되면서 트랙의 거의 모든 부분들을 커버하게 된다는 장점이 존재한다.

 

Experiments

Settings

여기서는 RA-L 논문의 실험 setting 중 'setting A'에 해당하는 Tokyo expressway central outer loop 트랙과 Audi TT Cup '16 차량을 사용하였다.

학습을 진행한 desktop은 i7-8700 CPU와 GTX 1080Ti GPU를 갖고 있으며, 학습 hyperparameter setting은 아래 표와 같다.

Results

Baseline comparison (lap time)

Overtaking maneuver를 학습하기 전에, 다양한 학습 기법들에 대한 stage 1 (single-player racing) 의 성능을 비교했다. Baseline으로써 model-free 알고리즘들이 좋은 성능을 보였다고 한다

Overtaking performance

다음은 학습 setting을 조금씩 다르게 한 3가지 agent와 human player data를 비교한 결과이다. 대부분의 경우 3-stage curriculum SAC 방식으로 학습된 Agent 3가 가장 좋은 성능을 보였다.

전방 차량과의 초기 거리가 50m인 경우에 대해 best human driver보다 좋은 기록을 보일 때도 있었다. 하지만, 평균적으로는 human driver보다 성능이 안좋았으며, 유사한 성능을 보이는 agent를 개발했다는 것에 의의가 있다.

Learned driving behavior

아래는 Setting A - Agent 3의 best case에 대해 driving trajectory를 그려본 결과이다.

왼쪽의 3개는 agent의 trajectory이며, 오른쪽 2개는 human driver의 trajectory이다. 주목할 점은 RL agent가 앞 차를 추월할 때 in-course가 아닌 out-course 전략을 구사한다는 점이다. 이는 reward design에 의한 것이며, 추월 시간을 최소화하고 차량 속도를 최대화하는 방향으로 학습되었기 때문에 이와 같은 trajectory가 나오게 된다.