Skip to content

Commit 7d83b3f

Browse files
Update examples to match changes in third party libraries.
1 parent 236cc6d commit 7d83b3f

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

examples/openai-lander/evolve.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
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

66
import multiprocessing
@@ -9,7 +9,7 @@
99
import random
1010
import time
1111

12-
import gym.wrappers
12+
import gymnasium as gym
1313
import matplotlib.pyplot as plt
1414
import numpy as np
1515

@@ -18,7 +18,7 @@
1818

1919
NUM_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))

examples/single-pole-balancing/movie.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import gizeh as gz
2-
import moviepy.editor as mpy
2+
from moviepy.video.VideoClip import VideoClip
33
from 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)

0 commit comments

Comments
 (0)