{"id":13571815,"url":"https://github.com/allenai/ScienceWorld","last_synced_at":"2025-04-04T09:30:34.176Z","repository":{"id":37794590,"uuid":"466027448","full_name":"allenai/ScienceWorld","owner":"allenai","description":"ScienceWorld is a text-based virtual environment centered around accomplishing tasks from the standardized elementary science curriculum.","archived":false,"fork":false,"pushed_at":"2024-10-16T20:07:42.000Z","size":84469,"stargazers_count":213,"open_issues_count":12,"forks_count":26,"subscribers_count":9,"default_branch":"main","last_synced_at":"2024-11-05T04:34:20.383Z","etag":null,"topics":["language-model","machine-learning","reinforcement-learning","text-based-game","text-based-game-framework"],"latest_commit_sha":null,"homepage":"https://sciworld.apps.allenai.org/","language":"Scala","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/allenai.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-03-04T07:36:03.000Z","updated_at":"2024-11-02T18:40:38.000Z","dependencies_parsed_at":"2024-05-17T19:28:22.122Z","dependency_job_id":"dd5ad151-e5ad-4dcc-a73d-d94ab242a360","html_url":"https://github.com/allenai/ScienceWorld","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/allenai%2FScienceWorld","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/allenai%2FScienceWorld/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/allenai%2FScienceWorld/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/allenai%2FScienceWorld/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/allenai","download_url":"https://codeload.github.com/allenai/ScienceWorld/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247152745,"owners_count":20892548,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["language-model","machine-learning","reinforcement-learning","text-based-game","text-based-game-framework"],"created_at":"2024-08-01T14:01:06.790Z","updated_at":"2025-04-04T09:30:29.161Z","avatar_url":"https://github.com/allenai.png","language":"Scala","readme":"\u003ch1 align=\"center\"\u003e\nScienceWorld\n\u003c/h1\u003e\n\n\u003cp align=\"center\"\u003e\n\u003c!-- Version badge using shields.io --\u003e\n  \u003ca href=\"https://github.com/allenai/ScienceWorld/releases\"\u003e\n    \u003cimg src=\"https://img.shields.io/github/v/release/allenai/ScienceWorld\"\u003e\n  \u003c/a\u003e\n\u003c!-- Link to tutorials badge using shields.io --\u003e\n  \u003ca href=\"https://huggingface.co/spaces/MarcCote/ScienceWorld\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/🤗-Demo-yellow\"\u003e\n  \u003c/a\u003e\n\u003c!-- Follow on twitter badge using shields.io --\u003e\n  \u003ca href=\"https://sciworld.apps.allenai.org\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/Website-green\"\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\nScienceWorld is a text-based virtual environment centered around accomplishing tasks from the standardized elementary science curriculum.  This code accompanies the paper [ScienceWorld: Is your Textual Agent Smarter than a 5th grader?](https://arxiv.org/abs/2203.07540).\n\n\u003ch3 align=\"center\"\u003e\u003cimg src=\"https://github.com/allenai/ScienceWorld/blob/main/media/scienceworld_environment.png\" width=\"75%\"/\u003e\u003c/h3\u003e\n\n### Demo and examples\n\nYou can try ScienceWorld yourself via our [HuggingFace Space](https://huggingface.co/spaces/MarcCote/ScienceWorld) or read some of the [playthrough transcripts](https://sciworld.apps.allenai.org/explore).\n\n### Citation\n```\n@misc{scienceworld2022,\n    title={ScienceWorld: Is your Agent Smarter than a 5th Grader?},\n    author={Ruoyao Wang and Peter Jansen and Marc-Alexandre C{\\^o}t{\\'e} and Prithviraj Ammanabrolu},\n    year={2022},\n    eprint={2203.07540},\n    archivePrefix={arXiv},\n    primaryClass={cs.CL},\n    url={https://arxiv.org/abs/2203.07540}\n}\n```\n\n# Quickstart\n**Before running:** You will have to have `Java 1.8+` installed on your system (shipped with most linux distributions) and `Python 3.8+`. We recommend creating a conda environment like this:\n\n```bash\nconda create --name scienceworld python=3.8\nconda activate scienceworld\n```\n\nThen, install ScienceWorld either from PyPi:\n\n    pip install scienceworld\n\nor from source in development mode:\n\n    git clone https://github.com/allenai/ScienceWorld.git\n    cd ScienceWorld\n    pip install .\n\n\nRun an example random agent, on task 13 (classification: place a non-living thing in a box), for 5 episodes:\n\n    python examples/random_agent.py --task-num=13 --num-episodes=5 --simplifications-preset easy\n\nRun a user console where you can interact with the environment, on task 3 (change of state: melting):\n\n    python examples/human.py --task-num=3 --num-episodes=5\n\n\n# Web Server Demo\n\nA web server demo is also available, that allows running a ScienceWorld user console that can be interacted with in a web browser.\n\n\u003ch3 align=\"center\"\u003e\u003cimg src=\"https://github.com/allenai/ScienceWorld/blob/main/media/web_demo_screenshot.png\" width=\"75%\"/\u003e\u003c/h3\u003e\n\nTo run the web server demo:\n```bash\nconda create --name scienceworld python=3.8\nconda activate scienceworld\npip install scienceworld[webserver]\n```\n\nRun the web server:\n\n    python examples/scienceworld-web-server-example.py\n\nPoint your web browser to:\n`localhost:8080`\n\n\n# ScienceWorld Design\nScienceWorld is written in Scala (2.12.9), and compiles using `sbt` into a JAR file that is run with Java.  For convenience, a Python API is provided (Python \u003e= 3.8), which interfaces using the `py4j` package.\n\nIf you modified the Scala code, you can recompile the JAR file by running:\n```bash\n./simulator/package.sh\npip install -e .\n```\n\n# Tasks\nThe tasks are listed in the table below along with their number of variations. Either the task ID or its name can be used to a task with `env.load()`.\n\n| Task ID | Task Name                                | # Variations |\n|-------|----------------------------------------------------|------|\n|   1-1 |                                             boil |   30 |\n|   1-2 |                                             melt |   30 |\n|   1-3 |                                           freeze |   30 |\n|   1-4 |                    change-the-state-of-matter-of |   30 |\n|   2-1 |                                  use-thermometer |  540 |\n|   2-2 |            measure-melting-point-known-substance |  436 |\n|   2-3 |          measure-melting-point-unknown-substance |  300 |\n|   3-1 |                                  power-component |   20 |\n|   3-2 | power-component-renewable-vs-nonrenewable-energy |   20 |\n|   3-3 |                                test-conductivity |  900 |\n|   3-4 |          test-conductivity-of-unknown-substances |  600 |\n|   4-1 |                                find-living-thing |  300 |\n|   4-2 |                            find-non-living-thing |  300 |\n|   4-3 |                                       find-plant |  300 |\n|   4-4 |                                      find-animal |  300 |\n|   5-1 |                                       grow-plant |  126 |\n|   5-2 |                                       grow-fruit |  126 |\n|   6-1 |                                    chemistry-mix |   32 |\n|   6-2 |              chemistry-mix-paint-secondary-color |   36 |\n|   6-3 |               chemistry-mix-paint-tertiary-color |   36 |\n|   7-1 |                           lifespan-longest-lived |  125 |\n|   7-2 |                          lifespan-shortest-lived |  125 |\n|   7-3 |       lifespan-longest-lived-then-shortest-lived |  125 |\n|   8-1 |                           identify-life-stages-1 |   14 |\n|   8-2 |                           identify-life-stages-2 |   10 |\n|   9-1 |                   inclined-plane-determine-angle |  168 |\n|   9-2 |           inclined-plane-friction-named-surfaces | 1386 |\n|   9-3 |         inclined-plane-friction-unnamed-surfaces |  162 |\n|  10-1 |                   mendelian-genetics-known-plant |  120 |\n|  10-2 |                 mendelian-genetics-unknown-plant |  480 |\n\n# Baseline Agents\n**DRRN:** https://github.com/cognitiveailab/drrn-scienceworld\n\n**KG-A2C:** https://github.com/cognitiveailab/kga2c-scienceworld\n\n**CALM:** https://github.com/cognitiveailab/calm-scienceworld\n\n**Behavior Cloning and Decision Transformer:** https://github.com/cognitiveailab/t5-scienceworld\n","funding_links":[],"categories":["Scala","5. 数据集"],"sub_categories":["5.1 评测基准"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fallenai%2FScienceWorld","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fallenai%2FScienceWorld","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fallenai%2FScienceWorld/lists"}