{"id":20207222,"url":"https://github.com/pathak22/modular-assemblies","last_synced_at":"2025-04-10T12:33:20.356Z","repository":{"id":85023077,"uuid":"170781639","full_name":"pathak22/modular-assemblies","owner":"pathak22","description":"[NeurIPS 2019] Code for the paper \"Learning to Control Self-Assembling Morphologies: A Study of Generalization via Modularity\"","archived":false,"fork":false,"pushed_at":"2019-12-13T22:52:05.000Z","size":13927,"stargazers_count":116,"open_issues_count":3,"forks_count":16,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-03-24T11:13:32.897Z","etag":null,"topics":["artificial-creatures","artificial-intelligence","assembly","compositionality","deep-learning","modularity","morphology","reinforcement-learning"],"latest_commit_sha":null,"homepage":"https://pathak22.github.io/modular-assemblies/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pathak22.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-02-15T01:14:15.000Z","updated_at":"2025-02-05T12:30:47.000Z","dependencies_parsed_at":null,"dependency_job_id":"a0ab038b-14e9-41fd-a47f-7fc3e198afc2","html_url":"https://github.com/pathak22/modular-assemblies","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pathak22%2Fmodular-assemblies","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pathak22%2Fmodular-assemblies/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pathak22%2Fmodular-assemblies/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pathak22%2Fmodular-assemblies/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pathak22","download_url":"https://codeload.github.com/pathak22/modular-assemblies/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248217145,"owners_count":21066633,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["artificial-creatures","artificial-intelligence","assembly","compositionality","deep-learning","modularity","morphology","reinforcement-learning"],"created_at":"2024-11-14T05:28:03.038Z","updated_at":"2025-04-10T12:33:20.344Z","avatar_url":"https://github.com/pathak22.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Learning to Control Self-Assembling Morphologies ##\n### NeurIPS 2019 (Spotlight)\u003cbr/\u003eWinner of [Virtual Creatures Competition at GECCO 2019, Prague](https://virtualcreatures.github.io/)\n#### [[Project Website]](https://pathak22.github.io/modular-assemblies/) [[Demo Video]](https://youtu.be/ngCIB-IWD8E)\n\n[Deepak Pathak](https://people.eecs.berkeley.edu/~pathak/)\u0026ast;, [Chris Lu](https://chris-lu.weebly.com/)\u0026ast;, [Trevor Darrell](https://people.eecs.berkeley.edu/~trevor/), [Phillip Isola](https://www.eecs.mit.edu/people/faculty/phillip-isola/), [Alexei A. Efros](https://people.eecs.berkeley.edu/~efros/)\u003cbr/\u003e\nUniversity of California, Berkeley\u003cbr/\u003e\nMIT\u003cbr/\u003e\n(* equal contribution)\n\n\u003ca href=\"envs/teaser.jpg\"\u003e\n\u003cimg src=\"envs/teaser.jpg\" width=\"500\"\u003e\n\u003c/img\u003e\u003c/a\u003e\n\nThis is a pytorch based implementation for our [paper on learning to control self-assembling agents using deep reinforcement learning](https://pathak22.github.io/modular-assemblies/). We investigate a modular co-evolution strategy: a collection of primitive agents learns to dynamically self-assemble into composite bodies while also learning to coordinate their behavior to control these bodies. We learn compositional policies to demonstrate better zero-shot generalization. If you find this work useful in your research, please cite:\n\n    @inproceedings{pathak19assemblies,\n        Author = {Pathak, Deepak and Lu, Chris and Darrell, Trevor and\n                  Isola, Phillip and Efros, Alexei A.},\n        Title = {Learning to Control Self-Assembling Morphologies:\n                  A Study of Generalization via Modularity},\n        Booktitle = {arXiv preprint arXiv:1902.05546},\n        Year = {2019}\n    }\n\n### Installation and Usage\n\n1. Setting up repository\n  ```Shell\n  git clone https://github.com/pathak22/modular-assemblies.git\n  cd modular-assemblies/\n  git clone https://github.com/Unity-Technologies/ml-agents.git\n  cd ml-agents/\n  git reset --hard 6c5255e\n  cd ..\n  bash envs/setup_env.sh\n\n  python3 -m venv assemblyEnv\n  source $PWD/assemblyEnv/bin/activate\n  pip install --upgrade pip\n  ```\n\n2. Installation\n    - Requirements:\n      - CUDNN-5.1, CUDA-8.0, Python-3.5\n    - Detailed setup, skip to quick setup for exact replication:\n    ```Shell\n    # Install Pytorch from http://pytorch.org/\n    pip install http://download.pytorch.org/whl/cu80/torch-0.3.0.post4-cp35-cp35m-linux_x86_64.whl\n    pip install torchvision\n    pip install --upgrade visdom\n\n    # Install baselines for Atari preprocessing\n    pip install gym==0.9.4 # baselines install latest gym first automatically, but latest gym has moved to mujoco5 so first install old gym and then install baselines\n    git clone https://github.com/openai/baselines.git\n    cd baselines\n    git reset --hard b5be53d\n    pip install -e .\n\n    # Additional packages\n    pip install numpy\n    pip install matplotlib\n    pip install pillow\n    pip install opencv-python\n\n    # fold\n    cd modular-assemblies/src/\n    git clone https://github.com/nearai/pytorch-tools.git\n    cd pytorch-tools/\n    git reset --hard 09dccb2\n    python setup.py install\n    ```\n    - Quick setup for exact replication:\n    ```Shell\n    pip install -r requirements.txt\n    ```\n\n3. Run code\n  ```Shell\n  cd modular-assemblies/src/\n  python test_env.py\n  ```\n\n### Acknowledgement\nBuilds upon Ilya Kostrikov's Pytorch PPO [implementation](https://github.com/ikostrikov/pytorch-a2c-ppo-acktr).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpathak22%2Fmodular-assemblies","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpathak22%2Fmodular-assemblies","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpathak22%2Fmodular-assemblies/lists"}