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の技術発表資料です
PRO
December 17, 2023
0
260
強化学習ライブラリ RLlibを使ってみた
NearMeの技術発表資料です
PRO
December 17, 2023
Tweet
Share
More Decks by NearMeの技術発表資料です
See All by NearMeの技術発表資料です
実践で使えるtorchのテンソル演算
nearme_tech
PRO
0
6
ローカルLLMを⽤いてコード補完を⾏う VSCode拡張機能を作ってみた
nearme_tech
PRO
0
240
初めてのmarimo (ハンズオン)
nearme_tech
PRO
0
25
ローカルLLM
nearme_tech
PRO
0
45
LlamaIndex Workflow: Build Practical AI Agents Fast
nearme_tech
PRO
0
28
Box-Muller法
nearme_tech
PRO
1
40
Kiro触ってみた
nearme_tech
PRO
0
350
今だからこそ入門する Server-Sent Events (SSE)
nearme_tech
PRO
4
590
ReactNative のアップグレード作業が (意外に)楽しかった話
nearme_tech
PRO
2
140
Featured
See All Featured
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
12
1.4k
From Legacy to Launchpad: Building Startup-Ready Communities
dugsong
0
120
Leveraging LLMs for student feedback in introductory data science courses - posit::conf(2025)
minecr
0
100
The Straight Up "How To Draw Better" Workshop
denniskardys
239
140k
Learning to Love Humans: Emotional Interface Design
aarron
274
41k
Prompt Engineering for Job Search
mfonobong
0
140
Faster Mobile Websites
deanohume
310
31k
The Curious Case for Waylosing
cassininazir
0
200
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
47
7.9k
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
10
780
SEOcharity - Dark patterns in SEO and UX: How to avoid them and build a more ethical web
sarafernandez
0
100
Making the Leap to Tech Lead
cromwellryan
135
9.7k
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