simverse2026 / lamp /README.md
SimVer-ano's picture
Update lamp README to new owner SimVer-ano
102c339 verified
# SimVerse / lamp
Mechanical-arm lamp targeting: choose one absolute angle for every joint of a fixed-base multi-segment arm so that the bulb at the tip illuminates a target point without any rod intersecting an obstacle.
- **Records:** 610 levels
- **Modality:** single rendered image (workspace with arm, target, obstacles)
- **Output:** `{"actions": [{"joint": <int>, "angle": <int>}, ...]}`
## Loading
```python
from datasets import load_dataset
ds = load_dataset("SimVer-ano/simverse2026", "lamp")
example = ds["test"][0]
# Prompt text (already in the record — no construction needed)
system_text = example["prompt"]["system"]
user_text = example["prompt"]["user"]
# Image
image_path = example["images_relative_to_config"]["image"] # e.g. "images/lamp-000.png"
# Gold answer
gold_actions = example["answer"]["actions"] # list of {joint, angle}
# Other useful task fields
print(example["arm"]["segmentCount"]) # number of joints
print(example["arm"]["angleStep"]) # allowed angle granularity
print(example["arm"]["angleMin"], example["arm"]["angleMax"])
```
## Schema
| Field | Type | Description |
|---|---|---|
| `id` | string | Sample id, e.g. `"lamp-000"` |
| `__sample_id__` | string | Same as `id`, exposed for HF loader convenience |
| `prompt.system` | string | The exact 5-section system prompt the benchmark uses |
| `prompt.user` | string | The exact 9-section user prompt for this level |
| `arm.segmentCount` | int | Number of arm segments (= number of joints) |
| `arm.segments` | list[{length}] | Lengths of each segment |
| `arm.angleMin/Max/Step` | int | Allowed angle range and step size |
| `target` | {x, y} | Target point coordinates |
| `lamp.lightRadius` | float | Coverage radius of the bulb |
| `obstacles` | list of obstacle objects | Striped wall blocks the rods must not intersect |
| `images_relative_to_config.image` | string | Image path relative to this config's root |
| `answer.actions` | list[{joint, angle}] | Reference solution; one known-valid joint configuration |
| `legacy_answer` | list[int] | Pre-v1 flat-array form of the answer (kept for back-compat; see SimVerse repo migration notes) |
## Solving by hand: minimal pipeline
```python
import openai
def solve(example, model="gpt-5"):
response = openai.chat.completions.create(
model=model,
messages=[
{"role": "system", "content": example["prompt"]["system"]},
{"role": "user", "content": [
{"type": "text", "text": example["prompt"]["user"]},
{"type": "image_url",
"image_url": {"url": f"file://{example['images_relative_to_config']['image']}"}},
]},
],
)
return response.choices[0].message.content
# The reply ends with "FINAL_JSON: {...}" — extract and parse:
import re, json
reply = solve(example)
final_json = json.loads(re.search(r"FINAL_JSON:\s*(\{.*\})", reply, re.DOTALL).group(1))
```
## License
MIT — see [LICENSE](../LICENSE) at the repo root.