VIETNAM NATIONAL UNIVERSITY - HO CHI MINH CITY UNIVERSITY OF INFORMATION TECHNOLOGY FACULTY OF COMPUTER SCIENCE NGUYEN TRUNG HIEU TRAN DINH KHANG BACHELOR THESIS DESIGN AND APPLICATION OF EVOLUTIONARY REINFORCEMENT LEARNING METHODS FOR CONTINUOUS CONTROL BACHELOR OF SCIENCE IN COMPUTER SCIENCE HO CHI MINH CITY, 2021 VIETNAM NATIONAL UNIVERSITY - HO CHI MINH CITY UNIVERSITY OF INFORMATION TECHNOLOGY FACULTY OF COMPUTER SCIENCE NGUYEN TRUNG HIEU - 18520750 TRAN DINH KHANG -18520072 BACHELOR THESIS DESIGN AND APPLICATION OF EVOLUTIONARY REINFORCEMENT LEARNING METHODS FOR CONTINUOUS CONTROL BACHELOR OF SCIENCE IN COMPUTER SCIENCE SUPERVISOR DR. LUONG NGOC HOANG HO CHI MINH CITY, 2021 ĐẠI HOC QUỐC GIA TP. HỒ CHÍ MINH CONG HÒA XÃ HỘI CHỦ NGHĨA VIỆT TRƯỜNG ĐẠI HỌC NAM CÔNG NGHỆ THÔNG TIN Độc Lập - Tự Do - Hạnh Phúc TP. NHẬN XÉT KHÓA LUẬN TỐT NGHIỆP (CÁN BỘ HƯỚNG DẪN) Tên khóa luận: DESIGN AND APPLICATION OF EVOLUTIONARY REINFORCEMENT LEARNING METHODS FOR CONTINUOUS CONTROL Nhóm SV thực hiện: Cán bộ hướng dẫn: Nguyễn Trung Hiếu - 18520750 TS.
Lương Ngọc Hoàng Trần Đình Khang - 18520072 Đánh giá Khóa luận 1. Về cuốn báo cáo: Số trang Số chương Số bảng số liêu Số hình vẽ Số tài liêu tham khảo Sản phẩm 2. Về nôi dung nghiên cứu: (KýNtgêưnờviàhậrõxọétên) ĐẠI HOC QUỐC GIA TP. HỒ CHÍ MINH CONG HÒA XÃ HỘI CHỦ NGHĨA VIỆT TRƯỜNG ĐẠI HỌC NAM CÔNG NGHỆ THÔNG TIN Độc Lập - Tự Do - Hạnh Phúc TP.
NHẬN XÉT KHÓA LUẬN TỐT NGHIỆP (CÁN BỘ PHẢN BIỆN) Tên khóa luận: DESIGN AND APPLICATION OF EVOLUTIONARY REINFORCEMENT LEARNING METHODS FOR CONTINUOUS CONTROL Nhóm SV thực hiện: Cán bộ phản biện: Nguyễn Trung Hiếu - 18520750 Trần Đình Khang - 18520072 Đánh giá Khóa luận 1. Về cuốn báo cáo: Số trang Số chương Số bảng số liêu Số hình vẽ Số tài liệu tham khảo Sản phẩm 2. Về nôi dung nghiên cứu: 3. Về chương trình ứng dụng: 4.Vềtháiđôlàmvécủasinhvê: (KýNtgêưnờviàhậrõxọétên) ĐẠI HỌC QUỐC GIA TP.
HỒ CHÍ MINH CỘNG HÒA XÃ HỘI CHỦ NGHĨA VIỆT NAM TRƯỜNG ĐẠI HỌC Độc Lập - Tự Do - Hạnh Phúc CÔNG NGHỆ THÔNG TIN DE CƯƠNG CHI TIẾT TÊN ĐỀ TÀI: THIẾT KẾ VÀ ỨNG DỤNG CÁC PHƯƠNG PHÁP HỌC TĂNG CƯỜNG TIẾN HÓA CHO BÀI TOÁN ĐIỀU KHIỂN LIÊN TỤC Cán bộ hướng dẫn: TS. Lương Ngọc Hoàng Thời gian thực hiện: Từ ngày 1/08/2021 đến ngày 30/12/2021 Sinh viên thực hiện: Nguyễn Trung Hiếu - 18520750 Trần Đình Khang - 18520072 Nội dung đề tài: A. Mô tả bài toán: Bài toán điều khiển là bài toán thiết kế một bộ điều khiến (controller) để một tác tử (agent) AI thực hiện các hành động thích hợp tại các tình huống khác nhau sao cho đạt được kết quả sau cùng là tốt nhất có thể. Tác tử thường phải hoàn thành hiệu quả một tác vụ mong muốn thông qua việc tối đa hóa một hàm phần thưởng (reward function).
Khác với Học có giám sát, tác tử AI không được biết trước là nên thực hiện hành động nào ở mỗi trạng thái (không có dữ liệu huấn luyện) mà cần phải học các thông tin này thông qua việc tương tác với môi trường. Tác tử phải thử nghiệm thực hiện các hành động khác nhau, và môi trường sẽ trả về các tín hiệu cho biết trạng thái mới của tác tử sau khi thực hiện mỗi hành động. Bộ điều khiển (controller) cho các tác tử AI có thể được thiết kế bằng các mạng neural. Các mạng neural này thường được huấn luyện bằng các thuật toán Học tăng cường (reinforcement learning - RL).
Tuy nhiên, các thuật toán RL có một số nhược điểm về hiệu suất trong môi trường có nhiều nhiễu (noise) và chịu ảnh hưởng rất lớn từ việc thiết lập các siêu tham số (hyperparameters). Hiện nay, một số nghiên cứu state-of-the-art thử nghiệm kết hợp các phương pháp Tính toán tiến hóa (evolutionary computation - EC) với Học tăng cường để giúp khắc phục các nhược điểm trên. Đối tượng và phạm vi nghiên cứu: Khóa luận nghiên cứu các phương pháp Học tăng cường tiến hóa (evolutionary reinforcement learning - ERL) để huấn luyện mạng neural của các tác tử AI trong bài toán điều khiển. Khóa luận tập trung vào lớp các bài toán điều khiển có không gian hành động liên tục.
Mục tiêu: + Tim hiểu tổng quan về bài toán điều khiển và điều khiển liên tục. * So sánh đánh giá các nhóm phương pháp phổ biến hiện nay: Tính toán tiến hóa (evolutionary computation - EC), Học tăng cường (reinforcement learning - RL), và Học tăng cường tiến hóa (evolutionary reinforcement leaming - ERL). + Thiết kế và thực nghiệm một số phương pháp cải tiến hiệu suất của các phương pháp ERL hiện tại. Phương Pháp thực hiện: Nội dung 1: Khảo sát nhóm thuật toán Học tăng cường tiến hóa cho bài toán điều khiển với không gian hành động liên tục Phương pháp thực hiện: Cài đặt và chạy thí nghiệm so sánh các phương pháp Học tăng cường tiến hóa được công bố gần đây.
Sử dụng các tác vu trong bộ công cụ Mujoco để đánh giá hiệu suất. Phân tích ưu khuyết điểm của các phương pháp này. Nội dung 2: Đề xuất phương pháp cải thiện hiệu suất thuật toán Phương pháp thực hiện: Với kết quả từ nội dung 1 tiến hành đề ra các phương pháp cải thiện hiệu suất của các thuật toán Học tăng cường tiến hóa. Kết quả mong đợi: * Bao cáo phân tích, so sánh các phương pháp Hoc tăng cường tiến hóa hiện nay.
* Bao cáo và kết quả thực nghiệm của các phương pháp cải thiện hiệu suất. Kế hoạch thực hiện: * - Nội dung 1: tháng 8-9 năm 2021 * - Nội dung 2: tháng 10-11 năm 2021 * _ Tổng hợp kết quả và viết KLTN: tháng 11-12 năm 2021 Xác nhận của CBHD TP. HCM, ngày 30 tháng 12 năm 2021 (Ký tên và ghi rõ họ tên) Sinh viên (Ký tên và ghi rõ họ tên) Nguyễn Trung Hiếu Lương Ngoc Hoàng Trần Đình Khang 14 1x Acknowledgment First and foremost, we would like to give a special thank to our supervisor, Dr Luong Ngoc Hoang, who teaches, guides and works with us in our the- sis. He taught us invaluable lessons in research methodology, evolutionary algorithms and machine learning.
Also, he gives us insightful discussions whenever we need, whether it is a problem in research projects, or just our spontaneous curiosity about a lecture. Besides, he provides us considerable encouragement, advice, and most importantly, computational power when we face with overwhelming problems in our thesis. Again, our greatest grat- itude to Dr Luong Ngoc Hoang. It is our honour to work with him.
We would like to thank our talented friends, in KHTN2018, for the time we study together and motivate each other to constantly move forward. Last but not least, we would like to thank UIT for such an outstanding en- vironment for study and research. This contributes greatly to the completion of our thesis. Table of Contents 1 11 TntroducHon|.2 Continuous control problem|.4 Challenges and open problems|.
tructure of thesisl.- 6 2 Background 8 [21 Policy Searhl.1 Stochastic policy and deterministic policy].2 Deterministic Policy Gradient (DPG) Theorem [20]] .3 Actor-Critic architecturel.4 On policy algorithm vs off policy algorithm].5 Twin Delayed Deep Deterministic Policy Gradient (TD3)| 18 2.6 Soft Actor-Critcl.2 Cross Entropy Method(CEM). 2 ee 25 xi 3 Proposing Methods| 29 3.3 Comparison with previous worksÌ.1 Mujoco Continuous Control Benchmark|.ẶẶẶ SỐ VỐo 41 441 elD223vsTID23].2 CEM-SACvsS5AC]. 50 Bibliography| 52 xii List of Figures 1.1 Markov Decision Process (MDP). Agent interacts with environ- ¬ ee 3 1.2 A screenshot of the Humanoid in MuJoCo Physics Simulation.
In Humanoid, we have to teach our agent to stand up and move forward as fast as possible|.1 A parameterised policy function|.3 Atypical EA algorthml|.4 IHustraton o£CEM-RLÌ.2 Illustration of CEM-SAC algorithm|.1 MuJoCo locomotion tasks: Ant-v3, HalfCheetah-v3, Walker2d- [ v3, Hopper-v3, Humanoid-v3, HumanoidStandup-v2].2 Average performance results on MuJoCo-v3 environments of [ eTD3, CEM-TD3, and TD3 over 10 independent runs] .3 Average performance results on MuJoCo-v3 environments of CEM-SAC, CEM-TD3, and SAC over 10 independent runs| .4 10 runs of CEM-SAC and 10 runs of SAC. CEM-SAC shows more stability than SAC over the training session, with much less pitfalls). 0 eee 47 xiii List of tables 4. Final performance of eTD3, CEM-TD3 and TD3|.4 statistical Results of testsl.5 Final performance of CEM-SAC, CEM-TD3 and SAC].6 Student t-test taken across 10 executions of CEM-SAC, SAC and CEM-TD3.7 Final performance of CEM-SAC, CEM-TD3 and SAC., state-of-the-art off-policy policy gradient algorithms, by coupling it with the cross-entropy method (CEM), i., an estimation-of-distribution algorithm.
The hybrid approaches, eTD3 and CEM-SAC, exhibit both the efficiency of policy gradient algorithms and the stability of CEM in training policy neural networks of reinforcement learning agents for solving control problems. Our work here extends the evolutionary reinforcement learning (ERL) line of research on integrating the robustness of population-based stochastic black- box optimization, that typically assumes little to no problem-specific knowl- edge, into the training process of policy gradient algorithms, that exploits the sequential decision making nature for efficient gradient estimation. Exper- imental result comparisons with the baselines TD3, SAC and CEM-TD3, a recently-introduced ERL method that combines CEM and the TD3 algorithm, on a wide range of control tasks in the MuJoCo benchmarks confirm the en- hanced performance of our proposed CEM-SAC.1 Introduction Reinforcement learning (RL) is a machine learning paradigm to train artifi- cial intelligence (AI) agents to accomplish a certain task when there does not exist a dataset of training examples with corresponding ground truth labels. It is not straightforward, and might be not realizable, to effectively construct such a dataset in many control problems, such as robotics, inventory manage- ment, real-time bidding.
Designated tasks often involve the optimization of a reward/objective function. RL algorithms train the agents via an iterative exploration-exploitation mechanism [13]. At each iteration, experiences, of- ten in the form of (state, action, reward, next state), are obtained by interacting directly with the environment. These collected training signals are then em- ployed to favorably adjust the trial-and-error interactions of the agents at sub- sequent iterations.
In recent years, the couplings with deep neural networks (DNNs) and other deep learning (DL) techniques have enabled RL to achieve successful applications in a wide range of complicated problems with high- dimensional state spaces and action spaces. Policy neural networks, that rec- ommends which action agents should perform given each input state, are of- ten trained by a class of deep reinforcement learning (DRL) algorithms called policy gradient methods. Stochastic gradients of reward functions with re- spect to the policy parameters can be used to update network weights at each Chapter 1. Introduction 2 gradient ascent iteration.
Deep reinforcement learning (DRL) algorithms, however, still suffer from some essential obstacles: credit assignment with sparse/delayed reward sig- nals, premature convergence due to difficulties in maintaining a meaningful diverse exploration, sensitivity to hyperparameter settings (9}(14]. Salisman et al. proposed to treat the training of an agent’s policy network as a black- box optimization problem, which can then be solved by evolution strategies (ES), in particular natural evolution strategies [26], with competitive results compared to state-of-the-art DRL algorithms.