mirror of
https://github.com/gsi-upm/sitc
synced 2024-11-24 07:22:29 +00:00
updated to last version of OpenGym
This commit is contained in:
parent
c9114cc796
commit
2ba0e2f3d9
@ -97,16 +97,19 @@
|
||||
"source": [
|
||||
"import gym\n",
|
||||
"\n",
|
||||
"env = gym.make('CartPole-v0')\n",
|
||||
"env = gym.make(\"CartPole-v1\")\n",
|
||||
"#env = gym.make('MountainCar-v0')\n",
|
||||
"#env = gym.make('Taxi-v2')\n",
|
||||
"\n",
|
||||
"#env = gym.make('Jamesbond-ram-v0')\n",
|
||||
"\n",
|
||||
"env.reset()\n",
|
||||
"observation = env.reset()\n",
|
||||
"for _ in range(1000):\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": {
|
||||
"datacleaner": {
|
||||
"position": {
|
||||
"top": "50px"
|
||||
},
|
||||
"python": {
|
||||
"varRefreshCmd": "try:\n print(_datacleaner.dataframe_metadata())\nexcept:\n print([])"
|
||||
},
|
||||
"window_display": false
|
||||
},
|
||||
"kernelspec": {
|
||||
"display_name": "Python 3",
|
||||
"language": "python",
|
||||
@ -418,7 +430,7 @@
|
||||
"name": "python",
|
||||
"nbconvert_exporter": "python",
|
||||
"pygments_lexer": "ipython3",
|
||||
"version": "3.5.5"
|
||||
"version": "3.7.9"
|
||||
},
|
||||
"latex_envs": {
|
||||
"LaTeX_envs_menu_present": true,
|
||||
|
Loading…
Reference in New Issue
Block a user