We have released the code of the StreetLearn environment at: https://github.com/deepmind/streetlearn. That code is written in C++ and Python and enables accessing the Street View-based data and interacting with the environment. The open-source code structure and the dataset are described in this paper.
A separate code release will be made for the TensorFlow-based agent and training using Reinforcement Learning, relying on a modified version of Importance Weighted Actor-Learner Architectures (paper, code).
Top: examples of three RGB image observations in Manhattan, obtained by projecting Google Street View panoramas to a specified yaw and pitch angle, with a given field of view. Bottom: corresponding locations of panoramas in their neighborhood. Each panorama is represented by a dot, and the current field of view is shown a green cone.
The environment code contains:
The StreetLearn environment follows the specifications from OpenAI Gym.
After instantiating a specific game and the environment, the environment can be initialised by calling function reset(). Note that if the flag auto_reset is set to True at construction, reset() will be called automatically every time that an episode ends. The agent plays within the environment by iteratively producing an action, sending it to (stepping through) the environment, and processing the observations and rewards returned by the environment. The call to function step(action) returns:
Actions available to an agent:
For training RL agents, action spaces are discretized using integers. For instance, in our paper, we used 5 actions: (move forward, turn left by 22.5 deg, turn left by 67.5 deg, turn right by 22.5 deg, turn right by 67.5 deg).
The following observations can currently be requested from the environment:
The following games are available in the StreetLearn environment:
In addition to the environment, we have added two scripts, human_agent and oracle_agent that show an agent that is, respectively, controlled by the user, or moving along the shortest path to the goal. The UI of these scripts displays, on top, the view_image, and on bottom, the graph_image. On the view_image, a navigation bar displays small circles in the directions of the panoramas (green, if travel is possible in that direction; red if not; orange if there are multiple choices of directions). The graph_image shows the node of the graph in white, nodes with coins in yellow, already traversed nodes in red, the shortest path to the goal in violet, and the agent's location and field of view in blue.