Skip to content

graph-coloring

View Markdown

Color a small graph with three colors so that no edge joins two nodes of the same color.

Field Value
Reference nodus/graph-coloring@1.0.0
Image nodus/env-graph-coloring:1.0.0
Publisher Nodus
Category Reasoning
Readiness Stable
Modes Train, Evaluate
Reward Binary
Held-out measures TrainedTask
Splits 200 train, 64 test (disjoint by canonical identity)
Licenses code Apache-2.0, data Apache-2.0
Source https://github.com/nodus-compute/nodus-platform/tree/main/images/environments

Completions are graded by the platform, never by the trainer: the trainer submits {taskId, completion} batches and the verdicts come back as task events.

Grader Kind What it checks
proper-coloring Program Checks every edge joins two different colors; any proper coloring is correct

One line of nodus-env tasks --split test --seed 0; tasks never carry answers.

{
"metadata": {
"edges": 12,
"nodes": 7
},
"prompt": "A graph has 7 nodes numbered 0 to 6 and these edges: 0-1, 0-2, 0-4, 1-3, 1-6, 2-3, 2-4, 2-5, 3-4, 3-5, 3-6, 4-6.\nAssign each node one of the colors 0, 1 or 2 so that no edge connects two nodes of the same color.\nAnswer with the colors of nodes 0 to 6 in order, like \u003canswer\u003e[0, 1, 2, 0]\u003c/answer\u003e.",
"taskId": "graph-coloring:test:0:0"
}

Each example is a TrainingJob template. A baseline is shown only where the example was measured by running it.

Example Mode Runtime Model Tasks Baseline Trained Measured on
graph-coloring-grpo Train nodus/grpo-lora Qwen/Qwen3-0.6B @ c1899de 64 not measured not measured not measured

Run one with a server dry-run first:

Terminal window
$ nodus create trainingjob my-run --from-example nodus/graph-coloring:graph-coloring-grpo --dry-run=server -o estimate
import nodus
job = nodus.recipes.TrainingJob.from_example("nodus/graph-coloring:graph-coloring-grpo")
plan = job.preview()
run = plan.run(max_cost=5)
print(run.wait().summary)