File tree Expand file tree Collapse file tree 2 files changed +7
-7
lines changed
Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Original file line number Diff line number Diff line change 1- # Evolve a control/reward estimation network for the OpenAI Gym
2- # LunarLander-v2 environment (https://gym.openai.com/envs/LunarLander-v2) .
3- # Sample run here : https://gym.openai.com/evaluations/eval_FbKq5MxAS9GlvB7W6ioJkg
1+ # Evolve a control/reward estimation network for the Gymnasium
2+ # LunarLander-v3 environment.
3+ # Original OpenAI Gym sample : https://gym.openai.com/evaluations/eval_FbKq5MxAS9GlvB7W6ioJkg
44
55
66import multiprocessing
99import random
1010import time
1111
12- import gym . wrappers
12+ import gymnasium as gym
1313import matplotlib .pyplot as plt
1414import numpy as np
1515
1818
1919NUM_CORES = multiprocessing .cpu_count ()
2020
21- env = gym .make ('LunarLander-v2 ' )
21+ env = gym .make ('LunarLander-v3 ' )
2222
2323# print("action space: {0!r}".format(env.action_space))
2424# print("observation space: {0!r}".format(env.observation_space))
Original file line number Diff line number Diff line change 11import gizeh as gz
2- import moviepy .editor as mpy
2+ from moviepy .video . VideoClip import VideoClip
33from cart_pole import CartPole
44
55
@@ -36,5 +36,5 @@ def make_frame(t):
3636
3737 return surface .get_npimage ()
3838
39- clip = mpy . VideoClip (make_frame , duration = duration_seconds )
39+ clip = VideoClip (make_frame , duration = duration_seconds )
4040 clip .write_videofile (output_filename , codec = "mpeg4" , fps = 50 )
You can’t perform that action at this time.
0 commit comments