Dataset Preview
Duplicate
The full dataset viewer is not available (click to read why). Only showing a preview of the rows.
The dataset generation failed
Error code:   DatasetGenerationError
Exception:    ArrowInvalid
Message:      Column 7: In chunk 0: Invalid: Struct child array #7 invalid: Invalid: List child array invalid: Invalid: Struct child array #4 invalid: Invalid: Length spanned by list offsets (61835) larger than values array (length 61834)
Traceback:    Traceback (most recent call last):
                File "/usr/local/lib/python3.14/site-packages/datasets/builder.py", line 1848, in _prepare_split_single
                  writer.write_table(table)
                  ~~~~~~~~~~~~~~~~~~^^^^^^^
                File "/usr/local/lib/python3.14/site-packages/datasets/arrow_writer.py", line 784, in write_table
                  self._write_table(pa_table, writer_batch_size=writer_batch_size)
                  ~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                File "/usr/local/lib/python3.14/site-packages/datasets/arrow_writer.py", line 800, in _write_table
                  self.pa_writer.write_table(pa_table, writer_batch_size)
                  ~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                File "/src/services/worker/src/worker/job_runners/config/parquet_and_info.py", line 604, in write_table
                  super().write_table(pa_table, row_group_size=row_group_size)  # type: ignore
                  ~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                File "/usr/local/lib/python3.14/site-packages/pyarrow/parquet/core.py", line 1213, in write_table
                  self.writer.write_table(table, row_group_size=row_group_size)
                  ~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                File "pyarrow/_parquet.pyx", line 2453, in pyarrow._parquet.ParquetWriter.write_table
                File "pyarrow/error.pxi", line 92, in pyarrow.lib.check_status
              pyarrow.lib.ArrowInvalid: Column 7: In chunk 0: Invalid: Struct child array #7 invalid: Invalid: List child array invalid: Invalid: Struct child array #4 invalid: Invalid: Length spanned by list offsets (61835) larger than values array (length 61834)
              
              The above exception was the direct cause of the following exception:
              
              Traceback (most recent call last):
                File "/src/services/worker/src/worker/job_runners/config/parquet_and_info.py", line 1369, in compute_config_parquet_and_info_response
                  parquet_operations, partial, estimated_dataset_info = stream_convert_to_parquet(
                                                                        ~~~~~~~~~~~~~~~~~~~~~~~~~^
                      builder, max_dataset_size_bytes=max_dataset_size_bytes
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                  )
                  ^
                File "/src/services/worker/src/worker/job_runners/config/parquet_and_info.py", line 948, in stream_convert_to_parquet
                  builder._prepare_split(split_generator=splits_generators[split], file_format="parquet")
                  ~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                File "/usr/local/lib/python3.14/site-packages/datasets/builder.py", line 1694, in _prepare_split
                  for job_id, done, content in self._prepare_split_single(
                                               ~~~~~~~~~~~~~~~~~~~~~~~~~~^
                      gen_kwargs=gen_kwargs, job_id=job_id, **_prepare_split_args
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                  ):
                  ^
                File "/usr/local/lib/python3.14/site-packages/datasets/builder.py", line 1879, in _prepare_split_single
                  raise DatasetGenerationError("An error occurred while generating the dataset") from e
              datasets.exceptions.DatasetGenerationError: An error occurred while generating the dataset

Need help to make the dataset viewer work? Make sure to review how to configure the dataset viewer, and open a discussion for direct support.

task_id
string
split
string
in_submission
bool
tier
string
day
timestamp[s]
runs
int64
prompt
string
task
dict
gnlw-2025-01-01-1830-210m-compound-0
train
true
compound
2025-01-01T00:00:00
18
You are the train dispatcher (treindienstleider) for Arriva's line between Leeuwarden and Groningen in the Netherlands, on a real day in 2025. Long stretches of the line are single track: trains going opposite ways can only pass each other at stations with two tracks or on the double-track parts. Something has gone wro...
{ "task_id": "gnlw-2025-01-01-1830-210m-compound-0", "split": "train", "line": "GN-LW", "day": "2025-01-01T00:00:00", "start": 1110, "end": 1320, "network": { "line": "GN-LW", "name": "Groningen - Leeuwarden (Staatslijn B, Arriva)", "points": [ { "code": "LW", "name": "Le...
gnlw-2025-01-03-1700-180m-loop-0
train
true
loop
2025-01-03T00:00:00
30
You are the train dispatcher (treindienstleider) for Arriva's line between Leeuwarden and Groningen in the Netherlands, on a real day in 2025. Long stretches of the line are single track: trains going opposite ways can only pass each other at stations with two tracks or on the double-track parts. Something has gone wro...
{ "task_id": "gnlw-2025-01-03-1700-180m-loop-0", "split": "train", "line": "GN-LW", "day": "2025-01-03T00:00:00", "start": 1020, "end": 1200, "network": { "line": "GN-LW", "name": "Groningen - Leeuwarden (Staatslijn B, Arriva)", "points": [ { "code": "LW", "name": "Leeuwa...
gnlw-2025-01-05-0800-210m-compound-0
train
true
compound
2025-01-05T00:00:00
15
You are the train dispatcher (treindienstleider) for Arriva's line between Leeuwarden and Groningen in the Netherlands, on a real day in 2025. Long stretches of the line are single track: trains going opposite ways can only pass each other at stations with two tracks or on the double-track parts. Something has gone wro...
{ "task_id": "gnlw-2025-01-05-0800-210m-compound-0", "split": "train", "line": "GN-LW", "day": "2025-01-05T00:00:00", "start": 480, "end": 690, "network": { "line": "GN-LW", "name": "Groningen - Leeuwarden (Staatslijn B, Arriva)", "points": [ { "code": "LW", "name": "Leeu...
gnlw-2025-01-07-0703-180m-real-0
train
true
real
2025-01-07T00:00:00
26
You are the train dispatcher (treindienstleider) for Arriva's line between Leeuwarden and Groningen in the Netherlands, on a real day in 2025. Long stretches of the line are single track: trains going opposite ways can only pass each other at stations with two tracks or on the double-track parts. Something has gone wro...
{ "task_id": "gnlw-2025-01-07-0703-180m-real-0", "split": "train", "line": "GN-LW", "day": "2025-01-07T00:00:00", "start": 423, "end": 603, "network": { "line": "GN-LW", "name": "Groningen - Leeuwarden (Staatslijn B, Arriva)", "points": [ { "code": "LW", "name": "Leeuward...
gnlw-2025-01-08-1800-150m-loop-0
train
true
loop
2025-01-08T00:00:00
25
You are the train dispatcher (treindienstleider) for Arriva's line between Leeuwarden and Groningen in the Netherlands, on a real day in 2025. Long stretches of the line are single track: trains going opposite ways can only pass each other at stations with two tracks or on the double-track parts. Something has gone wro...
{ "task_id": "gnlw-2025-01-08-1800-150m-loop-0", "split": "train", "line": "GN-LW", "day": "2025-01-08T00:00:00", "start": 1080, "end": 1230, "network": { "line": "GN-LW", "name": "Groningen - Leeuwarden (Staatslijn B, Arriva)", "points": [ { "code": "LW", "name": "Leeuwa...
gnlw-2025-01-13-1630-150m-blockage-0
train
true
blockage
2025-01-13T00:00:00
26
You are the train dispatcher (treindienstleider) for Arriva's line between Leeuwarden and Groningen in the Netherlands, on a real day in 2025. Long stretches of the line are single track: trains going opposite ways can only pass each other at stations with two tracks or on the double-track parts. Something has gone wro...
{ "task_id": "gnlw-2025-01-13-1630-150m-blockage-0", "split": "train", "line": "GN-LW", "day": "2025-01-13T00:00:00", "start": 990, "end": 1140, "network": { "line": "GN-LW", "name": "Groningen - Leeuwarden (Staatslijn B, Arriva)", "points": [ { "code": "LW", "name": "Lee...
gnlw-2025-01-14-1800-150m-loop-0
train
true
loop
2025-01-14T00:00:00
25
You are the train dispatcher (treindienstleider) for Arriva's line between Leeuwarden and Groningen in the Netherlands, on a real day in 2025. Long stretches of the line are single track: trains going opposite ways can only pass each other at stations with two tracks or on the double-track parts. Something has gone wro...
{ "task_id": "gnlw-2025-01-14-1800-150m-loop-0", "split": "train", "line": "GN-LW", "day": "2025-01-14T00:00:00", "start": 1080, "end": 1230, "network": { "line": "GN-LW", "name": "Groningen - Leeuwarden (Staatslijn B, Arriva)", "points": [ { "code": "LW", "name": "Leeuwa...
gnlw-2025-01-16-1802-180m-real-0
train
true
real
2025-01-16T00:00:00
24
You are the train dispatcher (treindienstleider) for Arriva's line between Leeuwarden and Groningen in the Netherlands, on a real day in 2025. Long stretches of the line are single track: trains going opposite ways can only pass each other at stations with two tracks or on the double-track parts. Something has gone wro...
{ "task_id": "gnlw-2025-01-16-1802-180m-real-0", "split": "train", "line": "GN-LW", "day": "2025-01-16T00:00:00", "start": 1067, "end": 1247, "network": { "line": "GN-LW", "name": "Groningen - Leeuwarden (Staatslijn B, Arriva)", "points": [ { "code": "LW", "name": "Leeuwa...
gnlw-2025-01-19-1830-210m-compound-0
train
true
compound
2025-01-19T00:00:00
18
"You are the train dispatcher (treindienstleider) for Arriva's line between Leeuwarden and Groningen(...TRUNCATED)
{"task_id":"gnlw-2025-01-19-1830-210m-compound-0","split":"train","line":"GN-LW","day":"2025-01-19T0(...TRUNCATED)
gnlw-2025-01-28-0900-150m-blockage-0
train
true
blockage
2025-01-28T00:00:00
26
"You are the train dispatcher (treindienstleider) for Arriva's line between Leeuwarden and Groningen(...TRUNCATED)
{"task_id":"gnlw-2025-01-28-0900-150m-blockage-0","split":"train","line":"GN-LW","day":"2025-01-28T0(...TRUNCATED)
End of preview.

RailSimEnv · OpenEnv Arena

An OpenEnv environment for OpenEnv Arena in industrial and physical systems. The agent is the train dispatcher for Arriva's line between Leeuwarden and Groningen (Netherlands): 55 km, mostly single track, on a real day between January and June 2025, rebuilt from the Rijden de Treinen record. Something has gone wrong: a broken-down train, a collision at a level crossing, a signal or points failure, or a closure drawn from the 2024-2025 disruption record. Every train is where it really was. The agent holds, short-turns or cancels trains so that opposing trains only meet where there are two tracks.

  • Image: ghcr.io/bp-high/railsim-arena@sha256:5389f8e12d313d3069f2f89ba327258cf126ef7a4d8a9388a00b52267b96409f (linux/amd64, public, 188 MB compressed), built with OpenEnv at 86a180ede21e044f7929b9a7783ad83aa67d83a3.
  • The full environment (MCP tools, train graph, 3D replay of any plan, an eval board of frontier and open models): bpHigh/RailSimEnv.

What it teaches

Planning under hard constraints with a simulator in the loop. The rules are few and exact (single-track sections, headways, platform tracks, closures, train-set continuity), but a plan that satisfies all of them while losing few stop-minutes is a real combinatorial search: one hold ripples through every later crossing. The agent gets a deterministic simulator (check_plan, 5 per episode) that returns every train's times, every rule break and the cost, and has to read it, repair the plan and decide when to stop.

Actions and observations

Every reply is one JSON object:

{"tool": "check_plan", "plan": [{"train": "37413", "to": "HDG"}, {"train": "37424", "from": "HDG", "hold": {"HDG": "07:31"}}]}
{"tool": "submit_plan", "plan": [{"train": "37419", "cancel": true}]}
{"tool": "finish"}

A plan lists only the trains it changes: hold (wait at a point until a time), to (short-turn at a turn point), from (start a run at a turn point) or cancel. The reset observation (output, 3.7k-6.5k Qwen tokens for the submitted tasks) is the rules and the situation: the line, the closures, every train's timetable, position and delay, and the train sets. A check answers in 1.5k-4k tokens of text (median 3.2k). 12 replies per episode; on the largest windows five checks fill most of a 32k-token conversation, so the agent has to submit before it runs out of room.

Reward

Graded once, on submit_plan, by pure-Python re-simulation against each task's proven CP-SAT optimum (no LLM judge):

  • a plan that breaks any rule: 0.2 x the share of trains that run cleanly (below 0.2);
  • a legal plan: 0.2 + 0.8 * exp(-g / 0.5), where g = (cost - optimum) / (optimum - floor + 100) and the floor is each train set alone with the closures. The optimum scores 1.0.
  • finish, or running out of replies without submitting: 0.0.

The reward is dense, so the five episodes of a GRPO group almost never tie. Doing nothing (an empty plan) is illegal on every submitted task and scores 0.02-0.18.

Tasks

tasks.jsonl holds every task the image serves (204), each with the exact reset text the model reads (prompt) and the public task (task); never the reference plan or its cost. The submission trains on 50 of the 159 train tasks (in_submission): four real disruptions and 18 blockage, 14 compound and 14 loop scenarios, one per day across January-June 2025, chosen without a model for windows whose reset fits in 6.6k tokens, leaving room for five checks in a 32k-token conversation. The 45 eval tasks (held-out weeks, chosen for hardness) stay out of training.

Verification

  • Every one of the 204 tasks, replayed over WebSocket from an anonymous pull of the pinned digest (2 CPUs, 2 GB): the optimal plan scores 1.0 (checked, then submitted, and also sent as a JSON string), an empty plan scores below 1, a nonsense plan below 0.2, finish 0.0, and an episode that spends its 12 replies on checks ends at 0.0.
  • openenv validate --url passes 6/6; /health answers in 4-8 s.
  • The submission's example actions (check_plan [], then submit_plan []) end every submitted task with a reward in [0, 1].

A smoke test with Qwen3.8-27B (thinking off, through Hugging Face Inference Providers, an Arena-style loop): 2 episodes on one train task, 11 replies, all valid JSON; both used their 5 checks and submitted plans that still broke rules (reward 0.139 each, against 0.164 for doing nothing). That is a format check, not a calibration.

Files

  • tasks.jsonl, submission.json (the Arena request), schema.json (GET /schema).
  • source/: the server (rail_openenv/arena.py), the simulator and grader (rail_core), the Dockerfile, the replay check, the calibration loop and the tests.

Licences

The code is MIT (LICENSE). The data keep their sources' licences:

data source licence
trains, timetables, delays, cancellations; disruptions Rijden de Treinen open data CC BY 4.0 ("Rijden de Treinen")
the line layout inside every task © OpenStreetMap contributors ODbL 1.0

The rolling-stock circulation, the disruption effects by cause and the cost weights are modelling choices.

Downloads last month
-