├── src ├── python │ ├── phyre │ │ ├── data │ │ ├── viz_static_file │ │ ├── interface │ │ ├── server.py │ │ ├── creator │ │ │ └── __init__.py │ │ ├── settings.py │ │ ├── __init__.py │ │ └── tests │ │ │ ├── generated_tasks_test.py │ │ │ └── server_test.py │ └── setup.cfg ├── viz │ ├── public │ │ ├── gen-js │ │ ├── favicon.ico │ │ ├── phyre_config.js │ │ └── index.html │ ├── .gitignore │ ├── package.json │ └── src │ │ ├── index.css │ │ ├── App.test.js │ │ └── index.js ├── simulator │ ├── tests │ │ └── test_data │ │ │ ├── benchmark │ │ │ └── task00048:000.bin │ │ │ ├── user_input │ │ │ └── task00045:000.bin │ │ │ └── task_validation │ │ │ ├── task00001:000.bin │ │ │ ├── task00002:000.bin │ │ │ ├── task00003:000.bin │ │ │ ├── task00004:000.bin │ │ │ ├── task00005:000.bin │ │ │ └── task00006:000.bin │ ├── task_validation.h │ ├── utils │ │ ├── timer.h │ │ └── logger.cpp │ ├── creator.h │ ├── task_io.h │ └── thrift_box2d_conversion.h └── if │ └── shared.thrift ├── .style.yapf ├── imgs ├── ogre.png ├── phyre_logo.jpg ├── phyre_tasks.gif ├── cross_within.png ├── paper_results.png └── task_example.png ├── requirements.agents.txt ├── .yapfignore ├── .gitattributes ├── data ├── evaluations │ ├── 00000.lzma │ ├── 00001.lzma │ ├── 00002.lzma │ ├── 00003.lzma │ ├── 00004.lzma │ ├── 00005.lzma │ ├── 00006.lzma │ ├── 00007.lzma │ ├── 00008.lzma │ ├── 00009.lzma │ ├── 00010.lzma │ ├── 00011.lzma │ ├── 00012.lzma │ ├── 00013.lzma │ ├── 00014.lzma │ ├── 00015.lzma │ ├── 00016.lzma │ ├── 00017.lzma │ ├── 00018.lzma │ ├── 00019.lzma │ ├── 00020.lzma │ ├── 00021.lzma │ ├── 00022.lzma │ ├── 00023.lzma │ ├── 00024.lzma │ ├── 00100.lzma │ ├── 00101.lzma │ ├── 00102.lzma │ ├── 00103.lzma │ ├── 00104.lzma │ ├── 00105.lzma │ ├── 00106.lzma │ ├── 00107.lzma │ ├── 00108.lzma │ ├── 00109.lzma │ ├── 00110.lzma │ ├── 00111.lzma │ ├── 00112.lzma │ ├── 00113.lzma │ ├── 00114.lzma │ ├── 00115.lzma │ ├── 00116.lzma │ ├── 00117.lzma │ ├── 00118.lzma │ ├── 00119.lzma │ ├── 00120.lzma │ ├── 00121.lzma │ ├── 00122.lzma │ ├── 00123.lzma │ ├── 00124.lzma │ ├── 00200.lzma │ ├── 00211.lzma │ ├── 00212.lzma │ ├── 00214.lzma │ ├── 00215.lzma │ ├── 00221.lzma │ ├── 00249.lzma │ ├── 00250.lzma │ ├── 00251.lzma │ ├── 00254.lzma │ ├── 00259.lzma │ ├── 00262.lzma │ ├── 00273.lzma │ ├── 00274.lzma │ ├── 00311.lzma │ ├── 00312.lzma │ ├── 00316.lzma │ ├── 00321.lzma │ ├── 00327.lzma │ ├── 00328.lzma │ ├── 00360.lzma │ ├── 00361.lzma │ ├── 00371.lzma │ ├── 00372.lzma │ ├── 00398.lzma │ ├── 00600.lzma │ ├── 00604.lzma │ ├── 01000.lzma │ ├── 01001.lzma │ ├── 01002.lzma │ ├── 01003.lzma │ ├── 01004.lzma │ ├── 01005.lzma │ ├── 01006.lzma │ ├── 01007.lzma │ ├── 01008.lzma │ ├── 01009.lzma │ ├── 01010.lzma │ ├── 01011.lzma │ ├── 00000.meta.json │ ├── 00001.meta.json │ ├── 00002.meta.json │ ├── 00003.meta.json │ ├── 00004.meta.json │ ├── 00005.meta.json │ ├── 00006.meta.json │ ├── 00007.meta.json │ ├── 00008.meta.json │ ├── 00009.meta.json │ ├── 00010.meta.json │ ├── 00011.meta.json │ ├── 00012.meta.json │ ├── 00013.meta.json │ ├── 00014.meta.json │ ├── 00015.meta.json │ ├── 00016.meta.json │ ├── 00017.meta.json │ ├── 00018.meta.json │ ├── 00019.meta.json │ ├── 00020.meta.json │ ├── 00021.meta.json │ ├── 00022.meta.json │ ├── 00023.meta.json │ ├── 00024.meta.json │ ├── 00100.meta.json │ ├── 00101.meta.json │ ├── 00102.meta.json │ ├── 00103.meta.json │ ├── 00104.meta.json │ ├── 00105.meta.json │ ├── 00106.meta.json │ ├── 00107.meta.json │ ├── 00108.meta.json │ ├── 00109.meta.json │ ├── 00110.meta.json │ ├── 00111.meta.json │ ├── 00112.meta.json │ ├── 00113.meta.json │ ├── 00114.meta.json │ ├── 00115.meta.json │ ├── 00116.meta.json │ ├── 00117.meta.json │ ├── 00118.meta.json │ ├── 00119.meta.json │ ├── 00120.meta.json │ ├── 00121.meta.json │ ├── 00122.meta.json │ ├── 00123.meta.json │ ├── 00124.meta.json │ ├── 00200.meta.json │ ├── 00211.meta.json │ ├── 00212.meta.json │ ├── 00214.meta.json │ ├── 00215.meta.json │ ├── 00221.meta.json │ ├── 00249.meta.json │ ├── 00250.meta.json │ ├── 00251.meta.json │ ├── 00254.meta.json │ ├── 00259.meta.json │ ├── 00262.meta.json │ ├── 00273.meta.json │ ├── 00274.meta.json │ ├── 00311.meta.json │ ├── 00312.meta.json │ ├── 00316.meta.json │ ├── 00321.meta.json │ ├── 00327.meta.json │ ├── 00328.meta.json │ ├── 00360.meta.json │ ├── 00361.meta.json │ ├── 00371.meta.json │ ├── 00372.meta.json │ ├── 00398.meta.json │ ├── 00600.meta.json │ ├── 00604.meta.json │ ├── 01000.meta.json │ ├── 01001.meta.json │ ├── 01002.meta.json │ ├── 01003.meta.json │ ├── 01004.meta.json │ ├── 01005.meta.json │ ├── 01006.meta.json │ ├── 01007.meta.json │ ├── 01008.meta.json │ ├── 01009.meta.json │ ├── 01010.meta.json │ └── 01011.meta.json ├── solution_power │ ├── 00000.lzma │ ├── 00001.lzma │ ├── 00002.lzma │ ├── 00003.lzma │ ├── 00004.lzma │ ├── 00005.lzma │ ├── 00006.lzma │ ├── 00007.lzma │ ├── 00008.lzma │ ├── 00009.lzma │ ├── 00010.lzma │ ├── 00011.lzma │ ├── 00012.lzma │ ├── 00013.lzma │ ├── 00014.lzma │ ├── 00015.lzma │ ├── 00016.lzma │ ├── 00017.lzma │ ├── 00018.lzma │ ├── 00019.lzma │ ├── 00020.lzma │ ├── 00021.lzma │ ├── 00022.lzma │ ├── 00023.lzma │ ├── 00024.lzma │ ├── 00100.lzma │ ├── 00101.lzma │ ├── 00102.lzma │ ├── 00103.lzma │ ├── 00104.lzma │ ├── 00105.lzma │ ├── 00106.lzma │ ├── 00107.lzma │ ├── 00108.lzma │ ├── 00109.lzma │ ├── 00110.lzma │ ├── 00111.lzma │ ├── 00112.lzma │ ├── 00113.lzma │ ├── 00114.lzma │ ├── 00115.lzma │ ├── 00116.lzma │ ├── 00117.lzma │ ├── 00118.lzma │ ├── 00119.lzma │ ├── 00120.lzma │ ├── 00121.lzma │ ├── 00122.lzma │ ├── 00123.lzma │ ├── 00124.lzma │ ├── 00200.lzma │ ├── 00211.lzma │ ├── 00212.lzma │ ├── 00214.lzma │ ├── 00215.lzma │ ├── 00221.lzma │ ├── 00249.lzma │ ├── 00250.lzma │ ├── 00251.lzma │ ├── 00254.lzma │ ├── 00259.lzma │ ├── 00262.lzma │ ├── 00273.lzma │ ├── 00274.lzma │ ├── 00311.lzma │ ├── 00312.lzma │ ├── 00316.lzma │ ├── 00321.lzma │ ├── 00327.lzma │ ├── 00328.lzma │ ├── 00360.lzma │ ├── 00361.lzma │ ├── 00371.lzma │ ├── 00372.lzma │ ├── 00398.lzma │ ├── 00600.lzma │ ├── 00604.lzma │ ├── 01000.lzma │ ├── 01001.lzma │ ├── 01002.lzma │ ├── 01003.lzma │ ├── 01004.lzma │ ├── 01005.lzma │ ├── 01006.lzma │ ├── 01007.lzma │ ├── 01008.lzma │ ├── 01009.lzma │ ├── 01010.lzma │ └── 01011.lzma ├── generated_tasks │ ├── tasks.bin.lzma │ └── tasks01.bin.lzma └── task_scripts │ ├── tests │ ├── task_validation │ │ ├── task00003.py │ │ ├── task00004.py │ │ ├── task00001.py │ │ ├── task00002.py │ │ ├── task00006.py │ │ └── task00005.py │ ├── user_input │ │ └── task00045.py │ └── benchmark │ │ └── task00048.py │ └── main │ ├── task00241.py │ ├── task00245.py │ ├── task00202.py │ ├── task00204.py │ ├── task00218.py │ ├── task00207.py │ ├── task00201.py │ ├── task00248.py │ ├── task00203.py │ ├── task00205.py │ ├── task00247.py │ ├── task00242.py │ ├── task00312.py │ ├── task00206.py │ ├── task00001.py │ ├── task00311.py │ ├── task00015.py │ ├── task00115.py │ ├── task00208.py │ ├── task00104.py │ ├── task00002.py │ ├── task00017.py │ ├── task00005.py │ ├── task00259.py │ ├── task00000.py │ ├── task00003.py │ ├── task00316.py │ ├── task00249.py │ ├── task00250.py │ ├── task00011.py │ ├── task00262.py │ ├── task00009.py │ ├── task00215.py │ ├── task00200.py │ ├── task00328.py │ └── task00900.py ├── CODE_OF_CONDUCT.md ├── env.yml ├── .gitmodules ├── .gitignore ├── agents ├── download_dqn_ckps.sh ├── train_all_baseline.sh └── OGRE.md ├── scripts ├── clang_format_all.sh ├── generate_task_hash.py ├── offline_simulation │ ├── save_action_space.py │ └── compress_partial_simuations.py └── build_phyre_wheels.sh ├── CONTRIBUTING.md └── Dockerfile /src/python/phyre/data: -------------------------------------------------------------------------------- 1 | ../../../data -------------------------------------------------------------------------------- /src/python/phyre/viz_static_file: -------------------------------------------------------------------------------- 1 | ../../viz/build/ -------------------------------------------------------------------------------- /.style.yapf: -------------------------------------------------------------------------------- 1 | [style] 2 | based_on_style = google 3 | -------------------------------------------------------------------------------- /src/viz/public/gen-js: -------------------------------------------------------------------------------- 1 | ../../../cmake_build/gen-js/ -------------------------------------------------------------------------------- /src/python/phyre/interface: -------------------------------------------------------------------------------- 1 | ../../../cmake_build/gen-py/ -------------------------------------------------------------------------------- /src/python/setup.cfg: -------------------------------------------------------------------------------- 1 | # setup.cfg 2 | [bdist_wheel] 3 | python-tag=cp36 4 | -------------------------------------------------------------------------------- /imgs/ogre.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/phyre/HEAD/imgs/ogre.png -------------------------------------------------------------------------------- /requirements.agents.txt: -------------------------------------------------------------------------------- 1 | torch 2 | Pillow==6.2.2 3 | torchvision 4 | tqdm==4.38.0 5 | -------------------------------------------------------------------------------- /.yapfignore: -------------------------------------------------------------------------------- 1 | src/python/phyre/interface/* 2 | src/python/build/* 3 | src/viz/mpde_modules/* 4 | -------------------------------------------------------------------------------- /imgs/phyre_logo.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/phyre/HEAD/imgs/phyre_logo.jpg -------------------------------------------------------------------------------- /imgs/phyre_tasks.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/phyre/HEAD/imgs/phyre_tasks.gif -------------------------------------------------------------------------------- /imgs/cross_within.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/phyre/HEAD/imgs/cross_within.png -------------------------------------------------------------------------------- /imgs/paper_results.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/phyre/HEAD/imgs/paper_results.png -------------------------------------------------------------------------------- /imgs/task_example.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/phyre/HEAD/imgs/task_example.png -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | data/evaluations/* binary 2 | data/solutions/* binary 3 | data/solution_power/* binary 4 | -------------------------------------------------------------------------------- /data/evaluations/00000.lzma: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/phyre/HEAD/data/evaluations/00000.lzma -------------------------------------------------------------------------------- /data/evaluations/00001.lzma: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/phyre/HEAD/data/evaluations/00001.lzma -------------------------------------------------------------------------------- /data/evaluations/00002.lzma: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/phyre/HEAD/data/evaluations/00002.lzma -------------------------------------------------------------------------------- /data/evaluations/00003.lzma: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/phyre/HEAD/data/evaluations/00003.lzma -------------------------------------------------------------------------------- /data/evaluations/00004.lzma: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/phyre/HEAD/data/evaluations/00004.lzma -------------------------------------------------------------------------------- /data/evaluations/00005.lzma: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/phyre/HEAD/data/evaluations/00005.lzma -------------------------------------------------------------------------------- /data/evaluations/00006.lzma: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/phyre/HEAD/data/evaluations/00006.lzma -------------------------------------------------------------------------------- /data/evaluations/00007.lzma: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/phyre/HEAD/data/evaluations/00007.lzma -------------------------------------------------------------------------------- /data/evaluations/00008.lzma: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/phyre/HEAD/data/evaluations/00008.lzma -------------------------------------------------------------------------------- /data/evaluations/00009.lzma: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/phyre/HEAD/data/evaluations/00009.lzma -------------------------------------------------------------------------------- /data/evaluations/00010.lzma: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/phyre/HEAD/data/evaluations/00010.lzma -------------------------------------------------------------------------------- /data/evaluations/00011.lzma: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/phyre/HEAD/data/evaluations/00011.lzma -------------------------------------------------------------------------------- /data/evaluations/00012.lzma: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/phyre/HEAD/data/evaluations/00012.lzma -------------------------------------------------------------------------------- /data/evaluations/00013.lzma: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/phyre/HEAD/data/evaluations/00013.lzma -------------------------------------------------------------------------------- /data/evaluations/00014.lzma: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/phyre/HEAD/data/evaluations/00014.lzma -------------------------------------------------------------------------------- /data/evaluations/00015.lzma: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/phyre/HEAD/data/evaluations/00015.lzma -------------------------------------------------------------------------------- /data/evaluations/00016.lzma: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/phyre/HEAD/data/evaluations/00016.lzma -------------------------------------------------------------------------------- /data/evaluations/00017.lzma: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/phyre/HEAD/data/evaluations/00017.lzma -------------------------------------------------------------------------------- /data/evaluations/00018.lzma: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/phyre/HEAD/data/evaluations/00018.lzma -------------------------------------------------------------------------------- /data/evaluations/00019.lzma: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/phyre/HEAD/data/evaluations/00019.lzma -------------------------------------------------------------------------------- /data/evaluations/00020.lzma: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/phyre/HEAD/data/evaluations/00020.lzma -------------------------------------------------------------------------------- /data/evaluations/00021.lzma: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/phyre/HEAD/data/evaluations/00021.lzma -------------------------------------------------------------------------------- /data/evaluations/00022.lzma: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/phyre/HEAD/data/evaluations/00022.lzma -------------------------------------------------------------------------------- /data/evaluations/00023.lzma: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/phyre/HEAD/data/evaluations/00023.lzma -------------------------------------------------------------------------------- /data/evaluations/00024.lzma: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/phyre/HEAD/data/evaluations/00024.lzma -------------------------------------------------------------------------------- /data/evaluations/00100.lzma: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/phyre/HEAD/data/evaluations/00100.lzma -------------------------------------------------------------------------------- /data/evaluations/00101.lzma: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/phyre/HEAD/data/evaluations/00101.lzma -------------------------------------------------------------------------------- /data/evaluations/00102.lzma: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/phyre/HEAD/data/evaluations/00102.lzma -------------------------------------------------------------------------------- /data/evaluations/00103.lzma: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/phyre/HEAD/data/evaluations/00103.lzma -------------------------------------------------------------------------------- /data/evaluations/00104.lzma: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/phyre/HEAD/data/evaluations/00104.lzma -------------------------------------------------------------------------------- /data/evaluations/00105.lzma: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/phyre/HEAD/data/evaluations/00105.lzma -------------------------------------------------------------------------------- /data/evaluations/00106.lzma: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/phyre/HEAD/data/evaluations/00106.lzma -------------------------------------------------------------------------------- /data/evaluations/00107.lzma: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/phyre/HEAD/data/evaluations/00107.lzma -------------------------------------------------------------------------------- /data/evaluations/00108.lzma: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/phyre/HEAD/data/evaluations/00108.lzma -------------------------------------------------------------------------------- /data/evaluations/00109.lzma: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/phyre/HEAD/data/evaluations/00109.lzma -------------------------------------------------------------------------------- /data/evaluations/00110.lzma: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/phyre/HEAD/data/evaluations/00110.lzma -------------------------------------------------------------------------------- /data/evaluations/00111.lzma: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/phyre/HEAD/data/evaluations/00111.lzma -------------------------------------------------------------------------------- /data/evaluations/00112.lzma: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/phyre/HEAD/data/evaluations/00112.lzma -------------------------------------------------------------------------------- /data/evaluations/00113.lzma: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/phyre/HEAD/data/evaluations/00113.lzma -------------------------------------------------------------------------------- /data/evaluations/00114.lzma: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/phyre/HEAD/data/evaluations/00114.lzma -------------------------------------------------------------------------------- /data/evaluations/00115.lzma: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/phyre/HEAD/data/evaluations/00115.lzma -------------------------------------------------------------------------------- /data/evaluations/00116.lzma: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/phyre/HEAD/data/evaluations/00116.lzma -------------------------------------------------------------------------------- /data/evaluations/00117.lzma: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/phyre/HEAD/data/evaluations/00117.lzma -------------------------------------------------------------------------------- /data/evaluations/00118.lzma: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/phyre/HEAD/data/evaluations/00118.lzma -------------------------------------------------------------------------------- /data/evaluations/00119.lzma: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/phyre/HEAD/data/evaluations/00119.lzma -------------------------------------------------------------------------------- /data/evaluations/00120.lzma: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/phyre/HEAD/data/evaluations/00120.lzma -------------------------------------------------------------------------------- /data/evaluations/00121.lzma: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/phyre/HEAD/data/evaluations/00121.lzma -------------------------------------------------------------------------------- /data/evaluations/00122.lzma: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/phyre/HEAD/data/evaluations/00122.lzma -------------------------------------------------------------------------------- /data/evaluations/00123.lzma: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/phyre/HEAD/data/evaluations/00123.lzma -------------------------------------------------------------------------------- /data/evaluations/00124.lzma: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/phyre/HEAD/data/evaluations/00124.lzma -------------------------------------------------------------------------------- /data/evaluations/00200.lzma: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/phyre/HEAD/data/evaluations/00200.lzma -------------------------------------------------------------------------------- /data/evaluations/00211.lzma: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/phyre/HEAD/data/evaluations/00211.lzma -------------------------------------------------------------------------------- /data/evaluations/00212.lzma: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/phyre/HEAD/data/evaluations/00212.lzma -------------------------------------------------------------------------------- /data/evaluations/00214.lzma: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/phyre/HEAD/data/evaluations/00214.lzma -------------------------------------------------------------------------------- /data/evaluations/00215.lzma: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/phyre/HEAD/data/evaluations/00215.lzma -------------------------------------------------------------------------------- /data/evaluations/00221.lzma: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/phyre/HEAD/data/evaluations/00221.lzma -------------------------------------------------------------------------------- /data/evaluations/00249.lzma: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/phyre/HEAD/data/evaluations/00249.lzma -------------------------------------------------------------------------------- /data/evaluations/00250.lzma: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/phyre/HEAD/data/evaluations/00250.lzma -------------------------------------------------------------------------------- /data/evaluations/00251.lzma: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/phyre/HEAD/data/evaluations/00251.lzma -------------------------------------------------------------------------------- /data/evaluations/00254.lzma: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/phyre/HEAD/data/evaluations/00254.lzma -------------------------------------------------------------------------------- /data/evaluations/00259.lzma: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/phyre/HEAD/data/evaluations/00259.lzma -------------------------------------------------------------------------------- /data/evaluations/00262.lzma: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/phyre/HEAD/data/evaluations/00262.lzma -------------------------------------------------------------------------------- /data/evaluations/00273.lzma: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/phyre/HEAD/data/evaluations/00273.lzma -------------------------------------------------------------------------------- /data/evaluations/00274.lzma: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/phyre/HEAD/data/evaluations/00274.lzma -------------------------------------------------------------------------------- /data/evaluations/00311.lzma: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/phyre/HEAD/data/evaluations/00311.lzma -------------------------------------------------------------------------------- /data/evaluations/00312.lzma: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/phyre/HEAD/data/evaluations/00312.lzma -------------------------------------------------------------------------------- /data/evaluations/00316.lzma: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/phyre/HEAD/data/evaluations/00316.lzma -------------------------------------------------------------------------------- /data/evaluations/00321.lzma: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/phyre/HEAD/data/evaluations/00321.lzma -------------------------------------------------------------------------------- /data/evaluations/00327.lzma: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/phyre/HEAD/data/evaluations/00327.lzma -------------------------------------------------------------------------------- /data/evaluations/00328.lzma: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/phyre/HEAD/data/evaluations/00328.lzma -------------------------------------------------------------------------------- /data/evaluations/00360.lzma: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/phyre/HEAD/data/evaluations/00360.lzma -------------------------------------------------------------------------------- /data/evaluations/00361.lzma: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/phyre/HEAD/data/evaluations/00361.lzma -------------------------------------------------------------------------------- /data/evaluations/00371.lzma: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/phyre/HEAD/data/evaluations/00371.lzma -------------------------------------------------------------------------------- /data/evaluations/00372.lzma: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/phyre/HEAD/data/evaluations/00372.lzma -------------------------------------------------------------------------------- /data/evaluations/00398.lzma: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/phyre/HEAD/data/evaluations/00398.lzma -------------------------------------------------------------------------------- /data/evaluations/00600.lzma: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/phyre/HEAD/data/evaluations/00600.lzma -------------------------------------------------------------------------------- /data/evaluations/00604.lzma: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/phyre/HEAD/data/evaluations/00604.lzma -------------------------------------------------------------------------------- /data/evaluations/01000.lzma: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/phyre/HEAD/data/evaluations/01000.lzma -------------------------------------------------------------------------------- /data/evaluations/01001.lzma: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/phyre/HEAD/data/evaluations/01001.lzma -------------------------------------------------------------------------------- /data/evaluations/01002.lzma: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/phyre/HEAD/data/evaluations/01002.lzma -------------------------------------------------------------------------------- /data/evaluations/01003.lzma: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/phyre/HEAD/data/evaluations/01003.lzma -------------------------------------------------------------------------------- /data/evaluations/01004.lzma: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/phyre/HEAD/data/evaluations/01004.lzma -------------------------------------------------------------------------------- /data/evaluations/01005.lzma: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/phyre/HEAD/data/evaluations/01005.lzma -------------------------------------------------------------------------------- /data/evaluations/01006.lzma: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/phyre/HEAD/data/evaluations/01006.lzma -------------------------------------------------------------------------------- /data/evaluations/01007.lzma: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/phyre/HEAD/data/evaluations/01007.lzma -------------------------------------------------------------------------------- /data/evaluations/01008.lzma: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/phyre/HEAD/data/evaluations/01008.lzma -------------------------------------------------------------------------------- /data/evaluations/01009.lzma: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/phyre/HEAD/data/evaluations/01009.lzma -------------------------------------------------------------------------------- /data/evaluations/01010.lzma: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/phyre/HEAD/data/evaluations/01010.lzma -------------------------------------------------------------------------------- /data/evaluations/01011.lzma: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/phyre/HEAD/data/evaluations/01011.lzma -------------------------------------------------------------------------------- /src/viz/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/phyre/HEAD/src/viz/public/favicon.ico -------------------------------------------------------------------------------- /data/solution_power/00000.lzma: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/phyre/HEAD/data/solution_power/00000.lzma -------------------------------------------------------------------------------- /data/solution_power/00001.lzma: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/phyre/HEAD/data/solution_power/00001.lzma -------------------------------------------------------------------------------- /data/solution_power/00002.lzma: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/phyre/HEAD/data/solution_power/00002.lzma -------------------------------------------------------------------------------- /data/solution_power/00003.lzma: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/phyre/HEAD/data/solution_power/00003.lzma -------------------------------------------------------------------------------- /data/solution_power/00004.lzma: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/phyre/HEAD/data/solution_power/00004.lzma -------------------------------------------------------------------------------- /data/solution_power/00005.lzma: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/phyre/HEAD/data/solution_power/00005.lzma -------------------------------------------------------------------------------- /data/solution_power/00006.lzma: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/phyre/HEAD/data/solution_power/00006.lzma -------------------------------------------------------------------------------- /data/solution_power/00007.lzma: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/phyre/HEAD/data/solution_power/00007.lzma -------------------------------------------------------------------------------- /data/solution_power/00008.lzma: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/phyre/HEAD/data/solution_power/00008.lzma -------------------------------------------------------------------------------- /data/solution_power/00009.lzma: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/phyre/HEAD/data/solution_power/00009.lzma -------------------------------------------------------------------------------- /data/solution_power/00010.lzma: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/phyre/HEAD/data/solution_power/00010.lzma -------------------------------------------------------------------------------- /data/solution_power/00011.lzma: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/phyre/HEAD/data/solution_power/00011.lzma -------------------------------------------------------------------------------- /data/solution_power/00012.lzma: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/phyre/HEAD/data/solution_power/00012.lzma -------------------------------------------------------------------------------- /data/solution_power/00013.lzma: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/phyre/HEAD/data/solution_power/00013.lzma -------------------------------------------------------------------------------- /data/solution_power/00014.lzma: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/phyre/HEAD/data/solution_power/00014.lzma -------------------------------------------------------------------------------- /data/solution_power/00015.lzma: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/phyre/HEAD/data/solution_power/00015.lzma -------------------------------------------------------------------------------- /data/solution_power/00016.lzma: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/phyre/HEAD/data/solution_power/00016.lzma -------------------------------------------------------------------------------- /data/solution_power/00017.lzma: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/phyre/HEAD/data/solution_power/00017.lzma -------------------------------------------------------------------------------- /data/solution_power/00018.lzma: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/phyre/HEAD/data/solution_power/00018.lzma -------------------------------------------------------------------------------- /data/solution_power/00019.lzma: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/phyre/HEAD/data/solution_power/00019.lzma -------------------------------------------------------------------------------- /data/solution_power/00020.lzma: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/phyre/HEAD/data/solution_power/00020.lzma -------------------------------------------------------------------------------- /data/solution_power/00021.lzma: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/phyre/HEAD/data/solution_power/00021.lzma -------------------------------------------------------------------------------- /data/solution_power/00022.lzma: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/phyre/HEAD/data/solution_power/00022.lzma -------------------------------------------------------------------------------- /data/solution_power/00023.lzma: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/phyre/HEAD/data/solution_power/00023.lzma -------------------------------------------------------------------------------- /data/solution_power/00024.lzma: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/phyre/HEAD/data/solution_power/00024.lzma -------------------------------------------------------------------------------- /data/solution_power/00100.lzma: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/phyre/HEAD/data/solution_power/00100.lzma -------------------------------------------------------------------------------- /data/solution_power/00101.lzma: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/phyre/HEAD/data/solution_power/00101.lzma -------------------------------------------------------------------------------- /data/solution_power/00102.lzma: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/phyre/HEAD/data/solution_power/00102.lzma -------------------------------------------------------------------------------- /data/solution_power/00103.lzma: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/phyre/HEAD/data/solution_power/00103.lzma -------------------------------------------------------------------------------- /data/solution_power/00104.lzma: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/phyre/HEAD/data/solution_power/00104.lzma -------------------------------------------------------------------------------- /data/solution_power/00105.lzma: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/phyre/HEAD/data/solution_power/00105.lzma -------------------------------------------------------------------------------- /data/solution_power/00106.lzma: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/phyre/HEAD/data/solution_power/00106.lzma -------------------------------------------------------------------------------- /data/solution_power/00107.lzma: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/phyre/HEAD/data/solution_power/00107.lzma -------------------------------------------------------------------------------- /data/solution_power/00108.lzma: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/phyre/HEAD/data/solution_power/00108.lzma -------------------------------------------------------------------------------- /data/solution_power/00109.lzma: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/phyre/HEAD/data/solution_power/00109.lzma -------------------------------------------------------------------------------- /data/solution_power/00110.lzma: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/phyre/HEAD/data/solution_power/00110.lzma -------------------------------------------------------------------------------- /data/solution_power/00111.lzma: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/phyre/HEAD/data/solution_power/00111.lzma -------------------------------------------------------------------------------- /data/solution_power/00112.lzma: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/phyre/HEAD/data/solution_power/00112.lzma -------------------------------------------------------------------------------- /data/solution_power/00113.lzma: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/phyre/HEAD/data/solution_power/00113.lzma -------------------------------------------------------------------------------- /data/solution_power/00114.lzma: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/phyre/HEAD/data/solution_power/00114.lzma -------------------------------------------------------------------------------- /data/solution_power/00115.lzma: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/phyre/HEAD/data/solution_power/00115.lzma -------------------------------------------------------------------------------- /data/solution_power/00116.lzma: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/phyre/HEAD/data/solution_power/00116.lzma -------------------------------------------------------------------------------- /data/solution_power/00117.lzma: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/phyre/HEAD/data/solution_power/00117.lzma -------------------------------------------------------------------------------- /data/solution_power/00118.lzma: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/phyre/HEAD/data/solution_power/00118.lzma -------------------------------------------------------------------------------- /data/solution_power/00119.lzma: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/phyre/HEAD/data/solution_power/00119.lzma -------------------------------------------------------------------------------- /data/solution_power/00120.lzma: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/phyre/HEAD/data/solution_power/00120.lzma -------------------------------------------------------------------------------- /data/solution_power/00121.lzma: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/phyre/HEAD/data/solution_power/00121.lzma -------------------------------------------------------------------------------- /data/solution_power/00122.lzma: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/phyre/HEAD/data/solution_power/00122.lzma -------------------------------------------------------------------------------- /data/solution_power/00123.lzma: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/phyre/HEAD/data/solution_power/00123.lzma -------------------------------------------------------------------------------- /data/solution_power/00124.lzma: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/phyre/HEAD/data/solution_power/00124.lzma -------------------------------------------------------------------------------- /data/solution_power/00200.lzma: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/phyre/HEAD/data/solution_power/00200.lzma -------------------------------------------------------------------------------- /data/solution_power/00211.lzma: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/phyre/HEAD/data/solution_power/00211.lzma -------------------------------------------------------------------------------- /data/solution_power/00212.lzma: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/phyre/HEAD/data/solution_power/00212.lzma -------------------------------------------------------------------------------- /data/solution_power/00214.lzma: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/phyre/HEAD/data/solution_power/00214.lzma -------------------------------------------------------------------------------- /data/solution_power/00215.lzma: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/phyre/HEAD/data/solution_power/00215.lzma -------------------------------------------------------------------------------- /data/solution_power/00221.lzma: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/phyre/HEAD/data/solution_power/00221.lzma -------------------------------------------------------------------------------- /data/solution_power/00249.lzma: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/phyre/HEAD/data/solution_power/00249.lzma -------------------------------------------------------------------------------- /data/solution_power/00250.lzma: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/phyre/HEAD/data/solution_power/00250.lzma -------------------------------------------------------------------------------- /data/solution_power/00251.lzma: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/phyre/HEAD/data/solution_power/00251.lzma -------------------------------------------------------------------------------- /data/solution_power/00254.lzma: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/phyre/HEAD/data/solution_power/00254.lzma -------------------------------------------------------------------------------- /data/solution_power/00259.lzma: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/phyre/HEAD/data/solution_power/00259.lzma -------------------------------------------------------------------------------- /data/solution_power/00262.lzma: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/phyre/HEAD/data/solution_power/00262.lzma -------------------------------------------------------------------------------- /data/solution_power/00273.lzma: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/phyre/HEAD/data/solution_power/00273.lzma -------------------------------------------------------------------------------- /data/solution_power/00274.lzma: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/phyre/HEAD/data/solution_power/00274.lzma -------------------------------------------------------------------------------- /data/solution_power/00311.lzma: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/phyre/HEAD/data/solution_power/00311.lzma -------------------------------------------------------------------------------- /data/solution_power/00312.lzma: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/phyre/HEAD/data/solution_power/00312.lzma -------------------------------------------------------------------------------- /data/solution_power/00316.lzma: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/phyre/HEAD/data/solution_power/00316.lzma -------------------------------------------------------------------------------- /data/solution_power/00321.lzma: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/phyre/HEAD/data/solution_power/00321.lzma -------------------------------------------------------------------------------- /data/solution_power/00327.lzma: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/phyre/HEAD/data/solution_power/00327.lzma -------------------------------------------------------------------------------- /data/solution_power/00328.lzma: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/phyre/HEAD/data/solution_power/00328.lzma -------------------------------------------------------------------------------- /data/solution_power/00360.lzma: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/phyre/HEAD/data/solution_power/00360.lzma -------------------------------------------------------------------------------- /data/solution_power/00361.lzma: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/phyre/HEAD/data/solution_power/00361.lzma -------------------------------------------------------------------------------- /data/solution_power/00371.lzma: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/phyre/HEAD/data/solution_power/00371.lzma -------------------------------------------------------------------------------- /data/solution_power/00372.lzma: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/phyre/HEAD/data/solution_power/00372.lzma -------------------------------------------------------------------------------- /data/solution_power/00398.lzma: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/phyre/HEAD/data/solution_power/00398.lzma -------------------------------------------------------------------------------- /data/solution_power/00600.lzma: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/phyre/HEAD/data/solution_power/00600.lzma -------------------------------------------------------------------------------- /data/solution_power/00604.lzma: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/phyre/HEAD/data/solution_power/00604.lzma -------------------------------------------------------------------------------- /data/solution_power/01000.lzma: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/phyre/HEAD/data/solution_power/01000.lzma -------------------------------------------------------------------------------- /data/solution_power/01001.lzma: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/phyre/HEAD/data/solution_power/01001.lzma -------------------------------------------------------------------------------- /data/solution_power/01002.lzma: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/phyre/HEAD/data/solution_power/01002.lzma -------------------------------------------------------------------------------- /data/solution_power/01003.lzma: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/phyre/HEAD/data/solution_power/01003.lzma -------------------------------------------------------------------------------- /data/solution_power/01004.lzma: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/phyre/HEAD/data/solution_power/01004.lzma -------------------------------------------------------------------------------- /data/solution_power/01005.lzma: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/phyre/HEAD/data/solution_power/01005.lzma -------------------------------------------------------------------------------- /data/solution_power/01006.lzma: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/phyre/HEAD/data/solution_power/01006.lzma -------------------------------------------------------------------------------- /data/solution_power/01007.lzma: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/phyre/HEAD/data/solution_power/01007.lzma -------------------------------------------------------------------------------- /data/solution_power/01008.lzma: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/phyre/HEAD/data/solution_power/01008.lzma -------------------------------------------------------------------------------- /data/solution_power/01009.lzma: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/phyre/HEAD/data/solution_power/01009.lzma -------------------------------------------------------------------------------- /data/solution_power/01010.lzma: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/phyre/HEAD/data/solution_power/01010.lzma -------------------------------------------------------------------------------- /data/solution_power/01011.lzma: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/phyre/HEAD/data/solution_power/01011.lzma -------------------------------------------------------------------------------- /data/generated_tasks/tasks.bin.lzma: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/phyre/HEAD/data/generated_tasks/tasks.bin.lzma -------------------------------------------------------------------------------- /data/generated_tasks/tasks01.bin.lzma: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/phyre/HEAD/data/generated_tasks/tasks01.bin.lzma -------------------------------------------------------------------------------- /src/simulator/tests/test_data/benchmark/task00048:000.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/phyre/HEAD/src/simulator/tests/test_data/benchmark/task00048:000.bin -------------------------------------------------------------------------------- /src/simulator/tests/test_data/user_input/task00045:000.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/phyre/HEAD/src/simulator/tests/test_data/user_input/task00045:000.bin -------------------------------------------------------------------------------- /src/simulator/tests/test_data/task_validation/task00001:000.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/phyre/HEAD/src/simulator/tests/test_data/task_validation/task00001:000.bin -------------------------------------------------------------------------------- /src/simulator/tests/test_data/task_validation/task00002:000.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/phyre/HEAD/src/simulator/tests/test_data/task_validation/task00002:000.bin -------------------------------------------------------------------------------- /src/simulator/tests/test_data/task_validation/task00003:000.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/phyre/HEAD/src/simulator/tests/test_data/task_validation/task00003:000.bin -------------------------------------------------------------------------------- /src/simulator/tests/test_data/task_validation/task00004:000.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/phyre/HEAD/src/simulator/tests/test_data/task_validation/task00004:000.bin -------------------------------------------------------------------------------- /src/simulator/tests/test_data/task_validation/task00005:000.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/phyre/HEAD/src/simulator/tests/test_data/task_validation/task00005:000.bin -------------------------------------------------------------------------------- /src/simulator/tests/test_data/task_validation/task00006:000.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/phyre/HEAD/src/simulator/tests/test_data/task_validation/task00006:000.bin -------------------------------------------------------------------------------- /data/evaluations/00000.meta.json: -------------------------------------------------------------------------------- 1 | {"evaluator_version": "8", "task_script_hash": "07c2364509c49a2629fa9e3586279ba0", "task_script_version": "2", "creator_hash": "44f4db07644121ac15f8da4e47e1e48a", "simulate_kwargs": {"min_valid_attempts": 10000, "simulate_worker_size": 10000}} -------------------------------------------------------------------------------- /data/evaluations/00001.meta.json: -------------------------------------------------------------------------------- 1 | {"evaluator_version": "8", "task_script_hash": "497eb7b26794d2931225d97d70f7b881", "task_script_version": "6", "creator_hash": "44f4db07644121ac15f8da4e47e1e48a", "simulate_kwargs": {"min_valid_attempts": 10000, "simulate_worker_size": 10000}} -------------------------------------------------------------------------------- /data/evaluations/00002.meta.json: -------------------------------------------------------------------------------- 1 | {"evaluator_version": "8", "task_script_hash": "924e5bed04bce57a972163b8a5e63b3f", "task_script_version": "1", "creator_hash": "44f4db07644121ac15f8da4e47e1e48a", "simulate_kwargs": {"min_valid_attempts": 10000, "simulate_worker_size": 10000}} -------------------------------------------------------------------------------- /data/evaluations/00003.meta.json: -------------------------------------------------------------------------------- 1 | {"evaluator_version": "8", "task_script_hash": "035602d41171fc230874eabc71f8d229", "task_script_version": "2", "creator_hash": "44f4db07644121ac15f8da4e47e1e48a", "simulate_kwargs": {"min_valid_attempts": 10000, "simulate_worker_size": 10000}} -------------------------------------------------------------------------------- /data/evaluations/00004.meta.json: -------------------------------------------------------------------------------- 1 | {"evaluator_version": "8", "task_script_hash": "9c9b39b5c2967e5416a4068e6842aead", "task_script_version": "8", "creator_hash": "44f4db07644121ac15f8da4e47e1e48a", "simulate_kwargs": {"min_valid_attempts": 10000, "simulate_worker_size": 10000}} -------------------------------------------------------------------------------- /data/evaluations/00005.meta.json: -------------------------------------------------------------------------------- 1 | {"evaluator_version": "8", "task_script_hash": "df62f7f82956fdda36b3dd81d1b28cab", "task_script_version": "3", "creator_hash": "44f4db07644121ac15f8da4e47e1e48a", "simulate_kwargs": {"min_valid_attempts": 10000, "simulate_worker_size": 10000}} -------------------------------------------------------------------------------- /data/evaluations/00006.meta.json: -------------------------------------------------------------------------------- 1 | {"evaluator_version": "8", "task_script_hash": "33d13bfd008e8bc0b5c114ec33d28797", "task_script_version": "4", "creator_hash": "44f4db07644121ac15f8da4e47e1e48a", "simulate_kwargs": {"min_valid_attempts": 10000, "simulate_worker_size": 10000}} -------------------------------------------------------------------------------- /data/evaluations/00007.meta.json: -------------------------------------------------------------------------------- 1 | {"evaluator_version": "8", "task_script_hash": "771779da1c34c8d03c2d79d65c4f7f8d", "task_script_version": "3", "creator_hash": "44f4db07644121ac15f8da4e47e1e48a", "simulate_kwargs": {"min_valid_attempts": 10000, "simulate_worker_size": 10000}} -------------------------------------------------------------------------------- /data/evaluations/00008.meta.json: -------------------------------------------------------------------------------- 1 | {"evaluator_version": "8", "task_script_hash": "64b63130b6ebf27c2d3844c93a8082b7", "task_script_version": "3", "creator_hash": "44f4db07644121ac15f8da4e47e1e48a", "simulate_kwargs": {"min_valid_attempts": 10000, "simulate_worker_size": 10000}} -------------------------------------------------------------------------------- /data/evaluations/00009.meta.json: -------------------------------------------------------------------------------- 1 | {"evaluator_version": "8", "task_script_hash": "9fa7e57b3e3c4f16649127d81420fc13", "task_script_version": "4", "creator_hash": "44f4db07644121ac15f8da4e47e1e48a", "simulate_kwargs": {"min_valid_attempts": 10000, "simulate_worker_size": 10000}} -------------------------------------------------------------------------------- /data/evaluations/00010.meta.json: -------------------------------------------------------------------------------- 1 | {"evaluator_version": "8", "task_script_hash": "ed140ac1ca8d342855256a5e9a34b247", "task_script_version": "5", "creator_hash": "44f4db07644121ac15f8da4e47e1e48a", "simulate_kwargs": {"min_valid_attempts": 10000, "simulate_worker_size": 10000}} -------------------------------------------------------------------------------- /data/evaluations/00011.meta.json: -------------------------------------------------------------------------------- 1 | {"evaluator_version": "8", "task_script_hash": "d1de5976f404bbb970b3ff0930b82d3c", "task_script_version": "4", "creator_hash": "44f4db07644121ac15f8da4e47e1e48a", "simulate_kwargs": {"min_valid_attempts": 10000, "simulate_worker_size": 10000}} -------------------------------------------------------------------------------- /data/evaluations/00012.meta.json: -------------------------------------------------------------------------------- 1 | {"evaluator_version": "8", "task_script_hash": "1b94a54a6687d760f3b60ed54e633af6", "task_script_version": "2", "creator_hash": "44f4db07644121ac15f8da4e47e1e48a", "simulate_kwargs": {"min_valid_attempts": 10000, "simulate_worker_size": 10000}} -------------------------------------------------------------------------------- /data/evaluations/00013.meta.json: -------------------------------------------------------------------------------- 1 | {"evaluator_version": "8", "task_script_hash": "b2a1311de39ee86460c48d9580665f69", "task_script_version": "4", "creator_hash": "44f4db07644121ac15f8da4e47e1e48a", "simulate_kwargs": {"min_valid_attempts": 10000, "simulate_worker_size": 10000}} -------------------------------------------------------------------------------- /data/evaluations/00014.meta.json: -------------------------------------------------------------------------------- 1 | {"evaluator_version": "8", "task_script_hash": "cf8136486a5ad688eebb2cdf8f8ea3cb", "task_script_version": "4", "creator_hash": "44f4db07644121ac15f8da4e47e1e48a", "simulate_kwargs": {"min_valid_attempts": 10000, "simulate_worker_size": 10000}} -------------------------------------------------------------------------------- /data/evaluations/00015.meta.json: -------------------------------------------------------------------------------- 1 | {"evaluator_version": "8", "task_script_hash": "79d7d750967db8f57428870670e555f2", "task_script_version": "2", "creator_hash": "44f4db07644121ac15f8da4e47e1e48a", "simulate_kwargs": {"min_valid_attempts": 10000, "simulate_worker_size": 10000}} -------------------------------------------------------------------------------- /data/evaluations/00016.meta.json: -------------------------------------------------------------------------------- 1 | {"evaluator_version": "8", "task_script_hash": "d30182a5a30eeb9c6bf26443978ade05", "task_script_version": "11", "creator_hash": "44f4db07644121ac15f8da4e47e1e48a", "simulate_kwargs": {"min_valid_attempts": 10000, "simulate_worker_size": 10000}} -------------------------------------------------------------------------------- /data/evaluations/00017.meta.json: -------------------------------------------------------------------------------- 1 | {"evaluator_version": "8", "task_script_hash": "6aa3627bc20ccb35ec37b45dc8c8fbd3", "task_script_version": "2", "creator_hash": "44f4db07644121ac15f8da4e47e1e48a", "simulate_kwargs": {"min_valid_attempts": 10000, "simulate_worker_size": 10000}} -------------------------------------------------------------------------------- /data/evaluations/00018.meta.json: -------------------------------------------------------------------------------- 1 | {"evaluator_version": "8", "task_script_hash": "e5db0d23fcbe6234bc05f4c6fad6963a", "task_script_version": "2", "creator_hash": "44f4db07644121ac15f8da4e47e1e48a", "simulate_kwargs": {"min_valid_attempts": 10000, "simulate_worker_size": 10000}} -------------------------------------------------------------------------------- /data/evaluations/00019.meta.json: -------------------------------------------------------------------------------- 1 | {"evaluator_version": "8", "task_script_hash": "5f8d77202343e056cbd4f61aca9c6743", "task_script_version": "4", "creator_hash": "44f4db07644121ac15f8da4e47e1e48a", "simulate_kwargs": {"min_valid_attempts": 10000, "simulate_worker_size": 10000}} -------------------------------------------------------------------------------- /data/evaluations/00020.meta.json: -------------------------------------------------------------------------------- 1 | {"evaluator_version": "8", "task_script_hash": "2e7b8a6c9f191f43fd83109e61949991", "task_script_version": "3", "creator_hash": "44f4db07644121ac15f8da4e47e1e48a", "simulate_kwargs": {"min_valid_attempts": 10000, "simulate_worker_size": 10000}} -------------------------------------------------------------------------------- /data/evaluations/00021.meta.json: -------------------------------------------------------------------------------- 1 | {"evaluator_version": "8", "task_script_hash": "2a66bd4f73482e294f6d40bb58bc58fd", "task_script_version": "1", "creator_hash": "44f4db07644121ac15f8da4e47e1e48a", "simulate_kwargs": {"min_valid_attempts": 10000, "simulate_worker_size": 10000}} -------------------------------------------------------------------------------- /data/evaluations/00022.meta.json: -------------------------------------------------------------------------------- 1 | {"evaluator_version": "8", "task_script_hash": "f034b166c12e663bfa78405833894276", "task_script_version": "6", "creator_hash": "44f4db07644121ac15f8da4e47e1e48a", "simulate_kwargs": {"min_valid_attempts": 10000, "simulate_worker_size": 10000}} -------------------------------------------------------------------------------- /data/evaluations/00023.meta.json: -------------------------------------------------------------------------------- 1 | {"evaluator_version": "8", "task_script_hash": "5dafe875f3295af3340bb76ed4affd0d", "task_script_version": "3", "creator_hash": "44f4db07644121ac15f8da4e47e1e48a", "simulate_kwargs": {"min_valid_attempts": 10000, "simulate_worker_size": 10000}} -------------------------------------------------------------------------------- /data/evaluations/00024.meta.json: -------------------------------------------------------------------------------- 1 | {"evaluator_version": "8", "task_script_hash": "44f5ceddd1e2ff8639e4d76bafddcf10", "task_script_version": "4", "creator_hash": "44f4db07644121ac15f8da4e47e1e48a", "simulate_kwargs": {"min_valid_attempts": 10000, "simulate_worker_size": 10000}} -------------------------------------------------------------------------------- /data/evaluations/00100.meta.json: -------------------------------------------------------------------------------- 1 | {"evaluator_version": "8", "task_script_hash": "b362847375ae96967d52cd605e5bfc26", "task_script_version": "3", "creator_hash": "44f4db07644121ac15f8da4e47e1e48a", "simulate_kwargs": {"min_valid_attempts": 10000, "simulate_worker_size": 10000}} -------------------------------------------------------------------------------- /data/evaluations/00101.meta.json: -------------------------------------------------------------------------------- 1 | {"evaluator_version": "8", "task_script_hash": "f02dc448f07364475f9f3389e21b31cb", "task_script_version": "2", "creator_hash": "44f4db07644121ac15f8da4e47e1e48a", "simulate_kwargs": {"min_valid_attempts": 10000, "simulate_worker_size": 10000}} -------------------------------------------------------------------------------- /data/evaluations/00102.meta.json: -------------------------------------------------------------------------------- 1 | {"evaluator_version": "8", "task_script_hash": "1b8c67bfe4da845bd6daa6382a57d2f4", "task_script_version": "1", "creator_hash": "44f4db07644121ac15f8da4e47e1e48a", "simulate_kwargs": {"min_valid_attempts": 10000, "simulate_worker_size": 10000}} -------------------------------------------------------------------------------- /data/evaluations/00103.meta.json: -------------------------------------------------------------------------------- 1 | {"evaluator_version": "8", "task_script_hash": "1ec94f871d4afc03961737aeb7e38ada", "task_script_version": "4", "creator_hash": "44f4db07644121ac15f8da4e47e1e48a", "simulate_kwargs": {"min_valid_attempts": 10000, "simulate_worker_size": 10000}} -------------------------------------------------------------------------------- /data/evaluations/00104.meta.json: -------------------------------------------------------------------------------- 1 | {"evaluator_version": "8", "task_script_hash": "5538826a07b220378ff163b8af249ac2", "task_script_version": "2", "creator_hash": "44f4db07644121ac15f8da4e47e1e48a", "simulate_kwargs": {"min_valid_attempts": 10000, "simulate_worker_size": 10000}} -------------------------------------------------------------------------------- /data/evaluations/00105.meta.json: -------------------------------------------------------------------------------- 1 | {"evaluator_version": "8", "task_script_hash": "fa69267418e6b4d70e35590a1e3d8f73", "task_script_version": "1", "creator_hash": "44f4db07644121ac15f8da4e47e1e48a", "simulate_kwargs": {"min_valid_attempts": 10000, "simulate_worker_size": 10000}} -------------------------------------------------------------------------------- /data/evaluations/00106.meta.json: -------------------------------------------------------------------------------- 1 | {"evaluator_version": "8", "task_script_hash": "557a775816ef85a1d3de658bec14448a", "task_script_version": "1", "creator_hash": "44f4db07644121ac15f8da4e47e1e48a", "simulate_kwargs": {"min_valid_attempts": 10000, "simulate_worker_size": 10000}} -------------------------------------------------------------------------------- /data/evaluations/00107.meta.json: -------------------------------------------------------------------------------- 1 | {"evaluator_version": "8", "task_script_hash": "d6d960a12133df4e819909abd048c972", "task_script_version": "1", "creator_hash": "44f4db07644121ac15f8da4e47e1e48a", "simulate_kwargs": {"min_valid_attempts": 10000, "simulate_worker_size": 10000}} -------------------------------------------------------------------------------- /data/evaluations/00108.meta.json: -------------------------------------------------------------------------------- 1 | {"evaluator_version": "8", "task_script_hash": "35ffaff3a133acef4289b84e0d325d8c", "task_script_version": "3", "creator_hash": "44f4db07644121ac15f8da4e47e1e48a", "simulate_kwargs": {"min_valid_attempts": 10000, "simulate_worker_size": 10000}} -------------------------------------------------------------------------------- /data/evaluations/00109.meta.json: -------------------------------------------------------------------------------- 1 | {"evaluator_version": "8", "task_script_hash": "7feeda82ab926902b45167198ad32dfa", "task_script_version": "10", "creator_hash": "44f4db07644121ac15f8da4e47e1e48a", "simulate_kwargs": {"min_valid_attempts": 10000, "simulate_worker_size": 10000}} -------------------------------------------------------------------------------- /data/evaluations/00110.meta.json: -------------------------------------------------------------------------------- 1 | {"evaluator_version": "8", "task_script_hash": "427b0549c4ce8e1fd9642c910c7df765", "task_script_version": "3", "creator_hash": "44f4db07644121ac15f8da4e47e1e48a", "simulate_kwargs": {"min_valid_attempts": 10000, "simulate_worker_size": 10000}} -------------------------------------------------------------------------------- /data/evaluations/00111.meta.json: -------------------------------------------------------------------------------- 1 | {"evaluator_version": "8", "task_script_hash": "964511d5991dbc5ad42073cb7be255ba", "task_script_version": "3", "creator_hash": "44f4db07644121ac15f8da4e47e1e48a", "simulate_kwargs": {"min_valid_attempts": 10000, "simulate_worker_size": 10000}} -------------------------------------------------------------------------------- /data/evaluations/00112.meta.json: -------------------------------------------------------------------------------- 1 | {"evaluator_version": "8", "task_script_hash": "9196b301a1bdbc21a76738dfb73bf288", "task_script_version": "3", "creator_hash": "44f4db07644121ac15f8da4e47e1e48a", "simulate_kwargs": {"min_valid_attempts": 10000, "simulate_worker_size": 10000}} -------------------------------------------------------------------------------- /data/evaluations/00113.meta.json: -------------------------------------------------------------------------------- 1 | {"evaluator_version": "8", "task_script_hash": "216536a1c72644c0e08f66d45a9f7e8b", "task_script_version": "2", "creator_hash": "44f4db07644121ac15f8da4e47e1e48a", "simulate_kwargs": {"min_valid_attempts": 10000, "simulate_worker_size": 10000}} -------------------------------------------------------------------------------- /data/evaluations/00114.meta.json: -------------------------------------------------------------------------------- 1 | {"evaluator_version": "8", "task_script_hash": "27874599d19d2e3f0d0cb42a75ffc694", "task_script_version": "4", "creator_hash": "44f4db07644121ac15f8da4e47e1e48a", "simulate_kwargs": {"min_valid_attempts": 10000, "simulate_worker_size": 10000}} -------------------------------------------------------------------------------- /data/evaluations/00115.meta.json: -------------------------------------------------------------------------------- 1 | {"evaluator_version": "8", "task_script_hash": "b4c220443fa7af2d93009a15f925d7e1", "task_script_version": "2", "creator_hash": "44f4db07644121ac15f8da4e47e1e48a", "simulate_kwargs": {"min_valid_attempts": 10000, "simulate_worker_size": 10000}} -------------------------------------------------------------------------------- /data/evaluations/00116.meta.json: -------------------------------------------------------------------------------- 1 | {"evaluator_version": "8", "task_script_hash": "e6071e5df93e7fa1c9a9b4fb35d0ac98", "task_script_version": "2", "creator_hash": "44f4db07644121ac15f8da4e47e1e48a", "simulate_kwargs": {"min_valid_attempts": 10000, "simulate_worker_size": 10000}} -------------------------------------------------------------------------------- /data/evaluations/00117.meta.json: -------------------------------------------------------------------------------- 1 | {"evaluator_version": "8", "task_script_hash": "b40db326568612595487a2608b8fb059", "task_script_version": "2", "creator_hash": "44f4db07644121ac15f8da4e47e1e48a", "simulate_kwargs": {"min_valid_attempts": 10000, "simulate_worker_size": 10000}} -------------------------------------------------------------------------------- /data/evaluations/00118.meta.json: -------------------------------------------------------------------------------- 1 | {"evaluator_version": "8", "task_script_hash": "9cab1c5a19c6c517122e24ea3e18c507", "task_script_version": "3", "creator_hash": "44f4db07644121ac15f8da4e47e1e48a", "simulate_kwargs": {"min_valid_attempts": 10000, "simulate_worker_size": 10000}} -------------------------------------------------------------------------------- /data/evaluations/00119.meta.json: -------------------------------------------------------------------------------- 1 | {"evaluator_version": "8", "task_script_hash": "3ff42233c4241cbb376a4e039ec96d1f", "task_script_version": "2", "creator_hash": "44f4db07644121ac15f8da4e47e1e48a", "simulate_kwargs": {"min_valid_attempts": 10000, "simulate_worker_size": 10000}} -------------------------------------------------------------------------------- /data/evaluations/00120.meta.json: -------------------------------------------------------------------------------- 1 | {"evaluator_version": "8", "task_script_hash": "e91036106a3daabdf45bb09e2db90556", "task_script_version": "3", "creator_hash": "44f4db07644121ac15f8da4e47e1e48a", "simulate_kwargs": {"min_valid_attempts": 10000, "simulate_worker_size": 10000}} -------------------------------------------------------------------------------- /data/evaluations/00121.meta.json: -------------------------------------------------------------------------------- 1 | {"evaluator_version": "8", "task_script_hash": "7899777354b285e04d3b6771e6bfe0b5", "task_script_version": "3", "creator_hash": "44f4db07644121ac15f8da4e47e1e48a", "simulate_kwargs": {"min_valid_attempts": 10000, "simulate_worker_size": 10000}} -------------------------------------------------------------------------------- /data/evaluations/00122.meta.json: -------------------------------------------------------------------------------- 1 | {"evaluator_version": "8", "task_script_hash": "3fe8e87cf377dbcdcbf461f23fbbf22a", "task_script_version": "10", "creator_hash": "44f4db07644121ac15f8da4e47e1e48a", "simulate_kwargs": {"min_valid_attempts": 10000, "simulate_worker_size": 10000}} -------------------------------------------------------------------------------- /data/evaluations/00123.meta.json: -------------------------------------------------------------------------------- 1 | {"evaluator_version": "8", "task_script_hash": "0c029fc37f595baa12cec45069081022", "task_script_version": "2", "creator_hash": "44f4db07644121ac15f8da4e47e1e48a", "simulate_kwargs": {"min_valid_attempts": 10000, "simulate_worker_size": 10000}} -------------------------------------------------------------------------------- /data/evaluations/00124.meta.json: -------------------------------------------------------------------------------- 1 | {"evaluator_version": "8", "task_script_hash": "5767cfe19dc8edf0f148b54871514498", "task_script_version": "4", "creator_hash": "44f4db07644121ac15f8da4e47e1e48a", "simulate_kwargs": {"min_valid_attempts": 10000, "simulate_worker_size": 10000}} -------------------------------------------------------------------------------- /data/evaluations/00200.meta.json: -------------------------------------------------------------------------------- 1 | {"evaluator_version": "8", "task_script_hash": "1ea941784b0bedacfda173732167b504", "task_script_version": "1", "creator_hash": "44f4db07644121ac15f8da4e47e1e48a", "simulate_kwargs": {"min_valid_attempts": 10000, "simulate_worker_size": 10000}} -------------------------------------------------------------------------------- /data/evaluations/00211.meta.json: -------------------------------------------------------------------------------- 1 | {"evaluator_version": "8", "task_script_hash": "851b7107672620032d2c58cc297ebf17", "task_script_version": "1", "creator_hash": "44f4db07644121ac15f8da4e47e1e48a", "simulate_kwargs": {"min_valid_attempts": 10000, "simulate_worker_size": 10000}} -------------------------------------------------------------------------------- /data/evaluations/00212.meta.json: -------------------------------------------------------------------------------- 1 | {"evaluator_version": "8", "task_script_hash": "7271453ce49b196b4133d40cea786259", "task_script_version": "1", "creator_hash": "44f4db07644121ac15f8da4e47e1e48a", "simulate_kwargs": {"min_valid_attempts": 10000, "simulate_worker_size": 10000}} -------------------------------------------------------------------------------- /data/evaluations/00214.meta.json: -------------------------------------------------------------------------------- 1 | {"evaluator_version": "8", "task_script_hash": "1432818b321146fede429f74ecdb4564", "task_script_version": "1", "creator_hash": "44f4db07644121ac15f8da4e47e1e48a", "simulate_kwargs": {"min_valid_attempts": 10000, "simulate_worker_size": 10000}} -------------------------------------------------------------------------------- /data/evaluations/00215.meta.json: -------------------------------------------------------------------------------- 1 | {"evaluator_version": "8", "task_script_hash": "a8bb3fa2d734f2cf43a1cc62115cf072", "task_script_version": "2", "creator_hash": "44f4db07644121ac15f8da4e47e1e48a", "simulate_kwargs": {"min_valid_attempts": 10000, "simulate_worker_size": 10000}} -------------------------------------------------------------------------------- /data/evaluations/00221.meta.json: -------------------------------------------------------------------------------- 1 | {"evaluator_version": "8", "task_script_hash": "211dbee6b817ea9b7125480fbba1d9c2", "task_script_version": "1", "creator_hash": "44f4db07644121ac15f8da4e47e1e48a", "simulate_kwargs": {"min_valid_attempts": 10000, "simulate_worker_size": 10000}} -------------------------------------------------------------------------------- /data/evaluations/00249.meta.json: -------------------------------------------------------------------------------- 1 | {"evaluator_version": "8", "task_script_hash": "0a59b0e6fed36208b2a9a4d95bb7c8a1", "task_script_version": "1", "creator_hash": "44f4db07644121ac15f8da4e47e1e48a", "simulate_kwargs": {"min_valid_attempts": 10000, "simulate_worker_size": 10000}} -------------------------------------------------------------------------------- /data/evaluations/00250.meta.json: -------------------------------------------------------------------------------- 1 | {"evaluator_version": "8", "task_script_hash": "24d65844bea3813bac819a314a0e2114", "task_script_version": "1", "creator_hash": "44f4db07644121ac15f8da4e47e1e48a", "simulate_kwargs": {"min_valid_attempts": 10000, "simulate_worker_size": 10000}} -------------------------------------------------------------------------------- /data/evaluations/00251.meta.json: -------------------------------------------------------------------------------- 1 | {"evaluator_version": "8", "task_script_hash": "5e88502eb421470db687ef4becfd7e9d", "task_script_version": "2", "creator_hash": "44f4db07644121ac15f8da4e47e1e48a", "simulate_kwargs": {"min_valid_attempts": 10000, "simulate_worker_size": 10000}} -------------------------------------------------------------------------------- /data/evaluations/00254.meta.json: -------------------------------------------------------------------------------- 1 | {"evaluator_version": "8", "task_script_hash": "23aad40b63234da9e42e6dd0063d3144", "task_script_version": "2", "creator_hash": "44f4db07644121ac15f8da4e47e1e48a", "simulate_kwargs": {"min_valid_attempts": 10000, "simulate_worker_size": 10000}} -------------------------------------------------------------------------------- /data/evaluations/00259.meta.json: -------------------------------------------------------------------------------- 1 | {"evaluator_version": "8", "task_script_hash": "0fc46107dc27d158080bef00d3918cf7", "task_script_version": "2", "creator_hash": "44f4db07644121ac15f8da4e47e1e48a", "simulate_kwargs": {"min_valid_attempts": 10000, "simulate_worker_size": 10000}} -------------------------------------------------------------------------------- /data/evaluations/00262.meta.json: -------------------------------------------------------------------------------- 1 | {"evaluator_version": "8", "task_script_hash": "723a8ac9ed32549ec655904964d69b08", "task_script_version": "1", "creator_hash": "44f4db07644121ac15f8da4e47e1e48a", "simulate_kwargs": {"min_valid_attempts": 10000, "simulate_worker_size": 10000}} -------------------------------------------------------------------------------- /data/evaluations/00273.meta.json: -------------------------------------------------------------------------------- 1 | {"evaluator_version": "8", "task_script_hash": "b1fa9251e480e202ea4eed91de65f0d2", "task_script_version": "1", "creator_hash": "44f4db07644121ac15f8da4e47e1e48a", "simulate_kwargs": {"min_valid_attempts": 10000, "simulate_worker_size": 10000}} -------------------------------------------------------------------------------- /data/evaluations/00274.meta.json: -------------------------------------------------------------------------------- 1 | {"evaluator_version": "8", "task_script_hash": "6de71562f334cc965c7819a2dc30f976", "task_script_version": "1", "creator_hash": "44f4db07644121ac15f8da4e47e1e48a", "simulate_kwargs": {"min_valid_attempts": 10000, "simulate_worker_size": 10000}} -------------------------------------------------------------------------------- /data/evaluations/00311.meta.json: -------------------------------------------------------------------------------- 1 | {"evaluator_version": "8", "task_script_hash": "265496400e052bf48bc81b302815b5ec", "task_script_version": "1", "creator_hash": "44f4db07644121ac15f8da4e47e1e48a", "simulate_kwargs": {"min_valid_attempts": 10000, "simulate_worker_size": 10000}} -------------------------------------------------------------------------------- /data/evaluations/00312.meta.json: -------------------------------------------------------------------------------- 1 | {"evaluator_version": "8", "task_script_hash": "3d94fa07137b82178dae32ad781d3037", "task_script_version": "1", "creator_hash": "44f4db07644121ac15f8da4e47e1e48a", "simulate_kwargs": {"min_valid_attempts": 10000, "simulate_worker_size": 10000}} -------------------------------------------------------------------------------- /data/evaluations/00316.meta.json: -------------------------------------------------------------------------------- 1 | {"evaluator_version": "8", "task_script_hash": "db6bb3f9ec3ba4567f634870b45ca173", "task_script_version": "1", "creator_hash": "44f4db07644121ac15f8da4e47e1e48a", "simulate_kwargs": {"min_valid_attempts": 10000, "simulate_worker_size": 10000}} -------------------------------------------------------------------------------- /data/evaluations/00321.meta.json: -------------------------------------------------------------------------------- 1 | {"evaluator_version": "8", "task_script_hash": "1f4cdd833440ea37af5a824413b58066", "task_script_version": "2", "creator_hash": "44f4db07644121ac15f8da4e47e1e48a", "simulate_kwargs": {"min_valid_attempts": 10000, "simulate_worker_size": 10000}} -------------------------------------------------------------------------------- /data/evaluations/00327.meta.json: -------------------------------------------------------------------------------- 1 | {"evaluator_version": "8", "task_script_hash": "38a3ff5baf4f713867b93d1c3b44bd85", "task_script_version": "1", "creator_hash": "44f4db07644121ac15f8da4e47e1e48a", "simulate_kwargs": {"min_valid_attempts": 10000, "simulate_worker_size": 10000}} -------------------------------------------------------------------------------- /data/evaluations/00328.meta.json: -------------------------------------------------------------------------------- 1 | {"evaluator_version": "8", "task_script_hash": "53a5d2a6dc428d0f9a3fb7c1e874a5f3", "task_script_version": "3", "creator_hash": "44f4db07644121ac15f8da4e47e1e48a", "simulate_kwargs": {"min_valid_attempts": 10000, "simulate_worker_size": 10000}} -------------------------------------------------------------------------------- /data/evaluations/00360.meta.json: -------------------------------------------------------------------------------- 1 | {"evaluator_version": "8", "task_script_hash": "55ca2faa29710e7435a9a311ff13b5e4", "task_script_version": "3", "creator_hash": "44f4db07644121ac15f8da4e47e1e48a", "simulate_kwargs": {"min_valid_attempts": 10000, "simulate_worker_size": 10000}} -------------------------------------------------------------------------------- /data/evaluations/00361.meta.json: -------------------------------------------------------------------------------- 1 | {"evaluator_version": "8", "task_script_hash": "78f698e3e4d7a8fcac0f1ccf47d96160", "task_script_version": "1", "creator_hash": "44f4db07644121ac15f8da4e47e1e48a", "simulate_kwargs": {"min_valid_attempts": 10000, "simulate_worker_size": 10000}} -------------------------------------------------------------------------------- /data/evaluations/00371.meta.json: -------------------------------------------------------------------------------- 1 | {"evaluator_version": "8", "task_script_hash": "4f4f5671b776880698d0444071bfe8c7", "task_script_version": "2", "creator_hash": "44f4db07644121ac15f8da4e47e1e48a", "simulate_kwargs": {"min_valid_attempts": 10000, "simulate_worker_size": 10000}} -------------------------------------------------------------------------------- /data/evaluations/00372.meta.json: -------------------------------------------------------------------------------- 1 | {"evaluator_version": "8", "task_script_hash": "b3f1aa32a11f134eb672dc49db05d4e0", "task_script_version": "1", "creator_hash": "44f4db07644121ac15f8da4e47e1e48a", "simulate_kwargs": {"min_valid_attempts": 10000, "simulate_worker_size": 10000}} -------------------------------------------------------------------------------- /data/evaluations/00398.meta.json: -------------------------------------------------------------------------------- 1 | {"evaluator_version": "8", "task_script_hash": "9cd94fb4a8e6e990df3ef5f747dc8a4f", "task_script_version": "3", "creator_hash": "44f4db07644121ac15f8da4e47e1e48a", "simulate_kwargs": {"min_valid_attempts": 10000, "simulate_worker_size": 10000}} -------------------------------------------------------------------------------- /data/evaluations/00600.meta.json: -------------------------------------------------------------------------------- 1 | {"evaluator_version": "8", "task_script_hash": "9c5465724c9b2b20ebd4d068284d0771", "task_script_version": "3", "creator_hash": "44f4db07644121ac15f8da4e47e1e48a", "simulate_kwargs": {"min_valid_attempts": 10000, "simulate_worker_size": 10000}} -------------------------------------------------------------------------------- /data/evaluations/00604.meta.json: -------------------------------------------------------------------------------- 1 | {"evaluator_version": "8", "task_script_hash": "0f5581f1e2247e32e155e28e69a008d0", "task_script_version": "9", "creator_hash": "44f4db07644121ac15f8da4e47e1e48a", "simulate_kwargs": {"min_valid_attempts": 10000, "simulate_worker_size": 10000}} -------------------------------------------------------------------------------- /data/evaluations/01000.meta.json: -------------------------------------------------------------------------------- 1 | {"evaluator_version": "8", "task_script_hash": "238fe844a5142a770cdcf439cd7062ea", "task_script_version": "2", "creator_hash": "4d96864ce5e37ebd3ca18228eb6c9f94", "simulate_kwargs": {"min_valid_attempts": 10000, "simulate_worker_size": 10000}} -------------------------------------------------------------------------------- /data/evaluations/01001.meta.json: -------------------------------------------------------------------------------- 1 | {"evaluator_version": "8", "task_script_hash": "9e297e031490fd658d26da9863aa1bc6", "task_script_version": "2", "creator_hash": "4d96864ce5e37ebd3ca18228eb6c9f94", "simulate_kwargs": {"min_valid_attempts": 10000, "simulate_worker_size": 10000}} -------------------------------------------------------------------------------- /data/evaluations/01002.meta.json: -------------------------------------------------------------------------------- 1 | {"evaluator_version": "8", "task_script_hash": "4f8c26e5f87e3f43f5292ba58077fe8f", "task_script_version": "2", "creator_hash": "4d96864ce5e37ebd3ca18228eb6c9f94", "simulate_kwargs": {"min_valid_attempts": 10000, "simulate_worker_size": 10000}} -------------------------------------------------------------------------------- /data/evaluations/01003.meta.json: -------------------------------------------------------------------------------- 1 | {"evaluator_version": "8", "task_script_hash": "83666b812f699edccb4bd3454ed798ce", "task_script_version": "2", "creator_hash": "4d96864ce5e37ebd3ca18228eb6c9f94", "simulate_kwargs": {"min_valid_attempts": 10000, "simulate_worker_size": 10000}} -------------------------------------------------------------------------------- /data/evaluations/01004.meta.json: -------------------------------------------------------------------------------- 1 | {"evaluator_version": "8", "task_script_hash": "205018a9038e64568326cd73eb33c8ed", "task_script_version": "2", "creator_hash": "4d96864ce5e37ebd3ca18228eb6c9f94", "simulate_kwargs": {"min_valid_attempts": 10000, "simulate_worker_size": 10000}} -------------------------------------------------------------------------------- /data/evaluations/01005.meta.json: -------------------------------------------------------------------------------- 1 | {"evaluator_version": "8", "task_script_hash": "9426d1732dec4519021945f066e7afc9", "task_script_version": "2", "creator_hash": "4d96864ce5e37ebd3ca18228eb6c9f94", "simulate_kwargs": {"min_valid_attempts": 10000, "simulate_worker_size": 10000}} -------------------------------------------------------------------------------- /data/evaluations/01006.meta.json: -------------------------------------------------------------------------------- 1 | {"evaluator_version": "8", "task_script_hash": "5ab354724a609203f56ec4ace9e3e92f", "task_script_version": "2", "creator_hash": "4d96864ce5e37ebd3ca18228eb6c9f94", "simulate_kwargs": {"min_valid_attempts": 10000, "simulate_worker_size": 10000}} -------------------------------------------------------------------------------- /data/evaluations/01007.meta.json: -------------------------------------------------------------------------------- 1 | {"evaluator_version": "8", "task_script_hash": "68dd1876f469ef4b7d7cf47e038b8b5f", "task_script_version": "2", "creator_hash": "4d96864ce5e37ebd3ca18228eb6c9f94", "simulate_kwargs": {"min_valid_attempts": 10000, "simulate_worker_size": 10000}} -------------------------------------------------------------------------------- /data/evaluations/01008.meta.json: -------------------------------------------------------------------------------- 1 | {"evaluator_version": "8", "task_script_hash": "4fed013adf84f815f1e4d6007305db1b", "task_script_version": "1", "creator_hash": "4d96864ce5e37ebd3ca18228eb6c9f94", "simulate_kwargs": {"min_valid_attempts": 10000, "simulate_worker_size": 10000}} -------------------------------------------------------------------------------- /data/evaluations/01009.meta.json: -------------------------------------------------------------------------------- 1 | {"evaluator_version": "8", "task_script_hash": "2db9419c4e2bbf4eb02b7e0322c90363", "task_script_version": "2", "creator_hash": "4d96864ce5e37ebd3ca18228eb6c9f94", "simulate_kwargs": {"min_valid_attempts": 10000, "simulate_worker_size": 10000}} -------------------------------------------------------------------------------- /data/evaluations/01010.meta.json: -------------------------------------------------------------------------------- 1 | {"evaluator_version": "8", "task_script_hash": "af38ef83cd83eaf3501c1a4915f2252a", "task_script_version": "2", "creator_hash": "4d96864ce5e37ebd3ca18228eb6c9f94", "simulate_kwargs": {"min_valid_attempts": 10000, "simulate_worker_size": 10000}} -------------------------------------------------------------------------------- /data/evaluations/01011.meta.json: -------------------------------------------------------------------------------- 1 | {"evaluator_version": "8", "task_script_hash": "2975568bb3c8872eaf0566e5d14082e8", "task_script_version": "2", "creator_hash": "4d96864ce5e37ebd3ca18228eb6c9f94", "simulate_kwargs": {"min_valid_attempts": 10000, "simulate_worker_size": 10000}} -------------------------------------------------------------------------------- /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | # Code of Conduct 2 | 3 | Facebook has adopted a Code of Conduct that we expect project participants to adhere to. 4 | Please read the [full text](https://code.fb.com/codeofconduct/) 5 | so that you can understand what actions will and will not be tolerated. 6 | -------------------------------------------------------------------------------- /env.yml: -------------------------------------------------------------------------------- 1 | name: phyre 2 | channels: 3 | - conda-forge 4 | dependencies: 5 | - python=3.6 6 | - sed 7 | - nodejs 8 | - thrift-cpp=0.11.0 9 | - wget 10 | - pybind11=2.2.4 11 | - cmake 12 | - boost=1.67.0 13 | - setuptools 14 | - pip 15 | - pip: 16 | - matplotlib 17 | - tqdm 18 | - ipywidgets 19 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "third-party/Box2D"] 2 | path = third-party/Box2D 3 | url = https://github.com/erincatto/Box2D.git 4 | [submodule "third-party/clip2tri"] 5 | path = third-party/clip2tri 6 | url = https://github.com/raptor/clip2tri.git 7 | [submodule "third-party/googletest"] 8 | path = third-party/googletest 9 | url = https://github.com/google/googletest.git 10 | -------------------------------------------------------------------------------- /src/viz/.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/ignore-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | 6 | # testing 7 | /coverage 8 | 9 | # production 10 | /build 11 | 12 | # misc 13 | .DS_Store 14 | .env.local 15 | .env.development.local 16 | .env.test.local 17 | .env.production.local 18 | 19 | npm-debug.log* 20 | yarn-debug.log* 21 | yarn-error.log* 22 | -------------------------------------------------------------------------------- /src/viz/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "viz", 3 | "version": "0.1.0", 4 | "private": true, 5 | "homepage": ".", 6 | "dependencies": { 7 | "browser-thrift": "^0.7.0", 8 | "konva": "^1.7.6", 9 | "npm": "^6.13.4", 10 | "react": "^16.3.1", 11 | "react-dom": "^16.3.1", 12 | "react-konva": "^1.7.2", 13 | "react-scripts": "1.1.1", 14 | "semantic-ui-react": "^0.79.1" 15 | }, 16 | "scripts": { 17 | "start": "react-scripts start", 18 | "build": "react-scripts build", 19 | "test": "react-scripts test --env=jsdom", 20 | "eject": "react-scripts eject" 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # General exluded files 2 | *.o 3 | __pycache__ 4 | .DS_Store 5 | .ropeproject 6 | .nfs* 7 | .vscode 8 | 9 | # Excluded paths 10 | build 11 | cmake_build 12 | src/python/phyre.egg-info/ 13 | 14 | # Saved solutions 15 | data/solutions 16 | 17 | # Compiled simulator bindings. 18 | src/python/phyre/simulator_bindings.* 19 | 20 | # Downloadable thirt-party thrift.js library. 21 | src/viz/public/thrift.js 22 | 23 | # Generated files 24 | src/gen-cpp 25 | src/gen-js 26 | src/gen-py 27 | last_user_input.txt 28 | *.so 29 | .pytype 30 | .mypy_cache 31 | website/i18n/ 32 | website/node_modules/ 33 | website/yarn.lock 34 | -------------------------------------------------------------------------------- /agents/download_dqn_ckps.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -e 2 | # Downloads DQN checkpoints for all sees from PHYRE paper. 3 | 4 | DST_ROOT=$(realpath $(dirname $0)/..) 5 | 6 | for seed in $(seq 0 9); do 7 | for tpl in ball_cross_template ball_within_template two_balls_cross_template two_balls_within_template; do 8 | for fname in ckpt.00100000 results.json; do 9 | path="results/finals/dqn_10k/$tpl/$seed/$fname" 10 | if [ ! -f "$DST_ROOT/$path" ]; then 11 | mkdir -p "$(dirname "$DST_ROOT/$path")" 12 | wget "https://dl.fbaipublicfiles.com/phyre/$path" -O "$DST_ROOT/$path" 13 | fi 14 | done 15 | done 16 | done 17 | 18 | echo "All done: $DST_ROOT" -------------------------------------------------------------------------------- /src/viz/src/index.css: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) Facebook, Inc. and its affiliates. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | body { 17 | margin: 0; 18 | padding: 0; 19 | font-family: sans-serif; 20 | } 21 | -------------------------------------------------------------------------------- /src/python/phyre/server.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # Copyright (c) Facebook, Inc. and its affiliates. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | if __name__ == "__main__": 17 | import phyre.viz_server.server 18 | phyre.viz_server.server.main() 19 | -------------------------------------------------------------------------------- /src/viz/public/phyre_config.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) Facebook, Inc. and its affiliates. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | /* This config is only loaded when development React server is used. */ 16 | window.phyre_config = { 17 | mode: 'demo' 18 | } 19 | -------------------------------------------------------------------------------- /src/python/phyre/creator/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | from phyre.creator.constants import SCENE_WIDTH, SCENE_HEIGHT, SolutionTier 16 | from phyre.creator.factories import define_task, define_task_template, SkipTemplateParams 17 | -------------------------------------------------------------------------------- /scripts/clang_format_all.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Copyright (c) Facebook, Inc. and its affiliates. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | set -e 17 | 18 | ROOT="$(dirname "$0")/../" 19 | 20 | clang-format-8 \ 21 | -style google \ 22 | -i \ 23 | $(find "$ROOT/src/simulator" -name '*.cpp' -or -name '*.h') 24 | -------------------------------------------------------------------------------- /src/viz/src/App.test.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) Facebook, Inc. and its affiliates. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | import React from 'react'; 15 | import ReactDOM from 'react-dom'; 16 | import App from './App'; 17 | 18 | it('renders without crashing', () => { 19 | const div = document.createElement('div'); 20 | ReactDOM.render(, div); 21 | ReactDOM.unmountComponentAtNode(div); 22 | }); 23 | -------------------------------------------------------------------------------- /src/viz/src/index.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) Facebook, Inc. and its affiliates. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | import React from 'react'; 15 | import ReactDOM from 'react-dom'; 16 | import './index.css'; 17 | import App from './App'; 18 | import registerServiceWorker from './registerServiceWorker'; 19 | 20 | ReactDOM.render(, document.getElementById('root')); 21 | registerServiceWorker(); 22 | -------------------------------------------------------------------------------- /src/simulator/task_validation.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) Facebook, Inc. and its affiliates. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | #ifndef TASK_VALIDATION_H 15 | #define TASK_VALIDATION_H 16 | 17 | #include "gen-cpp/task_types.h" 18 | #include "thrift_box2d_conversion.h" 19 | 20 | bool isTaskInSolvedState(const ::task::Task& task, 21 | const b2WorldWithData& world); 22 | 23 | #endif // TASK_VALIDATION_H 24 | -------------------------------------------------------------------------------- /data/task_scripts/tests/task_validation/task00003.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | import phyre.creator as creator_lib 16 | 17 | 18 | @creator_lib.define_task 19 | def build_task(C): 20 | b1 = C.add_box(50, 50).set_bottom(150).set_left(150) 21 | b2 = C.add_box(100, 50).set_bottom(0).set_left(150) 22 | C.update_task(body1=b1, body2=b2, 23 | relationships=[C.SpatialRelationship.ABOVE], 24 | description="Is smaller box above bigger box?") 25 | -------------------------------------------------------------------------------- /data/task_scripts/tests/task_validation/task00004.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | import phyre.creator as creator_lib 16 | 17 | 18 | @creator_lib.define_task 19 | def build_task(C): 20 | b1 = C.add_box(50, 50).set_bottom(0).set_left(50) 21 | b2 = C.add_box(100, 50).set_bottom(150).set_left(25) 22 | C.update_task(body1=b1, body2=b2, 23 | relationships=[C.SpatialRelationship.BELOW], 24 | description="Is smaller box below bigger box?") 25 | -------------------------------------------------------------------------------- /data/task_scripts/tests/task_validation/task00001.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | import phyre.creator as creator_lib 16 | 17 | 18 | @creator_lib.define_task 19 | def build_task(C): 20 | b1 = C.add_box(50, 50).set_bottom(1).set_left(70) 21 | b2 = C.add_box(100, 50).set_bottom(1).set_left(150) 22 | C.update_task(body1=b1, body2=b2, 23 | relationships=[C.SpatialRelationship.LEFT_OF], 24 | description="Is smaller box left of bigger box?") 25 | -------------------------------------------------------------------------------- /data/task_scripts/tests/task_validation/task00002.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | import phyre.creator as creator_lib 16 | 17 | 18 | @creator_lib.define_task 19 | def build_task(C): 20 | b1 = C.add_box(50, 50).set_bottom(0).set_left(200) 21 | b2 = C.add_box(100, 50).set_bottom(0).set_left(50) 22 | C.update_task(body1=b1, body2=b2, 23 | relationships=[C.SpatialRelationship.RIGHT_OF], 24 | description="Is smaller box right of bigger box?") 25 | -------------------------------------------------------------------------------- /data/task_scripts/tests/task_validation/task00006.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | import phyre.creator as creator_lib 16 | 17 | 18 | @creator_lib.define_task 19 | def build_task(C): 20 | b1 = C.add_box(50, 50).set_bottom(0).set_left(150) 21 | b2 = C.add_box(50, 50).set_bottom(b1.top).set_left(125) 22 | b3 = C.add_box(50, 50).set_bottom(b2.top).set_left(125) 23 | C.update_task(body1=b1, body2=b3, 24 | relationships=[C.SpatialRelationship.NOT_TOUCHING]) 25 | -------------------------------------------------------------------------------- /data/task_scripts/tests/task_validation/task00005.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | import phyre.creator as creator_lib 16 | 17 | 18 | @creator_lib.define_task 19 | def build_task(C): 20 | b1 = C.add_box(50, 50).set_bottom(150).set_left(150) 21 | b2 = C.add_box(100, 50).set_bottom(0).set_left(125) 22 | C.update_task(body1=b1, body2=b2, 23 | relationships=[C.SpatialRelationship.TOUCHING], 24 | description="Is smaller box touching bigger box?") 25 | -------------------------------------------------------------------------------- /src/if/shared.thrift: -------------------------------------------------------------------------------- 1 | // Copyright (c) Facebook, Inc. and its affiliates. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | namespace cpp shared 16 | 17 | exception Error_message { 18 | 1: i32 errorNo, 19 | 2: string errorMsg 20 | } 21 | 22 | enum Color { 23 | WHITE = 0, 24 | 25 | BLACK = 6, 26 | GRAY = 5, 27 | 28 | GREEN = 2, 29 | BLUE = 3, 30 | PURPLE = 4, 31 | 32 | RED = 1, 33 | // Auxilary colors. Not used for task description. 34 | LIGHT_RED = 7, 35 | } 36 | 37 | // Colors with indices above won't be rendered. 38 | const Color USER_BODY_COLOR = Color.RED -------------------------------------------------------------------------------- /src/python/phyre/settings.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | import pathlib 16 | 17 | PHYRE_DIR = pathlib.Path(__file__).parent 18 | DATA_DIR = PHYRE_DIR / 'data' 19 | TASK_DIR = DATA_DIR / 'generated_tasks' 20 | VIRTUAL_TOOLS_DIR = DATA_DIR / 'virtual_tools' 21 | TASK_EVAL_DIR = DATA_DIR / 'evaluations' 22 | TASK_SCRIPTS_DIR = DATA_DIR / 'task_scripts' / 'main' 23 | TASK_SOLUTION_POWER_DIR = DATA_DIR / 'solution_power' 24 | SOLUTION_DIR = DATA_DIR / 'solutions' 25 | HTML_DIR = PHYRE_DIR / 'viz_static_file' 26 | TASK_CHECKSUM = TASK_DIR / 'checksum.json' 27 | -------------------------------------------------------------------------------- /data/task_scripts/main/task00241.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | import phyre.creator as creator_lib 16 | 17 | 18 | @creator_lib.define_task 19 | def build_task(C): 20 | 21 | scene_width = C.scene.width 22 | scene_height = C.scene.height 23 | 24 | C.add('dynamic jar', scale=0.6) \ 25 | .set_center_x(scene_width / 2.) \ 26 | .set_bottom(0.) 27 | 28 | ball = C.add('dynamic ball', scale=0.1) \ 29 | .set_center(0.5 * scene_width, 0.9 * scene_height) 30 | 31 | C.update_task(body1=ball, 32 | body2=C.bottom_wall, 33 | relationships=[C.SpatialRelationship.TOUCHING]) 34 | -------------------------------------------------------------------------------- /src/simulator/utils/timer.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) Facebook, Inc. and its affiliates. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | #ifndef UTILS_TIMER_H 15 | #define UTILS_TIMER_H 16 | #include 17 | 18 | struct SimpleTimer { 19 | SimpleTimer() { start = std::chrono::steady_clock::now(); } 20 | 21 | double GetSeconds() { 22 | const auto finish = std::chrono::steady_clock::now(); 23 | const auto counts = 24 | std::chrono::duration_cast(finish - start) 25 | .count(); 26 | const double seconds = static_cast(counts) / 1000; 27 | start = finish; 28 | return seconds; 29 | } 30 | 31 | std::chrono::time_point start; 32 | }; 33 | 34 | #endif // UTILS_TIMER_H 35 | -------------------------------------------------------------------------------- /src/simulator/creator.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) Facebook, Inc. and its affiliates. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | #ifndef CREATOR_H_ 15 | #define CREATOR_H_ 16 | 17 | #include "gen-cpp/scene_types.h" 18 | 19 | bool cmpIntVector(const ::scene::IntVector& a, const ::scene::IntVector& b); 20 | 21 | ::scene::Vector getVector(float x, float y); 22 | 23 | ::scene::IntVector getIntVector(int x, int y); 24 | 25 | // Angle is in radians. 26 | ::scene::Body buildBox(float x, float y, float width, float height, 27 | float angle = 0, bool dynamic = true); 28 | 29 | ::scene::Body buildPolygon(float x, float y, 30 | const std::vector<::scene::Vector>& vertices, 31 | float angle = 0, bool dynamic = true); 32 | 33 | ::scene::Body buildCircle(float x, float y, float radius, bool dynamic = true); 34 | 35 | #endif // CREATOR_H_ 36 | -------------------------------------------------------------------------------- /src/python/phyre/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | from typing import Tuple 16 | 17 | from phyre import action_mappers as _action_mappers 18 | from phyre.creator.constants import NUM_COLORS, SCENE_HEIGHT, SCENE_WIDTH 19 | from phyre.metrics import get_fold, list_eval_setups, eval_setup_to_action_tier, Evaluator, MAIN_EVAL_SETUPS, MAX_TEST_ATTEMPTS 20 | from phyre.action_simulator import initialize_simulator, ActionSimulator, SimulationStatus 21 | from phyre.objects_util import featurized_objects_vector_to_raster 22 | from phyre.simulation import FeaturizedObjects, Simulation 23 | from phyre.simulation_cache import SimulationCache, get_default_100k_cache 24 | from phyre.vis import observations_to_float_rgb, observations_to_uint8_rgb 25 | 26 | ACTION_TIERS: Tuple[str] = tuple(sorted(_action_mappers.MAIN_ACITON_MAPPERS)) 27 | """List of action tiers in phyre. 28 | """ 29 | -------------------------------------------------------------------------------- /data/task_scripts/main/task00245.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | import phyre.creator as creator_lib 16 | 17 | 18 | @creator_lib.define_task 19 | def build_task(C): 20 | 21 | scene_width = C.scene.width 22 | scene_height = C.scene.height 23 | 24 | # Add two bars that are supposed to touch each other. 25 | bar1 = C.add('dynamic bar', scale=0.25) \ 26 | .set_angle(90.) \ 27 | .set_bottom(0.) \ 28 | .set_left(.3 * scene_width) 29 | bar2 = C.add('dynamic bar', scale=0.25) \ 30 | .set_angle(90.) \ 31 | .set_bottom(0.) \ 32 | .set_left(.7 * scene_width) 33 | 34 | # Add obstacle. 35 | C.add('static bar', scale=0.6) \ 36 | .set_center_x(0.5 * scene_width) \ 37 | .set_bottom(0.5 * scene_height) 38 | 39 | # Create task. 40 | C.update_task(body1=bar1, 41 | body2=bar2, 42 | relationships=[C.SpatialRelationship.TOUCHING]) 43 | -------------------------------------------------------------------------------- /src/simulator/task_io.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) Facebook, Inc. and its affiliates. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | #ifndef TASK_IO_H 15 | #define TASK_IO_H 16 | 17 | #include 18 | #include 19 | #include 20 | 21 | #include "gen-cpp/shared_types.h" 22 | #include "gen-cpp/task_types.h" 23 | 24 | constexpr char kTaskFolder[] = "data/generated_tasks"; 25 | 26 | std::filesystem::path getTasksPath(const char* taskFolder); 27 | 28 | std::vector listTasks(const char* taskFolder = kTaskFolder); 29 | 30 | task::Task getTaskFromId(const int32_t pTaskId, 31 | const char* taskFolder = kTaskFolder); 32 | 33 | task::Task getTaskFromPath(const std::string& file_path); 34 | 35 | void dumpInputPointsToFile(const std::vector<::scene::IntVector>& input_points, 36 | const std::string& filename); 37 | 38 | std::vector<::scene::IntVector> readInputPointsFromFile( 39 | const std::string& filename); 40 | 41 | #endif // TASK_IO_H 42 | -------------------------------------------------------------------------------- /data/task_scripts/tests/user_input/task00045.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | import phyre.creator as creator_lib 16 | 17 | 18 | @creator_lib.define_task 19 | def build_task(C): 20 | 21 | # set properties of objects: 22 | scene_width = C.scene.width 23 | scene_height = C.scene.height 24 | width = scene_width / 1.5 25 | height = scene_height / 5. 26 | thickness = scene_width / 50. 27 | 28 | # add two boxes: 29 | box1 = C.add_box(thickness, height, dynamic=True) \ 30 | .set_bottom(0.) \ 31 | .set_left(.3 * scene_width) 32 | box2 = C.add_box(thickness, height, dynamic=True) \ 33 | .set_bottom(0.) \ 34 | .set_left(.7 * scene_width) 35 | 36 | # add static box: 37 | C.add_box(width, thickness, dynamic=False) \ 38 | .set_bottom(scene_height / 2.) \ 39 | .set_left((scene_width - width) / 2.) 40 | 41 | # create assignment: 42 | C.update_task(body1=box1, body2=box2, 43 | relationships=[C.SpatialRelationship.TOUCHING]) 44 | -------------------------------------------------------------------------------- /data/task_scripts/main/task00202.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | import phyre.creator as creator_lib 16 | 17 | 18 | @creator_lib.define_task 19 | def build_task(C): 20 | 21 | # Set properties of obstacles. 22 | scene_width = C.scene.width 23 | scene_height = C.scene.height 24 | 25 | # Add obstacle to scene. 26 | obstacle = C.add('static bar', scale=0.6) \ 27 | .set_bottom(scene_height * 0.6) \ 28 | .set_left(0.) 29 | 30 | # Add jar. 31 | jar = C.add('dynamic jar', scale=0.3) \ 32 | .set_bottom(0.) \ 33 | .set_left(scene_width / 2.) 34 | phantom_vertices = jar.get_phantom_vertices() 35 | 36 | # Add ball. 37 | ball = C.add('dynamic ball', scale=0.1) 38 | ball.set( 39 | left=obstacle.right - ball.width, 40 | bottom=obstacle.top + C.scene.height // 5) 41 | 42 | # Create task. 43 | C.update_task( 44 | body1=ball, 45 | body2=jar, 46 | relationships=[C.SpatialRelationship.INSIDE], 47 | phantom_vertices=phantom_vertices) 48 | -------------------------------------------------------------------------------- /data/task_scripts/main/task00204.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | import phyre.creator as creator_lib 16 | 17 | 18 | @creator_lib.define_task 19 | def build_task(C): 20 | 21 | # Create boxes. 22 | base_width = 0.1 23 | base = C.add('dynamic bar', scale=base_width).set(bottom=0, left=5) 24 | for i in range(5): 25 | left = C.add( 26 | 'dynamic bar', 27 | scale=1 / 32, 28 | angle=90, 29 | bottom=base.top, 30 | left=base.left) 31 | C.add( 32 | 'dynamic bar', 33 | scale=1 / 32, 34 | angle=90, 35 | bottom=base.top, 36 | right=base.right) 37 | base = C.add( 38 | 'dynamic bar', scale=base_width, bottom=left.top, left=base.left) 39 | 40 | # Create ball. 41 | ball = C.add('dynamic ball', scale=0.1) 42 | ball.set(left=ball.width / 2, bottom=base.top + 20) 43 | 44 | # Create task. 45 | C.update_task( 46 | body1=ball, body2=base, relationships=[C.SpatialRelationship.LEFT_OF]) 47 | -------------------------------------------------------------------------------- /data/task_scripts/main/task00218.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | """A terrible hard one.""" 16 | import phyre.creator as creator_lib 17 | 18 | 19 | @creator_lib.define_task 20 | def build_task(C): 21 | 22 | scene_width = C.scene.width 23 | 24 | radius = 5 25 | 26 | # Add jar. 27 | jar = C.add( 28 | 'dynamic jar', 29 | scale=2 / 1.2 * 4 * radius / scene_width, 30 | center_x=0.5 * scene_width, 31 | bottom=0) 32 | 33 | # Add obstacle. 34 | obstacle = C.add( 35 | 'static bar', 36 | scale=90 / scene_width, 37 | center_x=0.5 * scene_width, 38 | bottom=jar.top + radius * 2) 39 | 40 | # Add ball: 41 | ball = C.add( 42 | 'dynamic ball', 43 | scale=radius / scene_width * 2, 44 | left=obstacle.left + 10, 45 | bottom=obstacle.top + radius) 46 | 47 | # Add task. 48 | C.update_task( 49 | body1=ball, 50 | body2=jar, 51 | relationships=[C.SpatialRelationship.INSIDE], 52 | phantom_vertices=jar.phantom_vertices) 53 | -------------------------------------------------------------------------------- /src/python/phyre/tests/generated_tasks_test.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | import json 16 | import unittest 17 | 18 | import phyre.loader 19 | import phyre.settings 20 | 21 | 22 | class GeneratedTaskTestCase(unittest.TestCase): 23 | """Generated tasks checksum matches.""" 24 | 25 | def test_task_checksum_matches(self): 26 | template_dict = phyre.loader.load_compiled_template_dict() 27 | with phyre.settings.TASK_CHECKSUM.open() as f: 28 | hashes = json.load(f) 29 | for template_id, template_tasks in template_dict.items(): 30 | new_hash = phyre.util.compute_tasks_hash(template_tasks) 31 | assert new_hash == hashes[template_id], ( 32 | 'Hash of tasks for template ' 33 | f'{template_id} doesn\'t match') 34 | assert template_dict.keys() == hashes.keys(), ( 35 | f'Found template ids {set(hashes.keys() - template_dict.keys())}' 36 | ' in hashed tasks not in generated tasks') 37 | 38 | 39 | if __name__ == '__main__': 40 | unittest.main() 41 | -------------------------------------------------------------------------------- /data/task_scripts/main/task00207.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | """A simpler version of task 18.""" 16 | import phyre.creator as creator_lib 17 | 18 | 19 | @creator_lib.define_task 20 | def build_task(C): 21 | 22 | scene_width = C.scene.width 23 | 24 | radius = 5 25 | 26 | # Add jar. 27 | jar = C.add( 28 | 'dynamic jar', 29 | scale=2 / 1.2 * 4 * radius / scene_width, 30 | center_x=0.5 * scene_width, 31 | bottom=0) 32 | 33 | # Add obstacle. 34 | obstacle = C.add( 35 | 'static bar', 36 | scale=90 / scene_width, 37 | center_x=0.5 * scene_width, 38 | bottom=jar.top + radius * 4) 39 | 40 | # Add ball: 41 | ball = C.add( 42 | 'dynamic ball', 43 | scale=radius / scene_width * 2, 44 | left=obstacle.left + 10, 45 | bottom=obstacle.top + radius) 46 | 47 | # Add task. 48 | C.update_task( 49 | body1=ball, 50 | body2=jar, 51 | relationships=[C.SpatialRelationship.INSIDE], 52 | phantom_vertices=jar.phantom_vertices) 53 | -------------------------------------------------------------------------------- /data/task_scripts/main/task00201.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | import phyre.creator as creator_lib 16 | 17 | 18 | @creator_lib.define_task 19 | def build_task(C): 20 | 21 | # Set properties of obstacles. 22 | scene_width = C.scene.width 23 | scene_height = C.scene.height 24 | 25 | # Define obstacles in scene. 26 | # `C.add()` sets immutable, `obj.set_*()` sets mutable properties. 27 | C.add('static bar', scale=0.5) \ 28 | .set_bottom(0.4 * scene_height) \ 29 | .set_left(0.) 30 | C.add('static bar', scale=0.5) \ 31 | .set_bottom(0.7 * scene_height) \ 32 | .set_right(scene_width) 33 | C.add('dynamic jar', scale=0.2) \ 34 | .set_angle(180.) \ 35 | .set_center_x(scene_width / 2.) \ 36 | .set_bottom(0.) 37 | ball = C.add('dynamic ball', scale=0.1) \ 38 | .set_center(scene_width / 2., scene_height * 0.95) 39 | 40 | # Create task. 41 | C.update_task(body1=ball, 42 | body2=C.bottom_wall, 43 | relationships=[C.SpatialRelationship.TOUCHING]) 44 | -------------------------------------------------------------------------------- /data/task_scripts/main/task00248.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | import phyre.creator as creator_lib 16 | 17 | 18 | @creator_lib.define_task 19 | def build_task(C): 20 | 21 | scene_width = C.scene.width 22 | scene_height = C.scene.height 23 | 24 | # Add jar. 25 | jar = C.add('dynamic jar', scale=0.2, center_x=0.50 * scene_width, bottom=0) 26 | 27 | # Add obstacle bars. 28 | C.add('static bar', scale=0.5) \ 29 | .set_angle(-20.) \ 30 | .set_bottom(0.3 * scene_height) \ 31 | .set_right(1.01 * scene_width) 32 | C.add('static bar', scale=0.5) \ 33 | .set_angle(20.) \ 34 | .set_bottom(0.5 * scene_height) \ 35 | .set_left(-0.01 * scene_width) 36 | 37 | # Add ball. 38 | ball = C.add('dynamic ball', scale=0.1) \ 39 | .set_center_x(scene_width / 2.) \ 40 | .set_bottom(0.9 * scene_height) 41 | 42 | # create assignment. 43 | C.update_task(body1=ball, 44 | body2=jar, 45 | relationships=[C.SpatialRelationship.INSIDE], 46 | phantom_vertices=jar.phantom_vertices) 47 | -------------------------------------------------------------------------------- /data/task_scripts/tests/benchmark/task00048.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | import phyre.creator as creator_lib 16 | 17 | 18 | @creator_lib.define_task 19 | def build_task(C): 20 | 21 | scene_width = C.scene.width 22 | scene_height = C.scene.height 23 | 24 | # Add jar. 25 | jar = C.add('dynamic jar', scale=0.2) \ 26 | .set_center_x(0.5 * scene_width) \ 27 | .set_bottom(0.) 28 | phantom_vertices = jar.get_phantom_vertices() 29 | 30 | # Add obstacle bars. 31 | C.add('static bar', scale=0.55) \ 32 | .set_angle(-20.) \ 33 | .set_bottom(0.6 * scene_height) \ 34 | .set_right(1.01 * scene_width) 35 | C.add('static bar', scale=0.55) \ 36 | .set_angle(20.) \ 37 | .set_bottom(0.3 * scene_height) \ 38 | .set_left(-0.01 * scene_width) 39 | 40 | # Add ball. 41 | ball = C.add('dynamic ball', scale=0.1) \ 42 | .set_center_x(scene_width / 2.) \ 43 | .set_bottom(0.9 * scene_height) 44 | 45 | # create assignment. 46 | C.update_task(body1=ball, 47 | body2=jar, 48 | relationships=[C.SpatialRelationship.INSIDE], 49 | phantom_vertices=phantom_vertices) 50 | -------------------------------------------------------------------------------- /data/task_scripts/main/task00203.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | import phyre.creator as creator_lib 16 | 17 | 18 | @creator_lib.define_task 19 | def build_task(C): 20 | # This is a beam balancing task. It is relatively easy. There are two 21 | # tested solutions: 22 | # 23 | # 1) Draw an object under the left side fo the beam to prop it up 24 | # 2) Draw a counter-balance that lands on the right side of the beam 25 | 26 | scene_width = C.scene.width 27 | fulcrum = C.add('static ball', scale=0.1) 28 | radius = fulcrum.width / 2 29 | fulcrum.set_left(scene_width / 2. - radius) \ 30 | .set_bottom(0.) 31 | beam = C.add('dynamic bar', scale=0.35) \ 32 | .set_center_x(scene_width / 2.) \ 33 | .set_bottom(radius * 2.) 34 | ball = C.add('dynamic ball', scale=0.1) \ 35 | .set_left(beam.left) \ 36 | .set_bottom(beam.top) 37 | 38 | # Test against the fulcrum top, not the beam top otherwise it's very hard 39 | # to solve (the beam many rotate a little bit causing it's top to be higher 40 | # than the bottom of the blue ball). 41 | C.update_task(body1=ball, 42 | body2=fulcrum, 43 | relationships=[C.SpatialRelationship.ABOVE]) 44 | -------------------------------------------------------------------------------- /scripts/generate_task_hash.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | import json 16 | 17 | import phyre.loader 18 | import phyre.settings 19 | 20 | 21 | def main(template_ids): 22 | template_dict = phyre.loader.load_compiled_template_dict() 23 | print('Loading hashes') 24 | hashes = {} 25 | if phyre.settings.TASK_CHECKSUM.exists() and template_ids != 'all': 26 | with phyre.settings.TASK_CHECKSUM.open() as f: 27 | hashes = json.load(f) 28 | print('Hashing templates') 29 | template_ids = (template_ids.split(',') 30 | if template_ids != 'all' else template_dict.keys()) 31 | for template_id in template_ids: 32 | new_hash = phyre.util.compute_tasks_hash(template_dict[template_id]) 33 | hashes[template_id] = new_hash 34 | with open(phyre.settings.TASK_CHECKSUM, 'w') as f: 35 | json.dump(hashes, f, indent=2, sort_keys=True) 36 | 37 | 38 | if __name__ == "__main__": 39 | import argparse 40 | parser = argparse.ArgumentParser() 41 | parser.add_argument( 42 | '--template-ids', 43 | dest='template_ids', 44 | required=True, 45 | help='Comma separated list of template ids to hash. Use "all" to' 46 | ' hash all templates') 47 | main(**vars(parser.parse_args())) 48 | -------------------------------------------------------------------------------- /scripts/offline_simulation/save_action_space.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | import joblib 16 | import numpy as np 17 | 18 | import phyre.action_mappers 19 | import phyre.simulation_cache 20 | 21 | 22 | def main(num_actions): 23 | data_folder = phyre.simulation_cache.get_partial_cache_folder(num_actions) 24 | 25 | for tier, action_mapper in phyre.action_mappers.ACTION_MAPPERS.items(): 26 | if tier not in phyre.action_mappers.MAIN_ACITON_MAPPERS: 27 | continue 28 | rng = np.random.RandomState(seed=phyre.simulation_cache.ACTION_SEED) 29 | all_actions = [ 30 | action_mapper().sample(rng=rng) for _ in range(num_actions) 31 | ] 32 | all_actions = np.array(all_actions, 'float32') 33 | tier_folder = data_folder / tier 34 | tier_folder.mkdir(exist_ok=True, parents=True) 35 | path = tier_folder / phyre.simulation_cache.ACTION_FILE_NAME 36 | print('Saving path', path) 37 | joblib.dump(all_actions, path) 38 | 39 | 40 | if __name__ == '__main__': 41 | import argparse 42 | parser = argparse.ArgumentParser() 43 | parser.add_argument('--num-actions', 44 | type=int, 45 | default=phyre.simulation_cache.DEFAULT_NUM_ACTIONS) 46 | main(**vars(parser.parse_args())) 47 | -------------------------------------------------------------------------------- /src/simulator/utils/logger.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (c) Facebook, Inc. and its affiliates. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | #include "logger.h" 15 | 16 | using namespace std; 17 | 18 | LOG_LEVEL Logger::mLogLevel = LOG_LEVEL::ERROR; 19 | std::ostream* Logger::mOutStream = &(std::cout); 20 | bool Logger::mColorEnabled = true; 21 | 22 | std::string getColorHexString(const Color_value& color) { 23 | switch (color) { 24 | case Color_value::RED: 25 | return "\033[1;31m"; 26 | case Color_value::GREEN: 27 | return "\033[1;32m"; 28 | case Color_value::CYAN: 29 | return "\033[1;34m"; 30 | case Color_value::BLUE: 31 | return "\033[1;36m"; 32 | case Color_value::COLOR_END: 33 | return "\033[0m"; 34 | case Color_value::DEFAULT: 35 | return ""; 36 | default: 37 | return ""; 38 | } 39 | } 40 | 41 | std::string LogLevelToString(const LOG_LEVEL pLogLevel) { 42 | switch (pLogLevel) { 43 | case ERROR: 44 | return "ERROR"; 45 | case INFO: 46 | return "INFO"; 47 | case DEBUG: 48 | return "DEBUG"; 49 | default: 50 | return ""; 51 | } 52 | } 53 | 54 | LOG_LEVEL StrToLogLevel(const std::string& str) { 55 | if (str == "INFO" || str == "info") { 56 | return LOG_LEVEL::INFO; 57 | } 58 | if (str == "DEBUG" || str == "debug") { 59 | return LOG_LEVEL::DEBUG; 60 | } 61 | return LOG_LEVEL::ERROR; 62 | } 63 | -------------------------------------------------------------------------------- /data/task_scripts/main/task00205.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | import phyre.creator as creator_lib 16 | 17 | 18 | @creator_lib.define_task 19 | def build_task(C): 20 | 21 | # Create boxes. 22 | base = C.add('dynamic bar', scale=0.2) \ 23 | .set_bottom(0.) \ 24 | .set_left(.4 * C.scene.width) 25 | offset = .01 * C.scene.width 26 | for i in range(8): 27 | left = C.add('dynamic bar', scale=0.07) \ 28 | .set_angle(90.) \ 29 | .set_bottom(base.top) \ 30 | .set_left(base.left + offset) 31 | C.add('dynamic bar', scale=0.07) \ 32 | .set_angle(90.) \ 33 | .set_bottom(base.top) \ 34 | .set_right(base.right - offset) 35 | base = C.add('dynamic bar', scale=0.2) \ 36 | .set_bottom(left.top) \ 37 | .set_left(base.left) 38 | task_body2 = base 39 | 40 | # Create balls. 41 | for i in range(1, 3): 42 | ball = C.add('dynamic ball', scale=0.1) 43 | ball.set_center(base.left + (i - 1) * 1.5 * ball.width, 44 | base.top + i * 1. * ball.width) 45 | if i == 1: 46 | task_body1 = ball 47 | 48 | # Create task. 49 | C.update_task(body1=task_body1, 50 | body2=task_body2, 51 | relationships=[C.SpatialRelationship.ABOVE]) 52 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing to PHYRE 2 | 3 | The project contains the set of tasks, interface to the simulator, and a 4 | collections of baseline agents. While we would like to keep the API and set 5 | of tasks stable for reproducibility reasons, we are welcome bug fixes and 6 | performance improvements. 7 | 8 | ## Pull Requests 9 | We actively welcome your pull requests. 10 | 11 | 1. Fork the repo and create your branch from `master`. 12 | 2. If you've added code that should be tested, add tests. 13 | 3. Ensure the test suite passes. 14 | 4. Make sure your code lints. Use `clang` and `yapf (version 0.28.0)` to automatically format your code. 15 | 5. If you haven't already, complete the Contributor License Agreement ("CLA"). 16 | 17 | 18 | ## Contributor License Agreement ("CLA") 19 | In order to accept your pull request, we need you to submit a CLA. You only need 20 | to do this once to work on any of Facebook's open source projects. 21 | 22 | Complete your CLA here: 23 | 24 | ## Issues 25 | We use GitHub issues for general feature discussion, Q&A and public bugs tracking. 26 | Please ensure your description is clear and has sufficient instructions to be able to 27 | reproduce the issue or understand the problem. 28 | 29 | Facebook has a [bounty program](https://www.facebook.com/whitehat/) for the safe 30 | disclosure of security bugs. In those cases, please go through the process 31 | outlined on that page and do not file a public issue. 32 | 33 | ## Coding Style 34 | We try to follow the [Google style guide](http://google.github.io/styleguide/pyguide.html) 35 | and use [YAPF](https://github.com/google/yapf) to automatically format our Python code. 36 | For C++ code with use `clang-format`. You should run the 37 | `scripts/clang_format.sh` script before you submit. 38 | 39 | ## License 40 | By contributing to PHYRE, you agree that your contributions will be licensed 41 | under the LICENSE file in the root directory of this source tree. 42 | -------------------------------------------------------------------------------- /data/task_scripts/main/task00247.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | import phyre.creator as creator_lib 16 | 17 | 18 | @creator_lib.define_task 19 | def build_task(C): 20 | 21 | scene_width = C.scene.width 22 | scene_height = C.scene.height 23 | 24 | # Add static bar. 25 | bar = C.add('static bar', scale=0.5) \ 26 | .set_left(scene_width / 2.) \ 27 | .set_bottom(scene_width / 2.) 28 | 29 | # Add jar on top of bar. 30 | cover = C.add('dynamic jar', scale=0.2) \ 31 | .set_angle(180.0) \ 32 | .set_left(scene_width / 2.) \ 33 | .set_bottom(bar.top) 34 | 35 | # Add jar on ground. 36 | jar = C.add('dynamic jar', scale=0.2) \ 37 | .set_center_x(scene_width / 4.) \ 38 | .set_bottom(0.) 39 | phantom_vertices = jar.get_phantom_vertices() 40 | 41 | # Add balls. 42 | C.add('dynamic ball', scale=0.1) \ 43 | .set_center_x(cover.left + cover.width / 2.) \ 44 | .set_bottom(0.9 * scene_height) 45 | ball = C.add('dynamic ball', scale=0.1) \ 46 | .set_center_x(cover.left + cover.width / 2.) \ 47 | .set_bottom(bar.top) 48 | 49 | # create assignment: 50 | C.update_task(body1=ball, 51 | body2=jar, 52 | relationships=[C.SpatialRelationship.INSIDE], 53 | phantom_vertices=phantom_vertices) 54 | -------------------------------------------------------------------------------- /data/task_scripts/main/task00242.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | import phyre.creator as creator_lib 16 | import math 17 | 18 | 19 | @creator_lib.define_task 20 | def build_task(C): 21 | 22 | # Set properties of objects. 23 | scene_width = C.scene.width 24 | scene_height = C.scene.height 25 | 26 | # Create a bunch of stars (y, x). 27 | stars = [ 28 | # Horizontal "line". 29 | (.5, .3), 30 | (.5, .4), 31 | (.5, .5), 32 | (.5, .6), 33 | (.5, .7), 34 | # Left-hand curve. 35 | (.05, .05 + math.sqrt(.0)), 36 | (.13, .05 + math.sqrt(.01)), 37 | (.25, .05 + math.sqrt(.02)), 38 | # Right-hand curve. 39 | (.05, .95 - math.sqrt(.0)), 40 | (.13, .95 - math.sqrt(.01)), 41 | (.25, .95 - math.sqrt(.02)), 42 | # Random other stars. 43 | (.25, .5), 44 | (.75, .25), 45 | (.75, .75), 46 | ] 47 | for star in stars: 48 | C.add('static ball', scale=0.05) \ 49 | .set_center(scene_width * star[1], scene_height * star[0]) 50 | 51 | # Create ball. 52 | ball = C.add('dynamic ball', scale=0.1) \ 53 | .set_center(0.5 * scene_width, 0.9 * scene_height) 54 | 55 | # Create task. 56 | C.update_task(body1=ball, 57 | body2=C.bottom_wall, 58 | relationships=[C.SpatialRelationship.TOUCHING]) 59 | -------------------------------------------------------------------------------- /data/task_scripts/main/task00312.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | """Template task with a ball that should fall into a jar.""" 16 | import phyre.creator as creator_lib 17 | 18 | __JAR_XS = [val * 0.1 for val in range(2, 8)] 19 | __JAR_SCALES = [val * 0.1 for val in range(2, 6)] 20 | __BALL_XS = [val * 0.1 for val in range(1, 8)] 21 | 22 | 23 | @creator_lib.define_task_template( 24 | jar_x=__JAR_XS, jar_scale=__JAR_SCALES, ball_x=__BALL_XS, max_tasks=100) 25 | def build_task(C, jar_x, jar_scale, ball_x): 26 | 27 | # Add jar. 28 | jar = C.add('dynamic jar', scale=jar_scale) \ 29 | .set_left(jar_x * C.scene.width) \ 30 | .set_bottom(0.) 31 | if jar.left < 0. or jar.right > C.scene.width: 32 | raise creator_lib.SkipTemplateParams 33 | phantom_vertices = jar.get_phantom_vertices() 34 | 35 | # Add ball that is not on top of the jar. 36 | ball = C.add('dynamic ball', scale=0.1) \ 37 | .set_center_x(ball_x * C.scene.width) \ 38 | .set_bottom(0.9 * C.scene.height) 39 | if ball.left > jar.left and ball.right < jar.right: 40 | raise creator_lib.SkipTemplateParams 41 | 42 | # Create assignment. 43 | C.update_task(body1=ball, 44 | body2=jar, 45 | relationships=[C.SpatialRelationship.INSIDE], 46 | phantom_vertices=phantom_vertices) 47 | C.set_meta(C.SolutionTier.SINGLE_OBJECT) 48 | -------------------------------------------------------------------------------- /data/task_scripts/main/task00206.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | import phyre.creator as creator_lib 16 | 17 | 18 | @creator_lib.define_task 19 | def build_task(C): 20 | # The solution involves three triangular ramps that direct the ball to 21 | # the target beam. 22 | 23 | # Set properties of obstacles. 24 | scene_width = C.scene.width 25 | scene_height = C.scene.height 26 | 27 | # Add obstacles to the scene. 28 | C.add('static bar', scale=0.6) \ 29 | .set_bottom(0.5 * scene_height) \ 30 | .set_left(0.) 31 | C.add('static bar', scale=0.6) \ 32 | .set_bottom(0.7 * scene_height) \ 33 | .set_right(scene_width) 34 | C.add('static bar', scale=0.7) \ 35 | .set_bottom(0.3 * scene_height) \ 36 | .set_left(0.5 * scene_width) 37 | 38 | # Add ball. 39 | ball = C.add('dynamic ball', scale=0.1) \ 40 | .set_center(0.5 * scene_width, 0.9 * scene_height) 41 | 42 | # Add beam to knock over. 43 | beam1 = C.add('dynamic bar', scale=0.2) \ 44 | .set_angle(90.) \ 45 | .set_bottom(0.) \ 46 | .set_left(0.8 * scene_width) 47 | 48 | # Add other beam. 49 | C.add('dynamic bar', scale=0.2) \ 50 | .set_angle(90.) \ 51 | .set_bottom(0.) \ 52 | .set_left(0.2 * scene_width) 53 | 54 | # Update task. 55 | C.update_task(body1=beam1, 56 | body2=ball, 57 | relationships=[C.SpatialRelationship.TOUCHING]) 58 | -------------------------------------------------------------------------------- /data/task_scripts/main/task00001.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | """A template task with a ball that should touch left or right wall.""" 16 | import numpy as np 17 | import phyre.creator as creator_lib 18 | 19 | 20 | @creator_lib.define_task_template( 21 | ball_x=np.linspace(0.1, 0.9, 32), 22 | ball_y=np.linspace(0, 40, 8), 23 | ball_r=np.linspace(0.05, 0.12, 5), 24 | left=[True, False], 25 | version='6', 26 | ) 27 | def build_task(C, ball_x, ball_y, ball_r, left): 28 | target_wall = C.add('static bar', 1.0, left=0, angle=90, bottom=0) 29 | if not left: 30 | target_wall.set_right(C.scene.width) 31 | 32 | shelf_size = 0.99 - ball_r * 2 33 | shelf = C.add('static bar', shelf_size, center_x=C.scene.width / 2, top=20) 34 | C.add('static bar', 0.2, angle=65, right=shelf.left + 5, top=shelf.top) 35 | C.add('static bar', 0.2, angle=-65, left=shelf.right - 5, top=shelf.top) 36 | 37 | ball = C.add( 38 | 'dynamic ball', 39 | ball_r, 40 | left=ball_x * C.scene.width, 41 | bottom=ball_y + shelf.top) 42 | if ball.center_x <= shelf.left or ball.center_x >= shelf.right: 43 | raise creator_lib.SkipTemplateParams 44 | if abs(ball.center_x - target_wall.center_x) > C.scene.width * .7: 45 | raise creator_lib.SkipTemplateParams 46 | 47 | C.update_task( 48 | body1=ball, 49 | body2=target_wall, 50 | relationships=[C.SpatialRelationship.TOUCHING]) 51 | C.set_meta(C.SolutionTier.BALL) 52 | -------------------------------------------------------------------------------- /data/task_scripts/main/task00311.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | """Template task with a ball that should land on an obstacle bar.""" 16 | import phyre.creator as creator_lib 17 | 18 | __OBSTACLE_WIDTHS = [val * 0.1 for val in range(2, 8)] 19 | __OBSTACLE_XS = [val * 0.1 for val in range(0, 11)] 20 | __BALL_XS = [val * 0.1 for val in range(2, 9)] 21 | 22 | 23 | @creator_lib.define_task_template(obstacle_width=__OBSTACLE_WIDTHS, 24 | obstacle_x=__OBSTACLE_XS, 25 | ball_x=__BALL_XS, 26 | max_tasks=100) 27 | def build_task(C, obstacle_width, obstacle_x, ball_x): 28 | 29 | # Add obstacle. 30 | if obstacle_x + obstacle_width > 1.: 31 | raise creator_lib.SkipTemplateParams 32 | obstacle = C.add('static bar', scale=obstacle_width) \ 33 | .set_left(obstacle_x * C.scene.width) \ 34 | .set_bottom(0.5 * C.scene.height) 35 | 36 | # Add ball centered on top of obstacle. 37 | ball = C.add('dynamic ball', scale=0.1) \ 38 | .set_center_x(ball_x * C.scene.width) \ 39 | .set_bottom(0.9 * C.scene.height) 40 | if ball.left + ball.width > obstacle.left and ball.right - ball.width < obstacle.right: 41 | raise creator_lib.SkipTemplateParams 42 | 43 | # Create assignment. 44 | C.update_task(body1=ball, 45 | body2=obstacle, 46 | relationships=[C.SpatialRelationship.TOUCHING]) 47 | C.set_meta(C.SolutionTier.SINGLE_OBJECT) 48 | -------------------------------------------------------------------------------- /src/simulator/thrift_box2d_conversion.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) Facebook, Inc. and its affiliates. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | #ifndef THRIFT_BOX2D_CONVERSION_H 15 | #define THRIFT_BOX2D_CONVERSION_H 16 | #include 17 | 18 | #include "Box2D/Box2D.h" 19 | #include "gen-cpp/scene_types.h" 20 | #include "image_to_box2d.h" 21 | 22 | constexpr float PIXELS_IN_METER = 6.0; 23 | 24 | struct Box2dData { 25 | enum ObjectType { GENERAL, USER, BOUNDING_BOX }; 26 | size_t object_id; 27 | ObjectType object_type; 28 | }; 29 | 30 | class b2WorldWithData : public b2World { 31 | public: 32 | using b2World::b2World; 33 | 34 | ~b2WorldWithData() {} 35 | 36 | Box2dData* CreateData() { 37 | _data.emplace_back(new Box2dData); 38 | return _data.back().get(); 39 | } 40 | 41 | private: 42 | std::vector> _data; 43 | }; 44 | 45 | std::unique_ptr convertSceneToBox2dWorld( 46 | const ::scene::Scene& scene); 47 | 48 | std::unique_ptr convertSceneToBox2dWorld_with_bounding_boxes( 49 | const ::scene::Scene& scene); 50 | 51 | ::scene::Scene updateSceneFromWorld(const ::scene::Scene& scene, 52 | const b2WorldWithData& world); 53 | 54 | std::vector<::scene::Body> convertInputToSceneBodies( 55 | const std::vector<::scene::IntVector>& input_points, 56 | const std::vector<::scene::Body>& scene_bodies, const unsigned int& height, 57 | const unsigned int& width); 58 | 59 | ::scene::Shape p2mShape(const ::scene::Shape& shape); 60 | 61 | #endif // THRIFT_BOX2D_CONVERSION_H 62 | -------------------------------------------------------------------------------- /data/task_scripts/main/task00015.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | import numpy as np 16 | import math 17 | import phyre.creator as creator_lib 18 | 19 | 20 | def sin(x): 21 | return math.sin(math.radians(x)) 22 | 23 | 24 | @creator_lib.define_task_template( 25 | x=np.linspace(0.2, 0.8, 10), 26 | y=np.linspace(0.2, 0.5, 10), 27 | bar_size=np.linspace(0.05, 0.1, 5), 28 | search_params=dict( 29 | required_flags=['BALL:GOOD_STABLE'], 30 | excluded_flags=['BALL:TRIVIAL'], 31 | diversify_tier='ball', 32 | max_search_tasks=500, 33 | ), 34 | version='2', 35 | ) 36 | def build_task(C, x, y, bar_size): 37 | 38 | scene_width = C.scene.width 39 | scene_height = C.scene.height 40 | 41 | target = C.add('static bar', scale=1.0, left=0, bottom=0) 42 | 43 | angle = 5 44 | eps = 0.001 45 | lbar = C.add('static bar', scale=bar_size, angle=360-angle, 46 | right=x * scene_width, 47 | bottom=y * scene_height) 48 | rbar = C.add('static bar', scale=bar_size, angle=angle, 49 | left=lbar.right, 50 | bottom=lbar.bottom) 51 | ball_bottom = rbar.top - (bar_size * sin(angle) - eps) * scene_height 52 | ball = C.add('dynamic ball', scale=0.1, 53 | center_x=x * scene_width, 54 | bottom=ball_bottom) 55 | 56 | C.update_task( 57 | body1=ball, 58 | body2=target, 59 | relationships=[C.SpatialRelationship.TOUCHING], 60 | ) 61 | C.set_meta(C.SolutionTier.BALL) 62 | -------------------------------------------------------------------------------- /data/task_scripts/main/task00115.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | """Template task in which two sticks need to hit each other.""" 16 | import numpy as np 17 | import phyre.creator as creator_lib 18 | 19 | 20 | @creator_lib.define_task_template( 21 | search_params=dict(require_two_ball_solvable=True), 22 | stick_length=np.linspace(0.2, 0.5, 10), 23 | stick1_x=np.linspace(0.05, 0.95, 19), 24 | stick2_x=np.linspace(0.05, 0.95, 19), 25 | version='2', 26 | ) 27 | def build_task(C, stick_length, stick1_x, stick2_x): 28 | 29 | # Sticks cannot be too close together or too far apart. 30 | if stick2_x <= stick1_x + 1.75 * stick_length: 31 | raise creator_lib.SkipTemplateParams 32 | if stick2_x > stick1_x + 2.5 * stick_length: 33 | raise creator_lib.SkipTemplateParams 34 | 35 | # Add two sticks. 36 | bar1 = C.add('dynamic bar', scale=stick_length) \ 37 | .set_angle(90.) \ 38 | .set_bottom(0.) \ 39 | .set_left(stick1_x * C.scene.width) 40 | bar2 = C.add('dynamic bar', scale=stick_length) \ 41 | .set_angle(90.) \ 42 | .set_bottom(0.) \ 43 | .set_left(stick2_x * C.scene.width) 44 | 45 | # Add horizontal bar that prevents massive balls from dropping. 46 | C.add('static bar', scale=1.0) \ 47 | .set_left(0.) \ 48 | .set_bottom((stick_length + 0.25) * C.scene.height) 49 | 50 | # Create task. 51 | C.update_task( 52 | body1=bar1, body2=bar2, relationships=[C.SpatialRelationship.TOUCHING]) 53 | C.set_meta(C.SolutionTier.TWO_BALLS) 54 | -------------------------------------------------------------------------------- /data/task_scripts/main/task00208.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | import phyre.creator as creator_lib 16 | 17 | 18 | @creator_lib.define_task 19 | def build_task(C): 20 | 21 | scene_width = C.scene.width 22 | scene_height = C.scene.height 23 | 24 | # Add jar. 25 | target_jar = C.add('dynamic jar', scale=0.2) \ 26 | .set_center_x(0.25 * scene_width) \ 27 | .set_bottom(0.) 28 | phantom_vertices = target_jar.get_phantom_vertices() 29 | 30 | # Add small bars. 31 | bar = C.add('static bar', scale=0.1) \ 32 | .set_left(0.33 * scene_width) \ 33 | .set_bottom(0.25 * scene_height) 34 | C.add('static bar', scale=0.1) \ 35 | .set_left(0.33 * scene_width + bar.width) \ 36 | .set_bottom(0.25 * scene_height + 4. * bar.height) 37 | 38 | # Add platform. 39 | platform = C.add('static bar', scale=0.5) \ 40 | .set_left(0.33 * scene_width + 2. * bar.width) \ 41 | .set_bottom(0.25 * scene_height + 8. * bar.height) 42 | 43 | # Add second jar. 44 | source_jar = C.add('dynamic jar', scale=0.2) \ 45 | .set_bottom(platform.top) \ 46 | .set_left(platform.left) 47 | 48 | # Add ball. 49 | ball = C.add('dynamic ball', scale=0.1) \ 50 | .set_center(source_jar.left + 0.5 * source_jar.width, 0.) \ 51 | .set_bottom(source_jar.bottom + 0.02 * scene_height) 52 | 53 | # Create task. 54 | C.update_task( 55 | body1=ball, 56 | body2=target_jar, 57 | relationships=[C.SpatialRelationship.INSIDE], 58 | phantom_vertices=phantom_vertices) 59 | -------------------------------------------------------------------------------- /data/task_scripts/main/task00104.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | """Template task with two balls that must touch rather than fall in jars.""" 16 | import numpy as np 17 | import phyre.creator as creator_lib 18 | 19 | __BALL_SIZE = 0.1 20 | 21 | 22 | @creator_lib.define_task_template( 23 | ball1_x=np.linspace(0.1, 0.9, 8), 24 | ball2_x=np.linspace(0.1, 0.9, 8), 25 | ball1_y=np.linspace(0.5, 0.8, 8), 26 | ball2_y=np.linspace(0.5, 0.8, 8), 27 | version='2', 28 | ) 29 | def build_task(C, ball1_x, ball2_x, ball1_y, ball2_y): 30 | 31 | # Do not generate duplicate tasks or very nearby pairs. 32 | if ball2_x <= ball1_x + .2: 33 | raise creator_lib.SkipTemplateParams 34 | 35 | # Add balls. 36 | ball1 = C.add('dynamic ball', scale=__BALL_SIZE) \ 37 | .set_center_x(ball1_x * C.scene.width) \ 38 | .set_bottom(ball1_y * C.scene.height) 39 | ball2 = C.add('dynamic ball', scale=__BALL_SIZE) \ 40 | .set_center_x(ball2_x * C.scene.width) \ 41 | .set_bottom(ball2_y * C.scene.height) 42 | 43 | # Add jars under the balls. 44 | C.add('dynamic jar', scale=0.15) \ 45 | .set_center_x(ball1.left + (ball1.right - ball1.left) / 2.) \ 46 | .set_bottom(0.) 47 | C.add('dynamic jar', scale=0.15) \ 48 | .set_center_x(ball2.left + (ball2.right - ball2.left) / 2.) \ 49 | .set_bottom(0.) 50 | 51 | # Create task. 52 | C.update_task( 53 | body1=ball1, 54 | body2=ball2, 55 | relationships=[C.SpatialRelationship.TOUCHING]) 56 | C.set_meta(C.SolutionTier.TWO_BALLS) 57 | -------------------------------------------------------------------------------- /data/task_scripts/main/task00002.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | """Template task with a ball that should avoid an obstacle bar to hit ground.""" 16 | import phyre.creator as creator_lib 17 | 18 | __OBSTACLE_WIDTHS = [val * 0.1 for val in range(1, 8)] 19 | __OBSTACLE_YS = [val * 0.1 for val in range(3, 8)] 20 | __OBSTACLE_XS = [val * 0.1 for val in range(0, 11)] 21 | 22 | 23 | @creator_lib.define_task_template( 24 | obstacle_width=__OBSTACLE_WIDTHS, 25 | obstacle_x=__OBSTACLE_XS, 26 | obstacle_y=__OBSTACLE_YS, 27 | search_params=dict( 28 | required_flags=['BALL:GOOD_STABLE'], 29 | excluded_flags=['BALL:TRIVIAL'], 30 | diversify_tier='ball' 31 | ), 32 | max_tasks=100) 33 | def build_task(C, obstacle_width, obstacle_x, obstacle_y): 34 | # Add obstacle. 35 | if obstacle_x + obstacle_width > 1.: 36 | raise creator_lib.SkipTemplateParams 37 | obstacle_x *= C.scene.width 38 | obstacle_y *= C.scene.height 39 | obstacle = C.add('static bar', scale=obstacle_width) \ 40 | .set_left(obstacle_x) \ 41 | .set_bottom(obstacle_y) 42 | 43 | # Add ball centered on top of obstacle. 44 | ball = C.add('dynamic ball', scale=0.1) \ 45 | .set_center_x(obstacle_x + obstacle.width / 2.) \ 46 | .set_bottom(0.9 * C.scene.height) 47 | 48 | bottom_wall = C.add('static bar', 1, bottom=0, left=0) 49 | 50 | # Create assignment. 51 | C.update_task( 52 | body1=ball, 53 | body2=bottom_wall, 54 | relationships=[C.SpatialRelationship.TOUCHING]) 55 | C.set_meta(C.SolutionTier.BALL) 56 | -------------------------------------------------------------------------------- /data/task_scripts/main/task00017.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | import numpy as np 16 | import phyre.creator as creator_lib 17 | 18 | 19 | 20 | @creator_lib.define_task_template( 21 | bar_height=np.linspace(0.2, 0.5, 5), 22 | bar_x=np.linspace(0.2, 0.8, 5), 23 | ball_size=np.linspace(0.05, 0.25, 5), 24 | ramp_size=np.linspace(0.05, 0.2, 5), 25 | search_params=dict( 26 | required_flags=['BALL:GOOD_STABLE'], 27 | excluded_flags=['BALL:TRIVIAL'], 28 | diversify_tier='ball', 29 | ), 30 | version='2', 31 | ) 32 | def build_task(C, bar_height, bar_x, ball_size, ramp_size): 33 | scene_width = C.scene.width 34 | scene_height = C.scene.height 35 | 36 | target = C.add('static bar', scale=1.0, left=0, bottom=0) 37 | bar = C.add('dynamic bar', angle=90, scale=bar_height, 38 | center_x=bar_x * scene_width, bottom=target.top) 39 | 40 | ball = C.add('dynamic ball', scale=ball_size, bottom=bar.top, 41 | center_x=bar.center_x) 42 | 43 | eps = 0.01 * scene_height 44 | 45 | ramp_angle = 45 46 | ceil = C.add('static bar', scale=1.0, left=0, bottom=ball.top + eps) 47 | lramp = C.add('static bar', angle=360 - ramp_angle, scale=ramp_size, 48 | left=0, bottom=target.top) 49 | rramp = C.add('static bar', angle=ramp_angle, scale=ramp_size, 50 | right=scene_width, bottom=target.top) 51 | 52 | C.update_task( 53 | body1=ball, 54 | body2=target, 55 | relationships=[C.SpatialRelationship.TOUCHING], 56 | ) 57 | C.set_meta(C.SolutionTier.BALL) 58 | -------------------------------------------------------------------------------- /data/task_scripts/main/task00005.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | """Template task with a ball that should not fall into a jar.""" 16 | import phyre.creator as creator_lib 17 | 18 | __JAR_XS = [val * 0.1 for val in range(2, 8)] 19 | __JAR_YS = [val * 0.1 for val in range(0, 3)] 20 | __JAR_SCALES = [val * 0.05 for val in range(3, 9)] 21 | __BALL_YS = [val * 0.1 for val in range(7, 10)] 22 | 23 | 24 | @creator_lib.define_task_template( 25 | jar_x=__JAR_XS, 26 | jar_y=__JAR_YS, 27 | jar_scale=__JAR_SCALES, 28 | ball_y=__BALL_YS, 29 | search_params=dict( 30 | required_flags=['BALL:GOOD_STABLE'], 31 | diversify_tier='ball' 32 | ), 33 | version='3') 34 | def build_task(C, jar_x, jar_y, jar_scale, ball_y): 35 | 36 | # Add bottom wall. 37 | bottom_wall = C.add('static bar', scale=1.0, bottom=0., left=0.) 38 | 39 | # Add jar. 40 | jar = C.add('dynamic jar', 41 | scale=jar_scale, 42 | bottom=bottom_wall.top + jar_y * C.scene.height, 43 | left=jar_x * C.scene.width) 44 | if jar.left < 0. or jar.right > C.scene.width: 45 | raise creator_lib.SkipTemplateParams 46 | 47 | # Add ball that hovers over the jar. 48 | ball = C.add('dynamic ball', 49 | scale=0.1, 50 | bottom=ball_y * C.scene.height, 51 | center_x=jar.left + jar.width / 2.) 52 | 53 | # Create assignment. 54 | C.update_task(body1=ball, 55 | body2=bottom_wall, 56 | relationships=[C.SpatialRelationship.TOUCHING]) 57 | C.set_meta(C.SolutionTier.BALL) 58 | -------------------------------------------------------------------------------- /data/task_scripts/main/task00259.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | """Template task in which to sticks need to hit each other.""" 16 | 17 | import phyre.creator as creator_lib 18 | import numpy as np 19 | 20 | @creator_lib.define_task_template( 21 | search_params=dict(require_two_ball_solvable=True), 22 | dist1 = np.linspace(0.05, 0.3, 4), 23 | dist2 = np.linspace(0.05, 0.3, 4), 24 | bar1_height = np.linspace(0.08, 0.12, 3), 25 | bar2_height = np.linspace(0.08, 0.12, 3), 26 | version="2") 27 | def build_task(C, dist1, dist2, bar1_height, bar2_height): 28 | # Add two sticks. 29 | margin=0.2 30 | bar1 = C.add('dynamic bar', scale=0.4) \ 31 | .set_angle(90.) \ 32 | .set_bottom(0.) \ 33 | .set_left(margin*C.scene.width) 34 | bar2 = C.add('dynamic bar', scale=0.4) \ 35 | .set_angle(90.) \ 36 | .set_bottom(0.) \ 37 | .set_left((1-margin)*C.scene.width) 38 | 39 | # Add small bar for target bar to vault over 40 | C.add('static bar', scale=bar1_height) \ 41 | .set_angle(90.) \ 42 | .set_bottom(0.) \ 43 | .set_left((dist1+margin)*C.scene.width) 44 | 45 | # Add small bar for target bar to vault over 46 | C.add('static bar', scale=bar2_height) \ 47 | .set_angle(90.) \ 48 | .set_bottom(0.) \ 49 | .set_left( (1-(dist2+margin))*C.scene.width) 50 | 51 | 52 | # Create task. 53 | C.update_task(body1=bar1, 54 | body2=bar2, 55 | relationships=[C.SpatialRelationship.TOUCHING]) 56 | C.set_meta(C.SolutionTier.PRE_TWO_BALLS) 57 | -------------------------------------------------------------------------------- /data/task_scripts/main/task00000.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | """Template task in which two balls should touch each other.""" 16 | import numpy as np 17 | import phyre.creator as creator_lib 18 | 19 | 20 | @creator_lib.define_task_template( 21 | ball1_x=np.linspace(0.05, 0.95, 19), 22 | ball2_x=np.linspace(0.05, 0.95, 19), 23 | ball1_r=np.linspace(0.06, 0.12, 3), 24 | ball2_r=np.linspace(0.06, 0.12, 3), 25 | height=np.linspace(0.2, 0.8, 5), 26 | search_params=dict(required_flags=['BALL:GOOD_STABLE']), 27 | version='2', 28 | ) 29 | def build_task(C, ball1_x, ball2_x, ball1_r, ball2_r, height): 30 | 31 | # Task definition is symmetric. 32 | if ball2_x <= ball1_x: 33 | raise creator_lib.SkipTemplateParams 34 | 35 | # Add two balls. 36 | ball1 = C.add( 37 | 'dynamic ball', 38 | scale=ball1_r, 39 | center_x=ball1_x * C.scene.width, 40 | bottom=height * C.scene.height) 41 | ball2 = C.add( 42 | 'dynamic ball', 43 | scale=ball2_r, 44 | center_x=ball2_x * C.scene.width, 45 | bottom=height * C.scene.height) 46 | if (ball2.left - ball1.right) < max(ball1_r, ball2_r) * C.scene.width: 47 | raise creator_lib.SkipTemplateParams 48 | if ball1.left <= 0: 49 | raise creator_lib.SkipTemplateParams 50 | if ball2.right >= C.scene.width - 1: 51 | raise creator_lib.SkipTemplateParams 52 | 53 | # Create assignment: 54 | C.update_task( 55 | body1=ball1, 56 | body2=ball2, 57 | relationships=[C.SpatialRelationship.TOUCHING]) 58 | C.set_meta(C.SolutionTier.BALL) 59 | -------------------------------------------------------------------------------- /data/task_scripts/main/task00003.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | """Template task in which the agent should knock a vertical bar against the wall.""" 16 | import numpy as np 17 | import phyre.creator as creator_lib 18 | 19 | 20 | @creator_lib.define_task_template( 21 | jar_x=np.linspace(0.05, 0.95, 20), 22 | bar_scale=np.linspace(0.2, 0.5, 4), 23 | jitter_x=np.linspace(-2, 2, 5), 24 | search_params=dict(required_flags=['BALL:GOOD_STABLE']), 25 | version='2') 26 | def build_task(C, jar_x, bar_scale, jitter_x): 27 | 28 | # Up side down jar as a vase for the bar. 29 | vase = C.add( 30 | 'dynamic jar', 31 | scale=0.1, 32 | angle=0, 33 | bottom=0, 34 | center_x=jar_x * C.scene.width) 35 | 36 | # Add vertical bar. 37 | bar = C.add( 38 | 'dynamic bar', 39 | scale=bar_scale, 40 | angle=90, 41 | center_x=vase.center_x + jitter_x, 42 | bottom=4) 43 | 44 | if vase.left <= bar.width or vase.right >= C.scene.width - 1 - bar.width: 45 | raise creator_lib.SkipTemplateParams 46 | 47 | # Create assignment: 48 | max_offset = 40 49 | if bar.height + max_offset > bar.left: 50 | wall = C.add('static bar', 1.0, left=0, angle=90, bottom=0) 51 | elif bar.height + max_offset > (C.scene.width - bar.right): 52 | wall = C.add('static bar', 1.0, right=C.scene.width, angle=90, bottom=0) 53 | else: 54 | raise creator_lib.SkipTemplateParams 55 | C.update_task( 56 | body1=bar, body2=wall, relationships=[C.SpatialRelationship.TOUCHING]) 57 | C.set_meta(C.SolutionTier.BALL) 58 | -------------------------------------------------------------------------------- /data/task_scripts/main/task00316.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | """Template task in which a ball should fall off a slanted obstacle.""" 16 | import phyre.creator as creator_lib 17 | 18 | __OBSTACLE_LOCS = ['left', 'right'] 19 | __OBSTACLE_SCALES = [val * 0.1 for val in range(2, 9)] 20 | __BALL_XS = [val * 0.1 for val in range(1, 10)] 21 | 22 | 23 | @creator_lib.define_task_template(obstacle_location=__OBSTACLE_LOCS, 24 | obstacle_scale=__OBSTACLE_SCALES, 25 | ball_x=__BALL_XS) 26 | def build_task(C, obstacle_location, obstacle_scale, ball_x): 27 | 28 | # Add slanted obstacle. 29 | obstacle = C.add('static bar', scale=obstacle_scale) \ 30 | .set_angle(30. if obstacle_location == 'left' else -30.) \ 31 | .set_bottom(0.2 * C.scene.height) 32 | if obstacle_location == 'left': 33 | obstacle.set_left(-0.01 * C.scene.width) 34 | else: 35 | obstacle.set_right(1.01 * C.scene.width) 36 | 37 | # Add ball that hovers over obstacle. 38 | ball = C.add('dynamic ball', scale=0.1) \ 39 | .set_center_x(ball_x * C.scene.width) \ 40 | .set_bottom(0.9 * C.scene.height) 41 | if obstacle_location == 'left' and ball.right > obstacle.right: 42 | raise creator_lib.SkipTemplateParams 43 | if obstacle_location == 'right' and ball.left < obstacle.left: 44 | raise creator_lib.SkipTemplateParams 45 | 46 | # Create assignment: 47 | C.update_task(body1=ball, 48 | body2=C.bottom_wall, 49 | relationships=[C.SpatialRelationship.TOUCHING]) 50 | C.set_meta(C.SolutionTier.SINGLE_OBJECT) 51 | -------------------------------------------------------------------------------- /data/task_scripts/main/task00249.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | """Tamplet task with a ball that must pass through a hole.""" 16 | import phyre.creator as creator_lib 17 | 18 | __HOLE_X = [0.05 * val for val in range(6, 16)] 19 | __HOLE_Y = [0.05 * val for val in range(8, 16)] 20 | __LEFT = [True, False] 21 | 22 | 23 | @creator_lib.define_task_template( 24 | max_tasks=100, hole_x=__HOLE_X, hole_y=__HOLE_Y, left=__LEFT) 25 | def build_task(C, hole_x, hole_y, left): 26 | 27 | # Add obstacle bars. 28 | y_offset = 0.15 if left else -0.15 29 | right_bar = C.add('static bar', scale=hole_x + 0.02) \ 30 | .set_angle(-20.) \ 31 | .set_top((hole_y - y_offset) * C.scene.height) \ 32 | .set_right(1.01 * C.scene.width) 33 | left_bar = C.add('static bar', scale=1.0 - hole_x + 0.02) \ 34 | .set_angle(20.) \ 35 | .set_top((hole_y + y_offset) * C.scene.height) \ 36 | .set_left(-0.01 * C.scene.width) 37 | 38 | # Add ball. 39 | ball = C.add('dynamic ball', scale=0.1) \ 40 | .set_bottom(0.9 * C.scene.height) 41 | center_x = left_bar.right - 0.01 * C.scene.width if left \ 42 | else right_bar.left + 0.01 * C.scene.width 43 | ball.set_center_x(center_x) 44 | 45 | # Add jar. 46 | jar = C.add('dynamic jar', scale=0.2, center_x=center_x, bottom=0.0) 47 | 48 | # create assignment. 49 | C.update_task(body1=ball, 50 | body2=jar, 51 | relationships=[C.SpatialRelationship.INSIDE], 52 | phantom_vertices=jar.phantom_vertices) 53 | C.set_meta(C.SolutionTier.PRE_TWO_BALLS) 54 | -------------------------------------------------------------------------------- /src/viz/public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 17 | 18 | 19 | 28 | PHYRE Player 29 | 30 | 31 | 34 |
35 | 45 | 46 | 47 | -------------------------------------------------------------------------------- /data/task_scripts/main/task00250.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | """Template task with a ball that must not roll of a cliff with two holes.""" 16 | 17 | import phyre.creator as creator_lib 18 | 19 | __CENTER_XS = [0.05 * val for val in range(2, 5)] 20 | __BOTTOM_YS = [0.05 * val for val in range(0, 5)] 21 | __X_OFFSETS = [0.4, 0.45, 0.5] 22 | __Y_OFFSETS = [-0.1, 0.0, 0.1] 23 | 24 | 25 | @creator_lib.define_task_template( 26 | max_tasks=100, 27 | center_x=__CENTER_XS, 28 | bottom_y=__BOTTOM_YS, 29 | x_offset=__X_OFFSETS, 30 | y_offset=__Y_OFFSETS, 31 | ) 32 | def build_task(C, center_x, bottom_y, x_offset, y_offset): 33 | 34 | # Remove illegal tasks. 35 | if bottom_y + y_offset < 0.0 or bottom_y + y_offset > 1.0: 36 | raise creator_lib.SkipTemplateParams 37 | 38 | # Add plateaus. 39 | plateau1 = C.add('static bar', scale=0.2) \ 40 | .set_center_x(center_x * C.scene.width) \ 41 | .set_bottom(bottom_y * C.scene.height) 42 | plateau2 = C.add('static bar', scale=0.2) \ 43 | .set_center_x((center_x + x_offset) * C.scene.width) \ 44 | .set_bottom((bottom_y + y_offset) * C.scene.height) 45 | 46 | # Add jars. 47 | jar1 = C.add('dynamic jar', scale=0.2) \ 48 | .set_center_x(center_x * C.scene.width) \ 49 | .set_bottom(plateau1.top) 50 | jar2 = C.add('dynamic jar', scale=0.2) \ 51 | .set_center_x((center_x + x_offset) * C.scene.width) \ 52 | .set_bottom(plateau2.top) 53 | 54 | # Create assignment. 55 | C.update_task(body1=jar1, 56 | body2=jar2, 57 | relationships=[C.SpatialRelationship.TOUCHING]) 58 | C.set_meta(C.SolutionTier.PRE_TWO_BALLS) 59 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | # Docker file to build phyre on a clean conda. 16 | # Usage: 17 | # docker build -t phyre -f Dockerfile ./ && docker run -i -t -p 30303:30303 phyre 18 | FROM ubuntu:bionic-20190612 19 | 20 | ENV PATH /opt/conda/bin:$PATH 21 | ENV PATH /opt/conda/envs/phyre/bin:$PATH 22 | ENV LANG=C.UTF-8 LC_ALL=C.UTF-8 23 | 24 | SHELL ["/bin/bash", "-c"] 25 | 26 | RUN apt-get update && apt-get install build-essential wget git --yes && apt-get clean 27 | 28 | # Installing conda. 29 | RUN wget --quiet https://repo.anaconda.com/miniconda/Miniconda3-4.7.10-Linux-x86_64.sh -O ~/anaconda.sh && \ 30 | mkdir ~/.conda && \ 31 | /bin/bash ~/anaconda.sh -b -p /opt/conda && \ 32 | rm ~/anaconda.sh && \ 33 | ln -s /opt/conda/etc/profile.d/conda.sh /etc/profile.d/conda.sh && \ 34 | echo ". /opt/conda/etc/profile.d/conda.sh" >> ~/.bashrc && \ 35 | echo "conda activate base" >> ~/.bashrc && \ 36 | find /opt/conda/ -follow -type f -name '*.a' -delete && \ 37 | find /opt/conda/ -follow -type f -name '*.js.map' -delete && \ 38 | /opt/conda/bin/conda clean -afy 39 | 40 | # Clonning the repo. 41 | ADD / /phyre 42 | 43 | # cd /phyre 44 | WORKDIR /phyre 45 | 46 | # Installing conda. 47 | RUN conda env create -f env.yml && conda init bash 48 | 49 | # Installing the package 50 | RUN apt-get update && apt-get install git --yes && apt-get clean 51 | RUN . /opt/conda/etc/profile.d/conda.sh && conda activate phyre && pip install -e src/python 52 | 53 | # Run test. 54 | RUN make test 55 | 56 | # Making phyre activated by default. 57 | RUN echo "conda activate phyre" >> ~/.bashrc 58 | 59 | # Expose default viz port. 60 | EXPOSE 30303 61 | 62 | # Default comand is to run the viz. 63 | CMD python -m phyre.server --port 30303 64 | -------------------------------------------------------------------------------- /src/python/phyre/tests/server_test.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | import unittest 16 | 17 | from phyre.viz_server import handler 18 | from phyre import loader 19 | from phyre import simulator 20 | from phyre.interface.scene import ttypes as scene_if 21 | 22 | 23 | class ServerTest(unittest.TestCase): 24 | """Simple test to check that server methods do not die.""" 25 | 26 | def setUp(self): 27 | config = dict(mode=handler.DEV_MODE, max_balls=0) 28 | self._first_task_id = min(loader.load_compiled_task_dict()) 29 | self._handler = handler.ServiceHandler(config, test_mode=True) 30 | 31 | def test_list_tasks(self): 32 | self.assertTrue(len(self._handler.list_task_tier_map('')), 1) 33 | self.assertTrue(len(self._handler.list_task_tier_map('00000:')), 1) 34 | self.assertTrue(len(self._handler.list_task_tier_map('00001:')), 0) 35 | 36 | def test_get_tasl_from_id(self): 37 | self._handler.get_task_from_id(self._first_task_id) 38 | 39 | def test_simulate_task(self): 40 | sim = self._handler.simulate_task_by_id(self._first_task_id, 41 | user_input=scene_if.UserInput(), 42 | dilate=False).simulation 43 | self.assertEqual(len(sim.sceneList), 44 | 1 + (simulator.DEFAULT_MAX_STEPS - 1) // 3) 45 | 46 | def test_render(self): 47 | meta_task = self._handler.get_task_from_id('00000:000') 48 | self._handler.render(meta_task.task.scene) 49 | 50 | def test_load_evaluation_data(self): 51 | self._handler.load_evaluation_data('') 52 | self._handler.load_evaluation_data('00000:') 53 | 54 | 55 | if __name__ == '__main__': 56 | unittest.main() 57 | -------------------------------------------------------------------------------- /data/task_scripts/main/task00011.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | """Template task with a ball that must not roll of a cliff.""" 16 | import numpy as np 17 | import phyre.creator as creator_lib 18 | 19 | 20 | @creator_lib.define_task_template( 21 | bar_y=np.linspace(0.1, 0.5, 10), 22 | ball_x=np.linspace(0.2, 0.8, 10), 23 | angle_left=np.linspace(15, 30, 5), 24 | angle_right=np.linspace(15, 30, 5), 25 | length_left=np.linspace(0.2, 0.8, 4), 26 | search_params=dict( 27 | max_search_tasks=1000, 28 | required_flags=['BALL:GOOD_STABLE'], 29 | diversify_tier='ball' 30 | ), 31 | version='4') 32 | def build_task(C, bar_y, ball_x, angle_left, angle_right, length_left): 33 | 34 | # Add obstacle bars. 35 | scene_width = C.scene.width 36 | scene_height = C.scene.height 37 | right_bar = C.add('static bar', scale=1-length_left) \ 38 | .set_angle(angle_left) \ 39 | .set_bottom(bar_y * scene_height) \ 40 | .set_right(1.01 * scene_width) 41 | left_bar = C.add('static bar', scale=length_left) \ 42 | .set_angle(-angle_right) \ 43 | .set_bottom((bar_y + .2) * scene_height) \ 44 | .set_left(-0.01 * scene_width) 45 | 46 | # Add ball. 47 | ball = C.add('dynamic ball', scale=0.1) \ 48 | .set_center_x(ball_x * scene_width) \ 49 | .set_bottom(0.9 * scene_height) 50 | 51 | if ball.left < left_bar.right and left_bar.top > C.scene.height * 0.9: 52 | raise creator_lib.SkipTemplateParams 53 | 54 | # Create assignment. 55 | C.update_task( 56 | body1=ball, 57 | body2=right_bar, 58 | relationships=[C.SpatialRelationship.TOUCHING]) 59 | C.set_meta(C.SolutionTier.BALL) 60 | -------------------------------------------------------------------------------- /scripts/build_phyre_wheels.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Copyright (c) Facebook, Inc. and its affiliates. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | set -e 17 | set -u 18 | 19 | 20 | branch=$1 21 | 22 | if [ -z "$branch" ]; then 23 | echo "Usage: $0 " 24 | exit 1 25 | fi 26 | 27 | DST=$HOME/src/phyre_building_root 28 | module load anaconda3/2020.11 29 | 30 | 31 | for version in 3.6 3.7 3.8 3.9; do 32 | echo "############################" 33 | echo "###### v=${version} ##################" 34 | echo "############################" 35 | vdst=$DST/py$version 36 | env_name="phyre_tmp_$version" 37 | if [ -d "$HOME/.conda/envs/$env_name" ]; then 38 | echo "ENV already exists $env_name" 39 | else 40 | conda create --yes -n $env_name python=$version 41 | fi 42 | 43 | source activate $env_name 44 | if [ $version = "3.6" ] || [ $version = "3.7" ]; then 45 | conda install -c conda-forge sed nodejs=12 thrift-cpp=0.11.0 wget pybind11=2.2.4 cmake boost=1.67.0 setuptools pip --yes 46 | else 47 | conda install -c conda-forge sed nodejs=12 thrift-cpp=0.11.0 wget pybind11=2.6 cmake boost=1.75 setuptools pip --yes 48 | fi 49 | 50 | pip install matplotlib tqdm ipywidgets yapf==0.28.0 51 | 52 | mkdir -p $vdst 53 | cd $vdst 54 | if [ -d "phyre" ]; then 55 | echo "repo exists" 56 | else 57 | git clone https://github.com/facebookresearch/phyre.git 58 | fi 59 | cd phyre 60 | git fetch 61 | git reset --hard origin/$branch 62 | pip install -e src/python 63 | rm -rf src/python/dist 64 | cd src/python/ && python3 setup.py sdist bdist_wheel --plat-name manylinux1_x86_64 --python-tag cp${version//./} 65 | 66 | source deactivate 67 | done 68 | 69 | 70 | echo twine upload -r testpypi $DST/py*/phyre/src/python/dist/*whl 71 | -------------------------------------------------------------------------------- /data/task_scripts/main/task00262.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | """Template task with a ball that must not roll of a cliff with two holes.""" 16 | 17 | import phyre.creator as creator_lib 18 | 19 | __BAR_YS = [0.1 * val for val in range(0, 5)] 20 | __BAR_OFFSET = [0.05 * val for val in range(3, 5)] 21 | __BAR_LENGTH = [0.9, 0.95, 1.] 22 | __LEFT = [True, False] 23 | 24 | 25 | @creator_lib.define_task_template( 26 | bar_y=__BAR_YS, 27 | bar_offset=__BAR_OFFSET, 28 | bar_length=__BAR_LENGTH, 29 | left=__LEFT) 30 | def build_task(C, bar_y, bar_offset, bar_length, left): 31 | 32 | # Add obstacle bars, one of which has a hole on the side. 33 | bar_scale = 0.5 * bar_length 34 | lower_bar = C.add('static bar', scale=bar_scale) \ 35 | .set_angle(20. if left else -20.) \ 36 | .set_bottom(bar_y * C.scene.height) 37 | if left: 38 | lower_bar.set_right(1.01 * C.scene.width) 39 | else: 40 | lower_bar.set_left(-0.01 * C.scene.width) 41 | upper_bar = C.add('static bar', scale=bar_scale) \ 42 | .set_angle(-20. if left else 20.) \ 43 | .set_bottom((bar_y + bar_offset) * C.scene.height) 44 | if left: 45 | upper_bar.set_right(lower_bar.left) 46 | else: 47 | upper_bar.set_left(lower_bar.right) 48 | 49 | # Add ball. 50 | ball = C.add('dynamic ball', scale=0.1) \ 51 | .set_bottom(0.9 * C.scene.height) 52 | if left: 53 | ball.set_center_x(upper_bar.left) 54 | else: 55 | ball.set_center_x(upper_bar.right) 56 | 57 | # Create assignment. 58 | C.update_task(body1=ball, 59 | body2=lower_bar, 60 | relationships=[C.SpatialRelationship.TOUCHING]) 61 | C.set_meta(C.SolutionTier.PRE_TWO_BALLS) 62 | -------------------------------------------------------------------------------- /agents/train_all_baseline.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Copyright (c) Facebook, Inc. and its affiliates. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | set -e 17 | set -u 18 | set -p 19 | 20 | cd "$(dirname "$0")/.." 21 | 22 | readonly DEV_SEEDS=3 23 | readonly FINAL_SEEDS=10 24 | readonly DQN_BASE_NAME='dqn_10k' 25 | readonly EVAL_SETUPS='ball_cross_template ball_within_template 26 | two_balls_cross_template two_balls_within_template' 27 | 28 | readonly RUN_EXPERIMENT_SCRIPT=${RUN_EXPERIMENT_SCRIPT:-"agents/run_experiment.py"} 29 | 30 | 31 | wait_for_results() { 32 | local base_dir=$1 33 | local num_seeds=$2 34 | for eval_setup in $EVAL_SETUPS; do 35 | for seed in $(seq 0 $(( $num_seeds - 1 )) ); do 36 | local path="$base_dir/$eval_setup/$seed/results.json" 37 | while :; do 38 | if [ -f "$path" ]; then 39 | break 40 | else 41 | echo "Waiting for $path. Will sleep for 5min" 42 | sleep 5m 43 | fi 44 | done 45 | done 46 | done 47 | } 48 | 49 | 50 | python $RUN_EXPERIMENT_SCRIPT --use-test-split 0 --arg-generator base_dqn --num-seeds $DEV_SEEDS 51 | python $RUN_EXPERIMENT_SCRIPT --use-test-split 0 --arg-generator baselines_args_per_rank_size --num-seeds $DEV_SEEDS 52 | wait_for_results "results/dev/$DQN_BASE_NAME" $DEV_SEEDS 53 | python $RUN_EXPERIMENT_SCRIPT --use-test-split 0 --arg-generator dqn_ablation --num-seeds $DEV_SEEDS 54 | python $RUN_EXPERIMENT_SCRIPT --use-test-split 0 --arg-generator rank_and_online_sweep --num-seeds $DEV_SEEDS 55 | 56 | python $RUN_EXPERIMENT_SCRIPT --use-test-split 1 --arg-generator base_dqn --num-seeds $FINAL_SEEDS 57 | wait_for_results "results/final/$DQN_BASE_NAME" $FINAL_SEEDS 58 | python $RUN_EXPERIMENT_SCRIPT --use-test-split 1 --arg-generator finals --num-seeds $FINAL_SEEDS 59 | -------------------------------------------------------------------------------- /data/task_scripts/main/task00009.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | """Template task in which the agent should knock a bar off an obstacle.""" 16 | import numpy as np 17 | import phyre.creator as creator_lib 18 | 19 | __OBSTACLE_XS = np.linspace(0, 1, 64) 20 | __OBSTACLE_WIDTHS = np.linspace(0.4, 0.6, 4) 21 | __BAR_SCALES = np.linspace(0.2, 0.3, 2) 22 | __PLATFORM_Y = np.linspace(0.2, 0.5, 5) 23 | 24 | 25 | @creator_lib.define_task_template( 26 | obstacle_width=__OBSTACLE_WIDTHS, 27 | obstacle_x=__OBSTACLE_XS, 28 | bar_scale=__BAR_SCALES, 29 | platform_y=__PLATFORM_Y, 30 | search_params=dict( 31 | required_flags=['BALL:GOOD_STABLE'], 32 | excluded_flags=['BALL:TRIVIAL'], 33 | diversify_tier='ball', 34 | max_search_tasks=1000, 35 | ), 36 | version='4', 37 | ) 38 | def build_task(C, obstacle_width, obstacle_x, bar_scale, platform_y): 39 | 40 | # Add obstacle. 41 | if obstacle_x + obstacle_width > 1.: 42 | raise creator_lib.SkipTemplateParams 43 | obstacle = C.add('static bar', scale=obstacle_width) \ 44 | .set_left(obstacle_x * C.scene.width) \ 45 | .set_bottom(platform_y * C.scene.height) 46 | 47 | # Add vertical bar. 48 | bar = C.add('dynamic bar', scale=bar_scale) \ 49 | .set_angle(90.) \ 50 | .set_bottom(obstacle.top) 51 | if obstacle.left > C.scene.width - obstacle.right: 52 | bar.set_left(obstacle.left) 53 | else: 54 | bar.set_right(obstacle.right) 55 | 56 | bottom_wall = C.add('static bar', 1, bottom=0, left=0) 57 | top_wall = C.add('static bar', 1, bottom=bar.top + 0.2 * C.scene.height, left=0) 58 | # Create assignment: 59 | C.update_task( 60 | body1=bar, 61 | body2=bottom_wall, 62 | relationships=[C.SpatialRelationship.TOUCHING]) 63 | C.set_meta(C.SolutionTier.BALL) 64 | -------------------------------------------------------------------------------- /scripts/offline_simulation/compress_partial_simuations.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | import joblib 16 | 17 | import phyre.loader 18 | import phyre.settings 19 | import phyre.simulation_cache 20 | 21 | 22 | def main_tier(tier, task_ids, num_actions): 23 | task_ids = sorted(task_ids) 24 | 25 | input_dir = (phyre.simulation_cache.get_partial_cache_folder(num_actions) / 26 | tier) 27 | output_dir = (phyre.simulation_cache.get_cache_folder(num_actions) / tier) 28 | output_dir.mkdir(exist_ok=True, parents=True) 29 | all_simulations = {} 30 | for task_id in task_ids: 31 | tpl = task_id.split(':')[0] 32 | sim_path = input_dir / tpl / f'{task_id}.gz' 33 | assert sim_path.exists(), sim_path 34 | all_simulations[task_id] = joblib.load(sim_path) 35 | actions = joblib.load(input_dir / phyre.simulation_cache.ACTION_FILE_NAME) 36 | cache = dict(statuses_per_task=all_simulations, actions=actions) 37 | joblib.dump(cache, output_dir / phyre.simulation_cache.CACHE_FILE_NAME) 38 | 39 | 40 | def main(num_actions): 41 | task_dict = phyre.loader.load_compiled_task_dict() 42 | task_ids_per_tier = {'ball': [], 'two_balls': []} 43 | for action_tier, task_tiers in phyre.simulation_cache.TIERS.items(): 44 | for task_id, task in task_dict.items(): 45 | if task.tier in task_tiers: 46 | task_ids_per_tier[action_tier].append(task_id) 47 | 48 | for tier, task_ids in task_ids_per_tier.items(): 49 | main_tier(tier, task_ids, num_actions) 50 | 51 | 52 | if __name__ == '__main__': 53 | import argparse 54 | parser = argparse.ArgumentParser() 55 | parser.add_argument('--num-actions', 56 | type=int, 57 | default=phyre.simulation_cache.DEFAULT_NUM_ACTIONS) 58 | main(**vars(parser.parse_args())) 59 | -------------------------------------------------------------------------------- /data/task_scripts/main/task00215.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | """Template task with a ball that must fall on the other side of a jar.""" 16 | import phyre.creator as creator_lib 17 | 18 | __JAR_XS = [val * 0.1 for val in range(3, 7)] 19 | __JAR_SCALES = [val * 0.1 for val in range(2, 6)] 20 | __BALL_XS = [val * 0.1 for val in range(2, 8)] 21 | __BALL_YS = [val * 0.1 for val in range(5, 8)] 22 | 23 | 24 | @creator_lib.define_task_template( 25 | jar_x=__JAR_XS, jar_scale=__JAR_SCALES, ball_x=__BALL_XS, ball_y=__BALL_YS, version='2') 26 | def build_task(C, jar_x, jar_scale, ball_x, ball_y): 27 | 28 | # Add jar. 29 | jar = C.add('dynamic jar', scale=jar_scale) \ 30 | .set_left(jar_x * C.scene.width) \ 31 | .set_bottom(0.) 32 | if jar.left < 0. or jar.right > C.scene.width: 33 | raise creator_lib.SkipTemplateParams 34 | 35 | # Add ball that is not hovering over jar. 36 | ball = C.add('dynamic ball', scale=0.1) \ 37 | .set_center_x(ball_x * C.scene.width) \ 38 | .set_bottom(0.9 * C.scene.height) 39 | 40 | # Add a floor bar into two parts: target part and non-target part. 41 | if ball.left > jar.right: # ball is right of jar 42 | bottom_wall = C.add('static bar', 1.0, bottom=0, right=jar.left) 43 | C.add('static bar', 1.0, bottom=0, left=bottom_wall.right) 44 | elif ball.right < jar.left: # ball is left of jar 45 | bottom_wall = C.add('static bar', 1.0, bottom=0, left=jar.right) 46 | C.add('static bar', 1.0, bottom=0, right=bottom_wall.left) 47 | else: 48 | raise creator_lib.SkipTemplateParams 49 | 50 | jar.set_bottom(bottom_wall.top) 51 | 52 | # Create assignment. 53 | C.update_task(body1=ball, 54 | body2=bottom_wall, 55 | relationships=[C.SpatialRelationship.TOUCHING]) 56 | C.set_meta(C.SolutionTier.PRE_TWO_BALLS) 57 | -------------------------------------------------------------------------------- /data/task_scripts/main/task00200.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | """ 16 | Template task with a ball that must hit the left or right wall, and a 17 | horizontal bar that is preventing this from happening. 18 | """ 19 | import phyre.creator as creator_lib 20 | 21 | __BALL_SIZE = 0.1 22 | __HOLE_SIZE = 0.2 23 | __HOLE_LEFT = [0.1 * val for val in range(3, 7)] 24 | __BAR_HEIGHT = [0.1 * val for val in range(5, 7)] 25 | __LEFT_WALL = [True, False] 26 | 27 | 28 | @creator_lib.define_task_template( 29 | hole_left=__HOLE_LEFT, 30 | bar_height=__BAR_HEIGHT, 31 | left_wall=__LEFT_WALL) 32 | def build_task(C, hole_left, bar_height, left_wall): 33 | 34 | # Compute right side of hole. 35 | hole_right = hole_left + __HOLE_SIZE 36 | if hole_right >= 1.0: 37 | raise creator_lib.SkipTemplateParams 38 | 39 | # Add ball. 40 | ball = C.add('dynamic ball', scale=__BALL_SIZE) \ 41 | .set_center_x((hole_left if left_wall else hole_right) * C.scene.width) \ 42 | .set_bottom(0.8 * C.scene.height) 43 | 44 | # Add horizontal bar with hole. 45 | C.add('static bar', scale=hole_left) \ 46 | .set_left(0) \ 47 | .set_bottom(bar_height * C.scene.height) 48 | C.add('static bar', scale=1.0 - hole_right) \ 49 | .set_right(C.scene.width) \ 50 | .set_bottom(bar_height * C.scene.height) 51 | 52 | # Add vertical bars that prevent "cheating". 53 | C.add('static bar', scale=1.0 - bar_height) \ 54 | .set_angle(90.) \ 55 | .set_left(0) \ 56 | .set_bottom(bar_height * C.scene.height) 57 | C.add('static bar', scale=1.0 - bar_height) \ 58 | .set_angle(90.) \ 59 | .set_right(C.scene.width) \ 60 | .set_bottom(bar_height * C.scene.height) 61 | 62 | C.update_task( 63 | body1=ball, 64 | body2=C.left_wall if left_wall else C.right_wall, 65 | relationships=[C.SpatialRelationship.TOUCHING]) 66 | -------------------------------------------------------------------------------- /data/task_scripts/main/task00328.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | """ 16 | Template task with a ball that must pass through a hole in the ground, and 17 | a second ball that is trying to prevent this from happening. 18 | """ 19 | import numpy as np 20 | import phyre.creator as creator_lib 21 | 22 | __BALL_SIZE = 0.1 23 | __HOLE_SIZE = 0.1 24 | 25 | 26 | @creator_lib.define_task_template( 27 | hole_left=np.linspace(0.2, 0.8, 10), 28 | bar_height=np.linspace(0.2, 0.8, 10), 29 | confounder=[True, False], 30 | version='3', 31 | ) 32 | def build_task(C, hole_left, bar_height, confounder): 33 | 34 | # Compute right side of hole. 35 | hole_right = hole_left + __HOLE_SIZE 36 | if hole_right >= 1.0: 37 | raise creator_lib.SkipTemplateParams 38 | 39 | # Add balls. 40 | ball1 = C.add('dynamic ball', scale=__BALL_SIZE) \ 41 | .set_center_x(0.5 * C.scene.width) \ 42 | .set_bottom(0.8 * C.scene.height) 43 | ball2 = C.add('dynamic ball', scale=__BALL_SIZE) \ 44 | .set_center_x((hole_left if confounder else hole_right) * C.scene.width) \ 45 | .set_bottom(0.7 * C.scene.height) 46 | 47 | # Add bars with hole. 48 | bar = C.add('static bar', scale=hole_left) \ 49 | .set_left(0) \ 50 | .set_bottom(bar_height * C.scene.height) 51 | C.add('static bar', scale=1.0 - hole_right) \ 52 | .set_right(C.scene.width) \ 53 | .set_bottom(bar_height * C.scene.height) 54 | 55 | if ball1.top >= bar.top and ball1.bottom <= bar.bottom: 56 | raise creator_lib.SkipTemplateParams 57 | if ball2.top >= bar.top and ball2.bottom <= bar.bottom: 58 | raise creator_lib.SkipTemplateParams 59 | 60 | # Create task. 61 | C.update_task( 62 | body1=ball1, 63 | body2=ball2, 64 | relationships=[C.SpatialRelationship.TOUCHING]) 65 | C.set_meta(C.SolutionTier.PRE_BALL) 66 | -------------------------------------------------------------------------------- /data/task_scripts/main/task00900.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | """Unfinished single-ball task.""" 16 | import phyre.creator as creator_lib 17 | 18 | 19 | @creator_lib.define_task 20 | def build_task(C): 21 | 22 | # Create catapults with balls. 23 | ball1, line1 = _make_catapult(C, 0.5, 0.1) 24 | 25 | C.add( 26 | 'static bar', 27 | scale=0.4, 28 | angle=90, 29 | bottom=line1.top, 30 | right=line1.center_x + 10) 31 | C.add( 32 | 'dynamic ball', scale=0.1, bottom=line1.top, right=line1.center_x + 40) 33 | C.add('static bar', scale=0.4, angle=90, bottom=line1.top, left=line1.right) 34 | C.add('static bar', scale=0.9, bottom=0, right=C.scene.width) 35 | 36 | C.add('static bar', scale=0.3, angle=90, bottom=0, right=line1.left) 37 | 38 | #ball2 = C.add('static ball', left=b2.right, top=b2.top - 120, scale=0.05) 39 | # Create assignment. 40 | C.update_task( 41 | body1=ball1, 42 | body2=C.bottom_wall, 43 | relationships=[C.SpatialRelationship.TOUCHING]) 44 | 45 | 46 | def _make_catapult(C, x, y): 47 | """Builds a catapult.""" 48 | 49 | # Base of the catapult. 50 | 51 | base = C.add('static standingsticks ', scale=0.1) \ 52 | .set_bottom(y * C.scene.height) \ 53 | .set_center_x(x * C.scene.width) 54 | 55 | # Hinge and top line. 56 | bar_center_x = base.left + (base.right - base.left) / 2. 57 | ball = C.add('static ball', scale=0.05) \ 58 | .set_bottom(base.top) \ 59 | .set_center_x(bar_center_x) 60 | line = C.add_box(height=3, width=120) \ 61 | .set_center_x(bar_center_x) \ 62 | .set_bottom(ball.top) 63 | 64 | # Ball that needs to move. 65 | top_ball = C.add('dynamic ball', scale=0.04) \ 66 | .set_bottom(line.top) 67 | top_ball.set_left(line.left) 68 | return top_ball, line 69 | -------------------------------------------------------------------------------- /agents/OGRE.md: -------------------------------------------------------------------------------- 1 | # OGRE dataset 2 | 3 | Contains code to reproduce agent baselines from OGRE dataset. See the [paper](https://github.com/orlrworkshop/orlrworkshop.github.io/raw/master/pdf/ORLR_9.pdf) for details. 4 | 5 | ## Abstract 6 | 7 | If an agent understands how to reason about some objects, can it generalize this understanding to new objects that it has never seen before? 8 | We propose the **Object-based Generalization for Reasoning Environment (OGRE)** for testing object generalization in the context of *creative reasoning* and *efficient acting*. 9 | 10 | OGRE emphasizes evaluating agents by how efficiently they solve novel creative reasoning tasks, not just how well they can predict the future. 11 | OGRE provides two levels of generalization: generalization over reasoning strategies with familiar objects, and generalization over new object types that still share similar material properties to those in training. 12 | 13 | 14 |

15 | 16 |

17 | 18 | A Top: an example of a level within the training set of OGRE. Black and purple objects are static; objects with any other color are dynamic and subject to gravity. Actions are single balls at a position (`x`, `y`) with radius `r`, depicted as a red ball which falls under gravity once placed. Agents can observe the outcomes of these actions for a large set of training levels. Bottom: other example levels that might be included in training. 19 | 20 | B: cross-template testing includes levels that use the same object representations, but require different kinds of strategies to succeed. 21 | 22 | C: cross-dataset testing includes a set of levels from the Virtual Tools environment, which represents both goals and object shapes differently. 23 | 24 |

25 | 26 | ## Explore the tasks 27 | 28 | You can explore all the task in the [PHYRE player](https://player.phyre.ai/) 29 | 30 | ## Agents 31 | 32 | Cross-dataset generalization is implemented as a generaralization tier in PHYRE framework referred to as `ball_phyre_to_tool`. Please see the [API documentaion](https://phyre.ai/docs/evaluator.html) for more details. 33 | 34 | We provide code that runs the baselines from PHYRE dataset and also newly added Object-Oriented Random Agent on cross-template and cross-dataset settings. 35 | To launch all evals download pre-trained checkpoints with `bash download_dqn_ckps.sh` and run `python agents/run_experiments_ogre.py`. 36 | See PHYRE's [README](README.md) for details of DQN training. 37 | --------------------------------------------------------------------------------