ゼロから始める深層強化学習(NLP2018講演資料)/ Introduction of Deep Reinforcement LearningPreferred Networks
Introduction of Deep Reinforcement Learning, which was presented at domestic NLP conference.
言語処理学会第24回年次大会(NLP2018) での講演資料です。
http://www.anlp.jp/nlp2018/#tutorial
ゼロから始める深層強化学習(NLP2018講演資料)/ Introduction of Deep Reinforcement LearningPreferred Networks
Introduction of Deep Reinforcement Learning, which was presented at domestic NLP conference.
言語処理学会第24回年次大会(NLP2018) での講演資料です。
http://www.anlp.jp/nlp2018/#tutorial
16. OpenAI Gymを動かしてみる(2/3)
Gymの基本的な使い方は以下の通り。
16
import gym
env = gym.make("CartPole-v0")
for i_episode in range(20):
observation = env.reset()
done = False
while not done:
env.render()
action = env.action_space.sample()
next_observation, reward, done, info = env.step(action)
Environment
(CartPole-v0)
Agent
action
observation, reward
done (episode
end)
gym
①Environmentからはobservationが得られる
②Agentは、observationを基にactionを行う(ここではランダムに選択)
③actionにより、Environmentから次のobservationと、行動に対する報酬が与えられる
⇒この報酬を最大化したい
①
②
③
テストに出る
①
②
③