Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
強化学習ライブラリ RLlibを使ってみた
Search
NearMeの技術発表資料です
December 17, 2023
0
43
強化学習ライブラリ RLlibを使ってみた
NearMeの技術発表資料です
December 17, 2023
Tweet
Share
More Decks by NearMeの技術発表資料です
See All by NearMeの技術発表資料です
Infrastructure as Code: Intro to Pulumi
nearme_tech
1
21
OR-Toolsの中⾝ -VRPの解法について-
nearme_tech
0
56
GTFSのデータを Streamlitで可視化してみた
nearme_tech
0
43
Offset / Cursor Paginationについて
nearme_tech
2
85
⼤規模⾔語モデルの拡張(RAG)が 終わったかも知れない件について
nearme_tech
23
16k
VRPを深層強化学習で解く
nearme_tech
0
76
Let’s go monorepo - intro to Nx.dev
nearme_tech
0
23
Dynamic Vehicle Routing のシミュレーションを Streamlitで作ってみた
nearme_tech
0
71
ログ監視ツールについて調べてみた
nearme_tech
0
61
Featured
See All Featured
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
34
8.9k
What the flash - Photography Introduction
edds
64
11k
Agile that works and the tools we love
rasmusluckow
325
20k
Building Better People: How to give real-time feedback that sticks.
wjessup
356
18k
Mobile First: as difficult as doing things right
swwweet
217
8.6k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
323
20k
Being A Developer After 40
akosma
67
580k
jQuery: Nuts, Bolts and Bling
dougneiner
60
7.2k
The Pragmatic Product Professional
lauravandoore
26
5.9k
Automating Front-end Workflow
addyosmani
1357
200k
Bash Introduction
62gerente
605
210k
Creatively Recalculating Your Daily Design Routine
revolveconf
211
11k
Transcript
0 強化学習ライブラリ RLlibを使ってみた 2023-12-15 第71回NearMe技術勉強会 ⼤神卓也
1 エージェントが環境とのやり取りを通じて、 得られる収益を最⼤化するような⾏動を学習する 強化学習(Reinforcement Learning) 報酬 ⾏動 状態 エージェント 環境
2 • Ray(分散並列処理のライブラリ)を使って強化学習のアルゴリズム が実装されたライブラリ • 幅広いアルゴリズムが実装されてい https://docs.ray.io/en/latest/rllib/rllib-algorithms.html • マルチエージェントRL •
オフラインRL • 高機能 • 実験管理 • ハイパーパラメータ探索 RLlibとは
3 使ってみた Proximal Policy Optimization(PPO)を使ってCartPole-v1を解く
4 台を左右に動かして棒が倒れないようにがんばる 終了条件 • 棒が倒れる • 画面外に退場 • 500ステップ耐える 報酬
• つねに+1 CartPole-v1
5 Proximal Policy Optimization(PPO)を使ってCartPole-v1を解く ソースコード https://github.com/ogami334/rllib_prac 使ってみた
6 実験管理 • Weights & Biases https://docs.ray.io/en/latest/tune/examples/tune-wandb.html 他にもいろいろな実験管理ツールと • Comet
• MLflow
7 PPOのアルゴリズム(ざっくり) 1. 環境とやり取りして経験を集める 2. 経験をもとに,収益が高くなる行動をとるように方策を更新 1, 2 を繰り返す 並列訓練
8 PPOのアルゴリズム(ざっくり) 1. 環境とやり取りして経験を集める ←複数CPUで並列実行 2. 経験をもとに,収益が高くなる行動をとるように方策を更新 1, 2 を繰り返す
並列訓練
9 並列訓練 # 6CPUで並列に経験を集めることで高速化 PPOConfig().rollouts(num_rollout_workers=6)
10 感想 • 書き方の流儀が3パターンほどあり、わかりにくい • 今回紹介した以外にも便利な機能がある • tuned examples https://github.com/ray-project/ray/tree/master/rllib/tuned_examples
• 使いこなせたら手軽に幅広いRLタスクをこなせそう
11 Thank you