Fix parameter name in tutorial code (#1242)

This commit is contained in:
Baptiste Pesquet
2024-11-08 16:44:43 +01:00
committed by GitHub
parent 30023a132a
commit ec7e6d71f3
4 changed files with 4 additions and 3 deletions

1
.gitignore vendored
View File

@@ -15,6 +15,7 @@ __pycache__/
# Virtualenv # Virtualenv
/env /env
/venv /venv
/.venv
# Python egg metadata, regenerated from source files by setuptools. # Python egg metadata, regenerated from source files by setuptools.
/*.egg-info /*.egg-info

View File

@@ -116,7 +116,7 @@ epsilon_decay = start_epsilon / (n_episodes / 2) # reduce the exploration over
final_epsilon = 0.1 final_epsilon = 0.1
env = gym.make("Blackjack-v1", sab=False) env = gym.make("Blackjack-v1", sab=False)
env = gym.wrappers.RecordEpisodeStatistics(env, deque_size=n_episodes) env = gym.wrappers.RecordEpisodeStatistics(env, buffer_length=n_episodes)
agent = BlackjackAgent( agent = BlackjackAgent(
env=env, env=env,

View File

@@ -275,7 +275,7 @@ agent = BlackjackAgent(
# #
env = gym.wrappers.RecordEpisodeStatistics(env, deque_size=n_episodes) env = gym.wrappers.RecordEpisodeStatistics(env, buffer_length=n_episodes)
for episode in tqdm(range(n_episodes)): for episode in tqdm(range(n_episodes)):
obs, info = env.reset() obs, info = env.reset()
done = False done = False

View File

@@ -46,7 +46,7 @@ toy-text = ["pygame >=2.1.3"]
toy_text = ["pygame >=2.1.3"] # kept for backward compatibility toy_text = ["pygame >=2.1.3"] # kept for backward compatibility
jax = ["jax >=0.4.0", "jaxlib >=0.4.0", "flax >=0.5.0"] jax = ["jax >=0.4.0", "jaxlib >=0.4.0", "flax >=0.5.0"]
torch = ["torch >=1.0.0"] torch = ["torch >=1.0.0"]
other = ["moviepy >=1.0.0", "matplotlib >=3.0", "opencv-python >=3.0"] other = ["moviepy >=1.0.0", "matplotlib >=3.0", "opencv-python >=3.0", "seaborn >= 0.13"]
all = [ all = [
# All dependencies above except accept-rom-license # All dependencies above except accept-rom-license
# NOTE: No need to manually remove the duplicates, setuptools automatically does that. # NOTE: No need to manually remove the duplicates, setuptools automatically does that.