Fix AutoROM usage

main
Aurélien Geron 2021-10-18 12:54:17 +13:00
parent 7c5bbf6c50
commit de94d878d4
1 changed files with 18 additions and 3 deletions

View File

@ -59,7 +59,6 @@
"if IS_COLAB or IS_KAGGLE:\n", "if IS_COLAB or IS_KAGGLE:\n",
" !apt update && apt install -y libpq-dev libsdl2-dev swig xorg-dev xvfb\n", " !apt update && apt install -y libpq-dev libsdl2-dev swig xorg-dev xvfb\n",
" %pip install -q -U tf-agents pyvirtualdisplay gym[box2d,atari,accept-rom-license]\n", " %pip install -q -U tf-agents pyvirtualdisplay gym[box2d,atari,accept-rom-license]\n",
" !AutoROM --quiet --accept-license\n",
"\n", "\n",
"# Common imports\n", "# Common imports\n",
"import numpy as np\n", "import numpy as np\n",
@ -1815,6 +1814,22 @@
"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!" "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!"
] ]
}, },
{
"cell_type": "markdown",
"metadata": {},
"source": [
"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:"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {},
"outputs": [],
"source": [
"!{sys.prefix}/bin/AutoROM --quiet --accept-license"
]
},
{ {
"cell_type": "markdown", "cell_type": "markdown",
"metadata": {}, "metadata": {},
@ -3210,9 +3225,9 @@
], ],
"metadata": { "metadata": {
"kernelspec": { "kernelspec": {
"display_name": "Python 3 (ipykernel)", "display_name": "homl3",
"language": "python", "language": "python",
"name": "python3" "name": "homl3"
}, },
"language_info": { "language_info": {
"codemirror_mode": { "codemirror_mode": {