Skip to content

Commit

Permalink
Merge pull request #2 from AdamGleave/upgrade-gym-021
Browse files Browse the repository at this point in the history
Upgrade to Gym 0.21 (Pendulum-v0->Pendulum-v1)
  • Loading branch information
araffin authored Mar 25, 2022
2 parents 4a1f3f3 + 83d2918 commit d17089c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions rlvs_hands_on_sb3.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -1199,7 +1199,7 @@
"id": "5gTXaNLARUnw"
},
"source": [
"model = SAC('MlpPolicy', 'Pendulum-v0', verbose=1)\n",
"model = SAC('MlpPolicy', 'Pendulum-v1', verbose=1)\n",
"model.learn(8000, callback=SimpleCallback())"
],
"execution_count": null,
Expand Down Expand Up @@ -1358,7 +1358,7 @@
"id": "S1K_YuEfVnT6"
},
"source": [
"env = gym.make(\"Pendulum-v0\")\n",
"env = gym.make(\"Pendulum-v1\")\n",
"n_steps = 1024"
],
"execution_count": null,
Expand Down Expand Up @@ -1408,7 +1408,7 @@
"source": [
"start_time_vec_env = time.time()\n",
"# Create 16 environments\n",
"vec_env = make_vec_env(\"Pendulum-v0\", n_envs=16)\n",
"vec_env = make_vec_env(\"Pendulum-v1\", n_envs=16)\n",
"# At each call to `env.step()`, 16 transitions will be collected, so we account for that for fair comparison\n",
"model = PPO(\"MlpPolicy\", vec_env, n_epochs=1, n_steps=n_steps // 16, verbose=1).learn(int(2e4))\n",
"\n",
Expand Down

0 comments on commit d17089c

Please sign in to comment.