iTHOR comes packaged with AI2-THOR, which can be installed in Python using pip:

pip install ai2thor

or conda:

conda install -c conda-forge ai2thor

Optionally, one may also choose to install AI2-THOR from an exact Git commit. Here, we can pass in the commit id to:

pip install --extra-index-url ai2thor==0+COMMIT_ID

For example, we may have:

# Example commit id: d74c4a9bf9ec558f27d4bd1779d5e33983b99db0
pip install --extra-index-url ai2thor==0+d74c4a9bf9ec558f27d4bd1779d5e33983b99db0

To verify that your setup is correct, try initializing a

and executing an action:

from ai2thor.controller import Controller
controller = Controller()
event = controller.step("MoveAhead")

The first time a

is initialized, the game environment containing the 3D scenes will be locally downloaded to
. The size of the download is approximately 500MB.

By default AI2-THOR currently opens up a Unity window each time a

is initialized. However, AI applications often do not need a window that renders the on-screen view and administrators of compute clusters might restrict the use of Xorg on the machines due to security concerns and the large number of dependencies that make the updates inconvenient.

Therefore, we have been worked with Unity to enable headless (off-screen) rendering of AI2-THOR. Headless mode can be enabled by setting the

upon initialization:

from ai2thor.controller import Controller
from ai2thor.platform import CloudRendering
controller = Controller(platform=CloudRendering)

To get started with AI2-THOR, you may find it useful to use AI2-THOR Colab. It enables you to run AI2-THOR on Google Cloud for free in a browser, without any setup on your local device!

By default, AI2-THOR does not work out of the box with Google Colab, as it requires the use of Xorg for AI2-THOR to work.

For users that prefer Docker, we provide AI2-THOR Docker as a mini-framework to simplify the setup.

OSmacOS 10.9+ or Ubuntu 14.04+
PythonPython 3.5+
CPUSSE2 instruction set support
Graphics CardDX9 (shader model 3.0) or DX11 with feature level 9.3 capabilities
Linux UsersX server with GLX module enabled