Skip to content

Instantly share code, notes, and snippets.

@horoiwa
Created May 10, 2020 05:23
Show Gist options
  • Save horoiwa/d1d9379d6bf060f3571077c6b68a66eb to your computer and use it in GitHub Desktop.
Save horoiwa/d1d9379d6bf060f3571077c6b68a66eb to your computer and use it in GitHub Desktop.
cartpole-v1環境の呼びだし
import gym
from gym import wrappers
env = gym.make(ENV_NAME)
env = wrappers.Monitor(env, "./log", force=True,
video_callable=(lambda ep: ep % 25 == 0))
agent = DQNAgent(env=env)
agent.play(episodes=400)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment