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
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
NearMeの技術発表資料です
PRO
December 17, 2023
0
270
強化学習ライブラリ RLlibを使ってみた
NearMeの技術発表資料です
PRO
December 17, 2023
Tweet
Share
More Decks by NearMeの技術発表資料です
See All by NearMeの技術発表資料です
Tile38 Overview
nearme_tech
PRO
0
35
Rust 製のコードエディタ “Zed” を使ってみた
nearme_tech
PRO
0
220
実践で使えるtorchのテンソル演算
nearme_tech
PRO
0
22
ローカルLLMを⽤いてコード補完を⾏う VSCode拡張機能を作ってみた
nearme_tech
PRO
0
450
初めてのmarimo (ハンズオン)
nearme_tech
PRO
0
34
ローカルLLM
nearme_tech
PRO
0
55
LlamaIndex Workflow: Build Practical AI Agents Fast
nearme_tech
PRO
0
34
Box-Muller法
nearme_tech
PRO
1
55
Kiro触ってみた
nearme_tech
PRO
0
410
Featured
See All Featured
SEOcharity - Dark patterns in SEO and UX: How to avoid them and build a more ethical web
sarafernandez
0
120
Building Better People: How to give real-time feedback that sticks.
wjessup
370
20k
Everyday Curiosity
cassininazir
0
130
Design in an AI World
tapps
0
150
RailsConf 2023
tenderlove
30
1.3k
B2B Lead Gen: Tactics, Traps & Triumph
marketingsoph
0
57
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
27k
How to Align SEO within the Product Triangle To Get Buy-In & Support - #RIMC
aleyda
1
1.4k
The Mindset for Success: Future Career Progression
greggifford
PRO
0
240
Making the Leap to Tech Lead
cromwellryan
135
9.7k
Rails Girls Zürich Keynote
gr2m
96
14k
Balancing Empowerment & Direction
lara
5
900
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