1
0
mirror of https://github.com/gsi-upm/sitc synced 2024-11-21 22:12:30 +00:00

updated to last version of OpenGym

This commit is contained in:
cif2cif 2021-04-19 19:10:03 +02:00
parent c9114cc796
commit 2ba0e2f3d9

View File

@ -97,16 +97,19 @@
"source": [ "source": [
"import gym\n", "import gym\n",
"\n", "\n",
"env = gym.make('CartPole-v0')\n", "env = gym.make(\"CartPole-v1\")\n",
"#env = gym.make('MountainCar-v0')\n", "#env = gym.make('MountainCar-v0')\n",
"#env = gym.make('Taxi-v2')\n", "#env = gym.make('Taxi-v2')\n",
"\n", "\n",
"#env = gym.make('Jamesbond-ram-v0')\n", "observation = env.reset()\n",
"\n",
"env.reset()\n",
"for _ in range(1000):\n", "for _ in range(1000):\n",
" env.render()\n", " env.render()\n",
" env.step(env.action_space.sample()) # take a random action" " action = env.action_space.sample() # your agent here (this takes random actions)\n",
" observation, reward, done, info = env.step(action)\n",
"\n",
" if done:\n",
" observation = env.reset()\n",
"env.close()"
] ]
}, },
{ {
@ -403,6 +406,15 @@
} }
], ],
"metadata": { "metadata": {
"datacleaner": {
"position": {
"top": "50px"
},
"python": {
"varRefreshCmd": "try:\n print(_datacleaner.dataframe_metadata())\nexcept:\n print([])"
},
"window_display": false
},
"kernelspec": { "kernelspec": {
"display_name": "Python 3", "display_name": "Python 3",
"language": "python", "language": "python",
@ -418,7 +430,7 @@
"name": "python", "name": "python",
"nbconvert_exporter": "python", "nbconvert_exporter": "python",
"pygments_lexer": "ipython3", "pygments_lexer": "ipython3",
"version": "3.5.5" "version": "3.7.9"
}, },
"latex_envs": { "latex_envs": {
"LaTeX_envs_menu_present": true, "LaTeX_envs_menu_present": true,