| "system": "You are a mechanical-arm lamp targeting solver. Given a multi-segment robotic arm anchored at a fixed base, choose one absolute angle for every joint so that the bulb at the arm's tip illuminates the target point.\n\nYou will receive: (a) one rendered image of the workspace showing the arm base, joints, segments, target, and any striped wall obstacles, and (b) a structured text body containing every numeric parameter (segment count, segment lengths, target coordinates, allowed angle range, allowed angle step, light radius, obstacle rectangles).\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: <one-line JSON>\n\nThe JSON object must follow the actions schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf the information is insufficient to choose a confident value for some joint, still output a complete FINAL_JSON line covering every joint (use the closest allowed angle from the allowed range). Never refuse, never return prose only.",
|
| "user": "## 1. TASK\nChoose one absolute angle for every joint of a fixed-base mechanical arm so that the bulb at the tip illuminates the target point.\nThe level is solved when the bulb's light radius covers the target AND no rod segment intersects any obstacle.\n\n## 2. WORLD MODEL\n- Arm base: the fixed mounting point of the arm. It does NOT move regardless of joint choices.\n- Joint: a pivot point connecting consecutive arm segments. There is one joint per segment, indexed 1..segment_count.\n- Segment / rod: a rigid white bar of fixed length attached to its joint.\n- Bulb: the light source rigidly attached to the tip of the last segment. Its position is the cumulative endpoint after applying all joint angles to the segments.\n- Light radius: the radius around the bulb within which the target counts as illuminated.\n- Target: the single point the bulb must illuminate.\n- Obstacle: an axis-aligned rectangle (or set of rectangles) the rods must NOT intersect.\n\n## 3. VISUAL LEGEND\n- Orange diamond: arm base (fixed).\n- White lines: arm segments (rods).\n- Blue small circles: joints.\n- Yellow circle: lamp bulb.\n- Pale yellow translucent disc: the lamp's light coverage radius.\n- Orange circle: target point.\n- Amber rectangles with diagonal stripes: obstacles. Rods may not intersect them.\n- Coordinate system: origin (0,0) marked on the grid; x increases to the right, y increases upward.\n\n## 4. INPUT FIELDS\n- sample_id: lamp-006\n- segment_count: 4\n- arm_base: (120.0, 0.0)\n- target: (20.48, -64.27)\n- light_radius: 24.0\n- angle_min: -180\n- angle_max: 180\n- angle_step: 5\n- segments:\n- joint 1: length=110\n- joint 2: length=70\n- joint 3: length=110\n- joint 4: length=70\n- obstacles:\n- wall_1: type=bar_vertical, pattern=warning_stripes\n part 1: x=0, y=-40, width=40, height=120\n- wall_2: type=l_corner, pattern=warning_stripes\n part 1: x=40, y=40, width=80, height=40\n part 2: x=40, y=40, width=40, height=120\n\n## 5. ACTION VOCABULARY\nA complete answer is one list of `action` objects, exactly one per joint:\n- action: {\"joint\": <int 1..segment_count>, \"angle\": <int degrees>}\n- `joint` is 1-indexed and identifies which segment this angle controls.\n- `angle` is the absolute angle of that segment measured counterclockwise from the positive x-axis. Positive values rotate counterclockwise; negative values rotate clockwise.\n\n## 6. CONSTRAINTS\n- The actions list must contain exactly `segment_count` items, one per joint, with no duplicates.\n- Each `angle` is an integer in `[angle_min, angle_max]` that is also a multiple of `angle_step` offset from `angle_min`.\n- Angles are NOT cumulative across joints — each joint's angle is independent of the previous joint.\n- The first segment starts at the arm base. Each subsequent segment starts where the previous one ends.\n- No rod segment may intersect any obstacle rectangle.\n- The level is solved iff the final bulb position is within `light_radius` of the target AND no rod intersects any obstacle.\n\n## 7. SOLVING ADVICE\n- Identify a coarse joint configuration that points the tip toward the target, then refine each angle independently.\n- When obstacles are present, prefer paths that route the rod chain around them; an angle that produces a visually shorter path is not always feasible.\n- The light radius can be tight (often 20–30 units), so even a 5° error on a single joint can miss the target.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"actions\":[{\"joint\":1,\"angle\":<int>},{\"joint\":2,\"angle\":<int>}, ...]}\n- actions: list of length `segment_count`, joints `1..segment_count` each appearing exactly once.\n- joint: integer in `1..segment_count`.\n- angle: integer in `[angle_min, angle_max]`, multiple of `angle_step`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it."
|