Git Product home page Git Product logo

dm_construction's Introduction

Construction Environments

This is the code necessary to run the Construction environments introduced by Bapst et al. (2019) and Hamrick et al. (2020).

Overview

These Construction tasks are provided through pre-packaged Docker containers.

This package consists of support code to run these Docker containers. You interact with the task environment via a dm_env Python interface.

Please see the documentation for more detailed information on the available tasks, actions and observations.

Requirements

The Construction tasks are intended to be run on Linux and are not officially supported on Mac and Windows. However, they can in principle be run on any platform (though installation may be more of a headache). In particular, on Windows, you will need to install and run the Construction tasks with WSL.

The Construction tasks require Docker, Python 3.6.1 or later and a x86-64 CPU with SSE4.2 support. We do not attempt to maintain a working version for Python 2.

Note: We recommend using Python virtual environment to mitigate conflicts with your system's Python environment.

Download and install Docker:

Quickstart

After installing Docker and Python (see above), install the Construction tasks by running the following command from the root of this repository:

pip install .

Then, from a Python interpreter:

>>> import dm_construction
>>> env = dm_construction.get_environment("covering", difficulty=0)
>>> time_step = env.reset()
>>> print(time_step.step_type)
StepType.FIRST

This may take a little while the first time you run it, as this command will automatically download the Docker container for the environment, start it, and connect to it through Python. For more details, see the documentation and the Environment Loading notebook demo.

Demos

If you wish to run the demos, you will also need to install ffmpeg. Here are some options for how to install ffmpeg:

  • Cross-platform with Anaconda: conda install ffmpeg
  • Ubuntu: apt-get install ffmpeg
  • Mac with Homebrew: brew install ffmpeg

Next, run the following command to install a few additional dependencies:

pip install ".[demos]"

Troubleshooting

See below for some common errors and how to fix them.

Protobuf

AttributeError: module 'google.protobuf.descriptor' has no attribute '_internal_create_key'

Sometimes the protobuf library can get into a bad state if you have tried to update it. To fix this, do pip uninstall protobuf then pip install protobuf to fix it.

Docker

requests.exceptions.ConnectionError: ('Connection aborted.', FileNotFoundError(2, 'No such file or directory'))

This likely means Docker is not installed, or not running. Make sure you have both installed it and started the Docker engine. You can test if the Docker engine is running by running docker info.

Shapely

There is currently a bug in the 1.7.0 version of the Shapely library that may cause problems on Mac and Windows.

  • Mac OSX (OSError: Could not find lib c or load any of its variants): see this StackOverflow question for a suggested fix.

  • Windows (FileNotFoundError: Could not find module 'geos.dll' (or one of its dependencies)): the Construction tasks are not officially supported on Windows. Please run the library using WSL instead.

References

Bapst, V., Sanchez-Gonzalez, A., Doersch, C., Stachenfeld, K., Kohli, P., Battaglia, P., & Hamrick, J. (2019, May). Structured agents for physical construction. In International Conference on Machine Learning (pp. 464-474).

Hamrick, J. B., Bapst, V., Sanchez-Gonzalez, A., Pfaff, T., Weber, T., Buesing, L., & Battaglia, P. W. (2020). Combining Q-Learning and Search with Amortized Value Estimates. ICLR 2020.

dm_construction's People

Contributors

alvarosg avatar frangipane avatar jhamrick avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

dm_construction's Issues

Asking DQN-MCTS baseline code

Hello authors, I am very interested in your work. I am working on a DRL related work. Now, I am planning to add a DQN with MCTS to my project as you did. Would you please share the code or some implementation details about this MCTS baseline in your paper? Thank you ahead!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.