| --- |
| license: apache-2.0 |
| task_categories: |
| - reinforcement-learning |
| language: |
| - en |
| tags: |
| - scienceworld |
| - agent |
| - multi-turn |
| - on-policy-distillation |
| - tcod |
| size_categories: |
| - 1K<n<10K |
| configs: |
| - config_name: default |
| data_files: |
| - split: train |
| path: data/train.parquet |
| - split: test |
| path: data/test.parquet |
| --- |
| |
| # ScienceWorld — TCOD task-type split |
|
|
| The ScienceWorld task list used by **TCOD** and **FutureBridge-OPD**, in the exact |
| row format their workflows parse, with the machine-local jar path removed so the |
| rows load anywhere. |
|
|
| | split | rows | task types | |
| | --- | --- | --- | |
| | train | 2294 | 17 | |
| | test | 1308 | 13 | |
|
|
| The 1308-row test split is the one reported as "all 1,308 entries in the disjoint |
| task-type test split" in FutureBridge-OPD's `configs/README.md`. |
|
|
| **This is a task list, not trajectories.** Each row names a ScienceWorld task |
| type and variation; the environment generates the episode at rollout time. You |
| need the `scienceworld` package (and a JVM) installed to use it. |
|
|
| ## Schema |
|
|
| Two columns, matching what TCOD's buffer reader expects with |
| `format.prompt_key: task_desc`: |
|
|
| | column | type | contents | |
| | --- | --- | --- | |
| | `task_desc` | string | JSON: `{"task_name": ..., "var_num": ..., "jar_path": ""}` | |
| | `targe` | string | always `""` | |
|
|
| `targe` is TCOD's own spelling of "target". It is kept as-is so their loader finds |
| the key it expects. |
|
|
| ### About `jar_path: ""` |
| |
| Upstream's generator writes the **absolute path of the local `scienceworld.jar`** |
| into every row, which makes the files unusable on any other machine. Here it is |
| blanked, which is safe and portable: |
| |
| - TCOD's loader does `jar_path = task_config.get("jar_path", "")`, then |
| `ScienceWorldEnv("", jar_path, envStepLimit=...)` |
| - `ScienceWorldEnv.__init__` does `serverPath = serverPath or JAR_PATH` |
|
|
| An empty string is falsy, so the simulator falls back to the jar shipped inside |
| the installed `scienceworld` package. Nothing downstream needs patching. If you |
| do need a specific jar, set the field yourself. |
|
|
| ## Usage |
|
|
| ### Straight from a TCOD / Trinity-RFT YAML |
|
|
| `_load_task_dataset` falls through to `load_dataset(path, split=...)`, so the repo |
| id works as a path — no manual download: |
|
|
| ```yaml |
| buffer: |
| explorer_input: |
| taskset: |
| name: sciworld |
| storage_type: file |
| path: SeanWang0027/scienceworld-tcod-split |
| split: train |
| format: |
| prompt_key: 'task_desc' |
| rollout_args: |
| temperature: 1.0 |
| logprobs: 0 |
| workflow_args: |
| temperature: 1.0 |
| max_env_steps: 30 |
| eval_tasksets: |
| - name: sciworld_eval |
| storage_type: file |
| path: SeanWang0027/scienceworld-tcod-split |
| split: test |
| total_steps: 1308 |
| task_selector: |
| selector_type: sequential |
| format: |
| prompt_key: 'task_desc' |
| rollout_args: |
| temperature: 0.4 |
| logprobs: 0 |
| default_workflow_type: 'OPD_scienceworld_workflow' |
| ``` |
|
|
| ### As a plain dataset |
|
|
| ```python |
| from datasets import load_dataset |
| import json |
| |
| ds = load_dataset("SeanWang0027/scienceworld-tcod-split") |
| cfg = json.loads(ds["test"][0]["task_desc"]) |
| # {'task_name': 'find-non-living-thing', 'var_num': 85, 'jar_path': ''} |
| |
| from scienceworld import ScienceWorldEnv |
| env = ScienceWorldEnv("", cfg["jar_path"], envStepLimit=100) |
| env.load(cfg["task_name"], cfg["var_num"], "easy", generateGoldPath=False) |
| obs, info = env.reset() |
| ``` |
|
|
| Note the third `load` argument: TCOD's workflow passes |
| `simplification_str="easy"` by default. |
|
|
| ## How the split was made |
|
|
| Reproduced from `TCOD_examples/scienceworld/get_sciworld_data.py`, not |
| re-implemented — `build_split.py` in this repo imports that script and calls its |
| `create_dataset_files` with `percentage=0.5` and upstream's hardcoded 17-task |
| train list. Test task types come from a set difference, so the two splits are |
| disjoint by construction. |
|
|
| For each task type, variations `0 .. int(count * 0.5) - 1` are taken. |
|
|
| ### Verification |
|
|
| - Row-for-row identical to the upstream generator on `(task_name, var_num)` and |
| ordering; only `jar_path` differs. |
| - No task type appears in both splits (17 train / 13 test, 30 total). |
| - All 30 hardcoded variation counts match ScienceWorld 1.2.3's own |
| `get_variations_train/dev/test` totals, so no emitted `var_num` is out of range. |
| - Sampled rows from both splits load, `reset()` and `step()` through TCOD's own |
| `_create_scienceworld_env` using the package's builtin jar. |
|
|
| ## Caveats worth knowing before you report numbers |
|
|
| **This is not ScienceWorld's official split.** The official one splits *variations* |
| within each of the 30 task types (`env.get_variations_train/dev/test()`), so every |
| task type appears in both train and test. This one holds out *whole task types*. |
| The two measure different things and are not comparable. |
|
|
| **Many held-out types are near-siblings of trained ones.** 8 of the 13 test types |
| have a close analogue in train: `measure-melting-point-known-substance` → |
| `-unknown-substance`, `test-conductivity` → `test-conductivity-of-unknown-substances`, |
| `inclined-plane-friction-named-surfaces` → `-unnamed-surfaces`, |
| `mendelian-genetics-known-plant` → `-unknown-plant`, `find-living-thing`/`find-plant` → |
| `find-non-living-thing`/`find-animal`, `lifespan-shortest-lived` → |
| `lifespan-longest-lived`, `chemistry-mix-paint-secondary-color` → `-tertiary-color`, |
| `power-component` → `power-component-renewable-vs-nonrenewable-energy`. Zero-shot |
| transfer to a new task type is a weaker claim here than the phrasing suggests. |
|
|
| **There is no dev split.** Upstream YAMLs point `eval_tasksets` straight at test, |
| so anything used to pick a checkpoint is also what gets reported. Fix the |
| reporting rule in advance (e.g. always report the final checkpoint), or carve a |
| dev set out of train. |
|
|
| **Test is dominated by two task types.** `test-conductivity-of-unknown-substances` |
| (300) and `mendelian-genetics-unknown-plant` (240) are 41% of the 1308 rows, while |
| `identify-life-stages-1` has 7. Rows are shuffled with seed 42, so a truncated |
| evaluation still samples proportionally — but a plain mean over the test split is |
| largely those two task types. Per-task-type breakdowns are in `split_stats.json`. |
|
|
| **Half of every task type's variations are unused.** Only indices below |
| `count * 0.5` are emitted, in both splits — 3605 variations are dropped entirely. |
|
|
| ## Reward |
|
|
| TCOD's ScienceWorld workflow uses `best_score / 100.0`, where `best_score` is the |
| highest `info["score"]` seen at any point in the episode. ScienceWorld scores range |
| over `[-100, 100]`, so this reward can be **negative**, and a mid-episode peak is |
| not lost by later mistakes. |
|
|
| ## License and provenance |
|
|
| Apache-2.0, matching TCOD and FutureBridge-OPD. The underlying environment is |
| [ScienceWorld](https://github.com/allenai/ScienceWorld); the split definition is |
| from [TCOD](https://github.com/kokolerk/TCOD). |
|
|