Package: scienceworld
ScienceWorldScienceWorld is a text-based virtual environment centered around accomplishing tasks from the standardized elementary science curriculum.  This code accompanies the paperScienceWorld: Is your Textual Agent Smarter than a 5th grader?.Demo and examplesYou can try ScienceWorld yourself via ourHuggingFace Spaceor read some of theplaythrough transcripts.Citation@misc{scienceworld2022,
    title={ScienceWorld: Is your Agent Smarter than a 5th Grader?},
    author={Ruoyao Wang and Peter Jansen and Marc-Alexandre C{\^o}t{\'e} and Prithviraj Ammanabrolu},
    year={2022},
    eprint={2203.07540},
    archivePrefix={arXiv},
    primaryClass={cs.CL},
    url={https://arxiv.org/abs/2203.07540}
}QuickstartBefore running:You will have to haveJava 1.8+installed on your system (shipped with most linux distributions).Install with pip:condacreate--namescienceworldpython=3.8
condaactivatescienceworld
pipinstallscienceworldRun an example random agent, on task 13 (classification: place a non-living thing in a box), for 5 episodes:python examples/random_agent.py --task-num=13 --num-episodes=5 --simplifications-preset easyRun a user console where you can interact with the environment, on task 3 (change of state: melting):python examples/human.py --task-num=3 --num-episodes=5Web Server DemoA web server demo is also available, that allows running a ScienceWorld user console that can be interacted with in a web browser.To run the web server demo:condacreate--namescienceworldpython=3.8
condaactivatescienceworld
pipinstallscienceworld[webserver]Run the web server:python examples/scienceworld-web-server-example.pyPoint your web browser to:localhost:8080ScienceWorld DesignScienceWorld is written in Scala (2.12.9), and compiles usingsbtinto a JAR file that is run with Java.  For convenience, a Python API is provided (Python >= 3.7), which interfaces using thepy4jpackage.TasksThe 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 withenv.load().Task IDTask Name# Variations1-1boil301-2melt301-3freeze301-4change-the-state-of-matter-of302-1use-thermometer5402-2measure-melting-point-known-substance4362-3measure-melting-point-unknown-substance3003-1power-component203-2power-component-renewable-vs-nonrenewable-energy203-3test-conductivity9003-4test-conductivity-of-unknown-substances6004-1find-living-thing3004-2find-non-living-thing3004-3find-plant3004-4find-animal3005-1grow-plant1265-2grow-fruit1266-1chemistry-mix326-2chemistry-mix-paint-secondary-color366-3chemistry-mix-paint-tertiary-color367-1lifespan-longest-lived1257-2lifespan-shortest-lived1257-3lifespan-longest-lived-then-shortest-lived1258-1identify-life-stages-1148-2identify-life-stages-2109-1inclined-plane-determine-angle1689-2inclined-plane-friction-named-surfaces13869-3inclined-plane-friction-unnamed-surfaces16210-1mendelian-genetics-known-plant12010-2mendelian-genetics-unknown-plant480Baseline AgentsDRRN:https://github.com/cognitiveailab/drrn-scienceworldKG-A2C:https://github.com/cognitiveailab/kga2c-scienceworldCALM:https://github.com/cognitiveailab/calm-scienceworldBehavior Cloning and Decision Transformer:https://github.com/cognitiveailab/t5-scienceworld