Skip to content

Commit 9b4c63f

Browse files
committed
Install gym with gym[...,accept-rom-license] instead of installing and running AutoROM manually
1 parent 51b51ac commit 9b4c63f

File tree

1 file changed

+3
-33
lines changed

1 file changed

+3
-33
lines changed

18_reinforcement_learning.ipynb

+3-33
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,9 @@
5252
"\n",
5353
"if IS_COLAB or IS_KAGGLE:\n",
5454
" !apt update && apt install -y libpq-dev libsdl2-dev swig xorg-dev xvfb\n",
55-
" %pip install -q -U tf-agents pyvirtualdisplay gym[box2d,atari] AutoROM\n",
55+
" %pip install -U tf-agents pyvirtualdisplay\n",
56+
" %pip install -U gym>=0.21.0\n",
57+
" %pip install -U gym[box2d,atari,accept-rom-license]\n",
5658
"\n",
5759
"# Scikit-Learn ≥0.20 is required\n",
5860
"import sklearn\n",
@@ -2180,38 +2182,6 @@
21802182
"Let's use TF-Agents to create an agent that will learn to play Breakout. We will use the Deep Q-Learning algorithm, so you can easily compare the components with the previous implementation, but TF-Agents implements many other (and more sophisticated) algorithms!"
21812183
]
21822184
},
2183-
{
2184-
"cell_type": "markdown",
2185-
"metadata": {},
2186-
"source": [
2187-
"First, we need to download and install the Atari ROMs. This can be done very easily using the `AutoROM` tool, if you accept the license:"
2188-
]
2189-
},
2190-
{
2191-
"cell_type": "code",
2192-
"execution_count": 78,
2193-
"metadata": {},
2194-
"outputs": [
2195-
{
2196-
"name": "stdout",
2197-
"output_type": "stream",
2198-
"text": [
2199-
"AutoROM will download the Atari 2600 ROMs.\n",
2200-
"They will be installed to:\n",
2201-
"\t/Users/ageron/miniconda3/envs/tf2/lib/python3.8/site-packages/AutoROM/roms\n",
2202-
"\n",
2203-
"Existing ROMs will be overwritten.\n",
2204-
"Done! \n"
2205-
]
2206-
}
2207-
],
2208-
"source": [
2209-
"if IS_COLAB:\n",
2210-
" !{sys.prefix}/local/bin/AutoROM --quiet --accept-license\n",
2211-
"else:\n",
2212-
" !{sys.prefix}/bin/AutoROM --quiet --accept-license"
2213-
]
2214-
},
22152185
{
22162186
"cell_type": "markdown",
22172187
"metadata": {},

0 commit comments

Comments
 (0)