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.

You 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).

You 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>

The 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.

If 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.

## 1. TASK
Choose one absolute angle for every joint of a fixed-base mechanical arm so that the bulb at the tip illuminates the target point.
The level is solved when the bulb's light radius covers the target AND no rod segment intersects any obstacle.

## 2. WORLD MODEL
- Arm base: the fixed mounting point of the arm. It does NOT move regardless of joint choices.
- Joint: a pivot point connecting consecutive arm segments. There is one joint per segment, indexed 1..segment_count.
- Segment / rod: a rigid white bar of fixed length attached to its joint.
- 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.
- Light radius: the radius around the bulb within which the target counts as illuminated.
- Target: the single point the bulb must illuminate.
- Obstacle: an axis-aligned rectangle (or set of rectangles) the rods must NOT intersect.

## 3. VISUAL LEGEND
- Orange diamond: arm base (fixed).
- White lines: arm segments (rods).
- Blue small circles: joints.
- Yellow circle: lamp bulb.
- Pale yellow translucent disc: the lamp's light coverage radius.
- Orange circle: target point.
- Amber rectangles with diagonal stripes: obstacles. Rods may not intersect them.
- Coordinate system: origin (0,0) marked on the grid; x increases to the right, y increases upward.

## 4. INPUT FIELDS
- sample_id: lamp-515
- segment_count: 5
- arm_base: (40.0, 0.0)
- target: (142.84, -54.54)
- light_radius: 24.0
- angle_min: -180
- angle_max: 180
- angle_step: 5
- segments:
- joint 1: length=70
- joint 2: length=50
- joint 3: length=90
- joint 4: length=50
- joint 5: length=110
- obstacles:
- wall_1: type=bar_horizontal, pattern=warning_stripes
  part 1: x=0, y=-80, width=120, height=40

## 5. ACTION VOCABULARY
A complete answer is one list of `action` objects, exactly one per joint:
- action: {"joint": <int 1..segment_count>, "angle": <int degrees>}
- `joint` is 1-indexed and identifies which segment this angle controls.
- `angle` is the absolute angle of that segment measured counterclockwise from the positive x-axis. Positive values rotate counterclockwise; negative values rotate clockwise.

## 6. CONSTRAINTS
- The actions list must contain exactly `segment_count` items, one per joint, with no duplicates.
- Each `angle` is an integer in `[angle_min, angle_max]` that is also a multiple of `angle_step` offset from `angle_min`.
- Angles are NOT cumulative across joints — each joint's angle is independent of the previous joint.
- The first segment starts at the arm base. Each subsequent segment starts where the previous one ends.
- No rod segment may intersect any obstacle rectangle.
- The level is solved iff the final bulb position is within `light_radius` of the target AND no rod intersects any obstacle.

## 7. SOLVING ADVICE
- Identify a coarse joint configuration that points the tip toward the target, then refine each angle independently.
- 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.
- The light radius can be tight (often 20–30 units), so even a 5° error on a single joint can miss the target.

## 8. OUTPUT SCHEMA
FINAL_JSON: {"actions":[{"joint":1,"angle":<int>},{"joint":2,"angle":<int>}, ...]}
- actions: list of length `segment_count`, joints `1..segment_count` each appearing exactly once.
- joint: integer in `1..segment_count`.
- angle: integer in `[angle_min, angle_max]`, multiple of `angle_step`.

## 9. FINAL INSTRUCTION
You may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.
Do not wrap FINAL_JSON in code fences and do not write anything after it.


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.

You 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).

You 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>

The 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.

If 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.

## 1. TASK
Choose one absolute angle for every joint of a fixed-base mechanical arm so that the bulb at the tip illuminates the target point.
The level is solved when the bulb's light radius covers the target AND no rod segment intersects any obstacle.

## 2. WORLD MODEL
- Arm base: the fixed mounting point of the arm. It does NOT move regardless of joint choices.
- Joint: a pivot point connecting consecutive arm segments. There is one joint per segment, indexed 1..segment_count.
- Segment / rod: a rigid white bar of fixed length attached to its joint.
- 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.
- Light radius: the radius around the bulb within which the target counts as illuminated.
- Target: the single point the bulb must illuminate.
- Obstacle: an axis-aligned rectangle (or set of rectangles) the rods must NOT intersect.

## 3. VISUAL LEGEND
- Orange diamond: arm base (fixed).
- White lines: arm segments (rods).
- Blue small circles: joints.
- Yellow circle: lamp bulb.
- Pale yellow translucent disc: the lamp's light coverage radius.
- Orange circle: target point.
- Amber rectangles with diagonal stripes: obstacles. Rods may not intersect them.
- Coordinate system: origin (0,0) marked on the grid; x increases to the right, y increases upward.

## 4. INPUT FIELDS
- sample_id: lamp-516
- segment_count: 2
- arm_base: (40.0, 80.0)
- target: (2.84, 247.6)
- light_radius: 24.0
- angle_min: -180
- angle_max: 180
- angle_step: 5
- segments:
- joint 1: length=90
- joint 2: length=90
- obstacles:
- wall_1: type=bar_vertical, pattern=warning_stripes
  part 1: x=80, y=120, width=40, height=120
- wall_2: type=l_corner, pattern=warning_stripes
  part 1: x=40, y=240, width=80, height=40
  part 2: x=40, y=240, width=40, height=120

## 5. ACTION VOCABULARY
A complete answer is one list of `action` objects, exactly one per joint:
- action: {"joint": <int 1..segment_count>, "angle": <int degrees>}
- `joint` is 1-indexed and identifies which segment this angle controls.
- `angle` is the absolute angle of that segment measured counterclockwise from the positive x-axis. Positive values rotate counterclockwise; negative values rotate clockwise.

## 6. CONSTRAINTS
- The actions list must contain exactly `segment_count` items, one per joint, with no duplicates.
- Each `angle` is an integer in `[angle_min, angle_max]` that is also a multiple of `angle_step` offset from `angle_min`.
- Angles are NOT cumulative across joints — each joint's angle is independent of the previous joint.
- The first segment starts at the arm base. Each subsequent segment starts where the previous one ends.
- No rod segment may intersect any obstacle rectangle.
- The level is solved iff the final bulb position is within `light_radius` of the target AND no rod intersects any obstacle.

## 7. SOLVING ADVICE
- Identify a coarse joint configuration that points the tip toward the target, then refine each angle independently.
- 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.
- The light radius can be tight (often 20–30 units), so even a 5° error on a single joint can miss the target.

## 8. OUTPUT SCHEMA
FINAL_JSON: {"actions":[{"joint":1,"angle":<int>},{"joint":2,"angle":<int>}, ...]}
- actions: list of length `segment_count`, joints `1..segment_count` each appearing exactly once.
- joint: integer in `1..segment_count`.
- angle: integer in `[angle_min, angle_max]`, multiple of `angle_step`.

## 9. FINAL INSTRUCTION
You may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.
Do not wrap FINAL_JSON in code fences and do not write anything after it.


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.

You 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).

You 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>

The 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.

If 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.

## 1. TASK
Choose one absolute angle for every joint of a fixed-base mechanical arm so that the bulb at the tip illuminates the target point.
The level is solved when the bulb's light radius covers the target AND no rod segment intersects any obstacle.

## 2. WORLD MODEL
- Arm base: the fixed mounting point of the arm. It does NOT move regardless of joint choices.
- Joint: a pivot point connecting consecutive arm segments. There is one joint per segment, indexed 1..segment_count.
- Segment / rod: a rigid white bar of fixed length attached to its joint.
- 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.
- Light radius: the radius around the bulb within which the target counts as illuminated.
- Target: the single point the bulb must illuminate.
- Obstacle: an axis-aligned rectangle (or set of rectangles) the rods must NOT intersect.

## 3. VISUAL LEGEND
- Orange diamond: arm base (fixed).
- White lines: arm segments (rods).
- Blue small circles: joints.
- Yellow circle: lamp bulb.
- Pale yellow translucent disc: the lamp's light coverage radius.
- Orange circle: target point.
- Amber rectangles with diagonal stripes: obstacles. Rods may not intersect them.
- Coordinate system: origin (0,0) marked on the grid; x increases to the right, y increases upward.

## 4. INPUT FIELDS
- sample_id: lamp-517
- segment_count: 5
- arm_base: (40.0, -80.0)
- target: (260.99, 2.37)
- light_radius: 24.0
- angle_min: -180
- angle_max: 180
- angle_step: 5
- segments:
- joint 1: length=70
- joint 2: length=110
- joint 3: length=70
- joint 4: length=90
- joint 5: length=90
- obstacles:
- wall_1: type=stair, pattern=warning_stripes
  part 1: x=80, y=0, width=80, height=40
  part 2: x=120, y=40, width=80, height=40
- wall_2: type=l_corner, pattern=warning_stripes
  part 1: x=40, y=-40, width=80, height=40
  part 2: x=40, y=-40, width=40, height=120

## 5. ACTION VOCABULARY
A complete answer is one list of `action` objects, exactly one per joint:
- action: {"joint": <int 1..segment_count>, "angle": <int degrees>}
- `joint` is 1-indexed and identifies which segment this angle controls.
- `angle` is the absolute angle of that segment measured counterclockwise from the positive x-axis. Positive values rotate counterclockwise; negative values rotate clockwise.

## 6. CONSTRAINTS
- The actions list must contain exactly `segment_count` items, one per joint, with no duplicates.
- Each `angle` is an integer in `[angle_min, angle_max]` that is also a multiple of `angle_step` offset from `angle_min`.
- Angles are NOT cumulative across joints — each joint's angle is independent of the previous joint.
- The first segment starts at the arm base. Each subsequent segment starts where the previous one ends.
- No rod segment may intersect any obstacle rectangle.
- The level is solved iff the final bulb position is within `light_radius` of the target AND no rod intersects any obstacle.

## 7. SOLVING ADVICE
- Identify a coarse joint configuration that points the tip toward the target, then refine each angle independently.
- 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.
- The light radius can be tight (often 20–30 units), so even a 5° error on a single joint can miss the target.

## 8. OUTPUT SCHEMA
FINAL_JSON: {"actions":[{"joint":1,"angle":<int>},{"joint":2,"angle":<int>}, ...]}
- actions: list of length `segment_count`, joints `1..segment_count` each appearing exactly once.
- joint: integer in `1..segment_count`.
- angle: integer in `[angle_min, angle_max]`, multiple of `angle_step`.

## 9. FINAL INSTRUCTION
You may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.
Do not wrap FINAL_JSON in code fences and do not write anything after it.


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.

You 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).

You 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>

The 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.

If 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.

## 1. TASK
Choose one absolute angle for every joint of a fixed-base mechanical arm so that the bulb at the tip illuminates the target point.
The level is solved when the bulb's light radius covers the target AND no rod segment intersects any obstacle.

## 2. WORLD MODEL
- Arm base: the fixed mounting point of the arm. It does NOT move regardless of joint choices.
- Joint: a pivot point connecting consecutive arm segments. There is one joint per segment, indexed 1..segment_count.
- Segment / rod: a rigid white bar of fixed length attached to its joint.
- 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.
- Light radius: the radius around the bulb within which the target counts as illuminated.
- Target: the single point the bulb must illuminate.
- Obstacle: an axis-aligned rectangle (or set of rectangles) the rods must NOT intersect.

## 3. VISUAL LEGEND
- Orange diamond: arm base (fixed).
- White lines: arm segments (rods).
- Blue small circles: joints.
- Yellow circle: lamp bulb.
- Pale yellow translucent disc: the lamp's light coverage radius.
- Orange circle: target point.
- Amber rectangles with diagonal stripes: obstacles. Rods may not intersect them.
- Coordinate system: origin (0,0) marked on the grid; x increases to the right, y increases upward.

## 4. INPUT FIELDS
- sample_id: lamp-518
- segment_count: 4
- arm_base: (120.0, 80.0)
- target: (17.21, 95.99)
- light_radius: 24.0
- angle_min: -180
- angle_max: 180
- angle_step: 5
- segments:
- joint 1: length=70
- joint 2: length=90
- joint 3: length=110
- joint 4: length=110
- obstacles:
- wall_1: type=stair, pattern=warning_stripes
  part 1: x=40, y=120, width=80, height=40
  part 2: x=80, y=160, width=80, height=40
- wall_2: type=l_corner, pattern=warning_stripes
  part 1: x=-40, y=40, width=80, height=40
  part 2: x=-40, y=40, width=40, height=120

## 5. ACTION VOCABULARY
A complete answer is one list of `action` objects, exactly one per joint:
- action: {"joint": <int 1..segment_count>, "angle": <int degrees>}
- `joint` is 1-indexed and identifies which segment this angle controls.
- `angle` is the absolute angle of that segment measured counterclockwise from the positive x-axis. Positive values rotate counterclockwise; negative values rotate clockwise.

## 6. CONSTRAINTS
- The actions list must contain exactly `segment_count` items, one per joint, with no duplicates.
- Each `angle` is an integer in `[angle_min, angle_max]` that is also a multiple of `angle_step` offset from `angle_min`.
- Angles are NOT cumulative across joints — each joint's angle is independent of the previous joint.
- The first segment starts at the arm base. Each subsequent segment starts where the previous one ends.
- No rod segment may intersect any obstacle rectangle.
- The level is solved iff the final bulb position is within `light_radius` of the target AND no rod intersects any obstacle.

## 7. SOLVING ADVICE
- Identify a coarse joint configuration that points the tip toward the target, then refine each angle independently.
- 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.
- The light radius can be tight (often 20–30 units), so even a 5° error on a single joint can miss the target.

## 8. OUTPUT SCHEMA
FINAL_JSON: {"actions":[{"joint":1,"angle":<int>},{"joint":2,"angle":<int>}, ...]}
- actions: list of length `segment_count`, joints `1..segment_count` each appearing exactly once.
- joint: integer in `1..segment_count`.
- angle: integer in `[angle_min, angle_max]`, multiple of `angle_step`.

## 9. FINAL INSTRUCTION
You may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.
Do not wrap FINAL_JSON in code fences and do not write anything after it.


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.

You 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).

You 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>

The 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.

If 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.

## 1. TASK
Choose one absolute angle for every joint of a fixed-base mechanical arm so that the bulb at the tip illuminates the target point.
The level is solved when the bulb's light radius covers the target AND no rod segment intersects any obstacle.

## 2. WORLD MODEL
- Arm base: the fixed mounting point of the arm. It does NOT move regardless of joint choices.
- Joint: a pivot point connecting consecutive arm segments. There is one joint per segment, indexed 1..segment_count.
- Segment / rod: a rigid white bar of fixed length attached to its joint.
- 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.
- Light radius: the radius around the bulb within which the target counts as illuminated.
- Target: the single point the bulb must illuminate.
- Obstacle: an axis-aligned rectangle (or set of rectangles) the rods must NOT intersect.

## 3. VISUAL LEGEND
- Orange diamond: arm base (fixed).
- White lines: arm segments (rods).
- Blue small circles: joints.
- Yellow circle: lamp bulb.
- Pale yellow translucent disc: the lamp's light coverage radius.
- Orange circle: target point.
- Amber rectangles with diagonal stripes: obstacles. Rods may not intersect them.
- Coordinate system: origin (0,0) marked on the grid; x increases to the right, y increases upward.

## 4. INPUT FIELDS
- sample_id: lamp-519
- segment_count: 4
- arm_base: (80.0, -40.0)
- target: (55.24, 103.43)
- light_radius: 24.0
- angle_min: -180
- angle_max: 180
- angle_step: 5
- segments:
- joint 1: length=90
- joint 2: length=90
- joint 3: length=90
- joint 4: length=110
- obstacles:
- wall_1: type=stair, pattern=warning_stripes
  part 1: x=40, y=0, width=80, height=40
  part 2: x=80, y=40, width=80, height=40
- wall_2: type=bar_horizontal, pattern=warning_stripes
  part 1: x=-40, y=40, width=120, height=40

## 5. ACTION VOCABULARY
A complete answer is one list of `action` objects, exactly one per joint:
- action: {"joint": <int 1..segment_count>, "angle": <int degrees>}
- `joint` is 1-indexed and identifies which segment this angle controls.
- `angle` is the absolute angle of that segment measured counterclockwise from the positive x-axis. Positive values rotate counterclockwise; negative values rotate clockwise.

## 6. CONSTRAINTS
- The actions list must contain exactly `segment_count` items, one per joint, with no duplicates.
- Each `angle` is an integer in `[angle_min, angle_max]` that is also a multiple of `angle_step` offset from `angle_min`.
- Angles are NOT cumulative across joints — each joint's angle is independent of the previous joint.
- The first segment starts at the arm base. Each subsequent segment starts where the previous one ends.
- No rod segment may intersect any obstacle rectangle.
- The level is solved iff the final bulb position is within `light_radius` of the target AND no rod intersects any obstacle.

## 7. SOLVING ADVICE
- Identify a coarse joint configuration that points the tip toward the target, then refine each angle independently.
- 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.
- The light radius can be tight (often 20–30 units), so even a 5° error on a single joint can miss the target.

## 8. OUTPUT SCHEMA
FINAL_JSON: {"actions":[{"joint":1,"angle":<int>},{"joint":2,"angle":<int>}, ...]}
- actions: list of length `segment_count`, joints `1..segment_count` each appearing exactly once.
- joint: integer in `1..segment_count`.
- angle: integer in `[angle_min, angle_max]`, multiple of `angle_step`.

## 9. FINAL INSTRUCTION
You may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.
Do not wrap FINAL_JSON in code fences and do not write anything after it.


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.

You 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).

You 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>

The 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.

If 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.

## 1. TASK
Choose one absolute angle for every joint of a fixed-base mechanical arm so that the bulb at the tip illuminates the target point.
The level is solved when the bulb's light radius covers the target AND no rod segment intersects any obstacle.

## 2. WORLD MODEL
- Arm base: the fixed mounting point of the arm. It does NOT move regardless of joint choices.
- Joint: a pivot point connecting consecutive arm segments. There is one joint per segment, indexed 1..segment_count.
- Segment / rod: a rigid white bar of fixed length attached to its joint.
- 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.
- Light radius: the radius around the bulb within which the target counts as illuminated.
- Target: the single point the bulb must illuminate.
- Obstacle: an axis-aligned rectangle (or set of rectangles) the rods must NOT intersect.

## 3. VISUAL LEGEND
- Orange diamond: arm base (fixed).
- White lines: arm segments (rods).
- Blue small circles: joints.
- Yellow circle: lamp bulb.
- Pale yellow translucent disc: the lamp's light coverage radius.
- Orange circle: target point.
- Amber rectangles with diagonal stripes: obstacles. Rods may not intersect them.
- Coordinate system: origin (0,0) marked on the grid; x increases to the right, y increases upward.

## 4. INPUT FIELDS
- sample_id: lamp-520
- segment_count: 5
- arm_base: (80.0, 40.0)
- target: (114.2, 90.87)
- light_radius: 24.0
- angle_min: -180
- angle_max: 180
- angle_step: 5
- segments:
- joint 1: length=50
- joint 2: length=50
- joint 3: length=70
- joint 4: length=50
- joint 5: length=70
- obstacles:
- wall_1: type=stair, pattern=warning_stripes
  part 1: x=120, y=80, width=80, height=40
  part 2: x=160, y=120, width=80, height=40
- wall_2: type=l_corner, pattern=warning_stripes
  part 1: x=40, y=120, width=80, height=40
  part 2: x=40, y=120, width=40, height=120

## 5. ACTION VOCABULARY
A complete answer is one list of `action` objects, exactly one per joint:
- action: {"joint": <int 1..segment_count>, "angle": <int degrees>}
- `joint` is 1-indexed and identifies which segment this angle controls.
- `angle` is the absolute angle of that segment measured counterclockwise from the positive x-axis. Positive values rotate counterclockwise; negative values rotate clockwise.

## 6. CONSTRAINTS
- The actions list must contain exactly `segment_count` items, one per joint, with no duplicates.
- Each `angle` is an integer in `[angle_min, angle_max]` that is also a multiple of `angle_step` offset from `angle_min`.
- Angles are NOT cumulative across joints — each joint's angle is independent of the previous joint.
- The first segment starts at the arm base. Each subsequent segment starts where the previous one ends.
- No rod segment may intersect any obstacle rectangle.
- The level is solved iff the final bulb position is within `light_radius` of the target AND no rod intersects any obstacle.

## 7. SOLVING ADVICE
- Identify a coarse joint configuration that points the tip toward the target, then refine each angle independently.
- 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.
- The light radius can be tight (often 20–30 units), so even a 5° error on a single joint can miss the target.

## 8. OUTPUT SCHEMA
FINAL_JSON: {"actions":[{"joint":1,"angle":<int>},{"joint":2,"angle":<int>}, ...]}
- actions: list of length `segment_count`, joints `1..segment_count` each appearing exactly once.
- joint: integer in `1..segment_count`.
- angle: integer in `[angle_min, angle_max]`, multiple of `angle_step`.

## 9. FINAL INSTRUCTION
You may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.
Do not wrap FINAL_JSON in code fences and do not write anything after it.


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.

You 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).

You 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>

The 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.

If 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.

## 1. TASK
Choose one absolute angle for every joint of a fixed-base mechanical arm so that the bulb at the tip illuminates the target point.
The level is solved when the bulb's light radius covers the target AND no rod segment intersects any obstacle.

## 2. WORLD MODEL
- Arm base: the fixed mounting point of the arm. It does NOT move regardless of joint choices.
- Joint: a pivot point connecting consecutive arm segments. There is one joint per segment, indexed 1..segment_count.
- Segment / rod: a rigid white bar of fixed length attached to its joint.
- 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.
- Light radius: the radius around the bulb within which the target counts as illuminated.
- Target: the single point the bulb must illuminate.
- Obstacle: an axis-aligned rectangle (or set of rectangles) the rods must NOT intersect.

## 3. VISUAL LEGEND
- Orange diamond: arm base (fixed).
- White lines: arm segments (rods).
- Blue small circles: joints.
- Yellow circle: lamp bulb.
- Pale yellow translucent disc: the lamp's light coverage radius.
- Orange circle: target point.
- Amber rectangles with diagonal stripes: obstacles. Rods may not intersect them.
- Coordinate system: origin (0,0) marked on the grid; x increases to the right, y increases upward.

## 4. INPUT FIELDS
- sample_id: lamp-521
- segment_count: 4
- arm_base: (0.0, 120.0)
- target: (222.73, 49.25)
- light_radius: 24.0
- angle_min: -180
- angle_max: 180
- angle_step: 5
- segments:
- joint 1: length=110
- joint 2: length=50
- joint 3: length=110
- joint 4: length=90
- obstacles:
- wall_1: type=l_corner, pattern=warning_stripes
  part 1: x=80, y=160, width=80, height=40
  part 2: x=80, y=160, width=40, height=120
- wall_2: type=bar_horizontal, pattern=warning_stripes
  part 1: x=80, y=0, width=120, height=40

## 5. ACTION VOCABULARY
A complete answer is one list of `action` objects, exactly one per joint:
- action: {"joint": <int 1..segment_count>, "angle": <int degrees>}
- `joint` is 1-indexed and identifies which segment this angle controls.
- `angle` is the absolute angle of that segment measured counterclockwise from the positive x-axis. Positive values rotate counterclockwise; negative values rotate clockwise.

## 6. CONSTRAINTS
- The actions list must contain exactly `segment_count` items, one per joint, with no duplicates.
- Each `angle` is an integer in `[angle_min, angle_max]` that is also a multiple of `angle_step` offset from `angle_min`.
- Angles are NOT cumulative across joints — each joint's angle is independent of the previous joint.
- The first segment starts at the arm base. Each subsequent segment starts where the previous one ends.
- No rod segment may intersect any obstacle rectangle.
- The level is solved iff the final bulb position is within `light_radius` of the target AND no rod intersects any obstacle.

## 7. SOLVING ADVICE
- Identify a coarse joint configuration that points the tip toward the target, then refine each angle independently.
- 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.
- The light radius can be tight (often 20–30 units), so even a 5° error on a single joint can miss the target.

## 8. OUTPUT SCHEMA
FINAL_JSON: {"actions":[{"joint":1,"angle":<int>},{"joint":2,"angle":<int>}, ...]}
- actions: list of length `segment_count`, joints `1..segment_count` each appearing exactly once.
- joint: integer in `1..segment_count`.
- angle: integer in `[angle_min, angle_max]`, multiple of `angle_step`.

## 9. FINAL INSTRUCTION
You may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.
Do not wrap FINAL_JSON in code fences and do not write anything after it.


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.

You 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).

You 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>

The 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.

If 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.

## 1. TASK
Choose one absolute angle for every joint of a fixed-base mechanical arm so that the bulb at the tip illuminates the target point.
The level is solved when the bulb's light radius covers the target AND no rod segment intersects any obstacle.

## 2. WORLD MODEL
- Arm base: the fixed mounting point of the arm. It does NOT move regardless of joint choices.
- Joint: a pivot point connecting consecutive arm segments. There is one joint per segment, indexed 1..segment_count.
- Segment / rod: a rigid white bar of fixed length attached to its joint.
- 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.
- Light radius: the radius around the bulb within which the target counts as illuminated.
- Target: the single point the bulb must illuminate.
- Obstacle: an axis-aligned rectangle (or set of rectangles) the rods must NOT intersect.

## 3. VISUAL LEGEND
- Orange diamond: arm base (fixed).
- White lines: arm segments (rods).
- Blue small circles: joints.
- Yellow circle: lamp bulb.
- Pale yellow translucent disc: the lamp's light coverage radius.
- Orange circle: target point.
- Amber rectangles with diagonal stripes: obstacles. Rods may not intersect them.
- Coordinate system: origin (0,0) marked on the grid; x increases to the right, y increases upward.

## 4. INPUT FIELDS
- sample_id: lamp-522
- segment_count: 2
- arm_base: (-40.0, 40.0)
- target: (-116.31, 104.03)
- light_radius: 24.0
- angle_min: -180
- angle_max: 180
- angle_step: 5
- segments:
- joint 1: length=50
- joint 2: length=50
- obstacles:
- wall_1: type=block, pattern=warning_stripes
  part 1: x=-80, y=80, width=80, height=80
- wall_2: type=l_corner, pattern=warning_stripes
  part 1: x=-80, y=160, width=80, height=40
  part 2: x=-80, y=160, width=40, height=120

## 5. ACTION VOCABULARY
A complete answer is one list of `action` objects, exactly one per joint:
- action: {"joint": <int 1..segment_count>, "angle": <int degrees>}
- `joint` is 1-indexed and identifies which segment this angle controls.
- `angle` is the absolute angle of that segment measured counterclockwise from the positive x-axis. Positive values rotate counterclockwise; negative values rotate clockwise.

## 6. CONSTRAINTS
- The actions list must contain exactly `segment_count` items, one per joint, with no duplicates.
- Each `angle` is an integer in `[angle_min, angle_max]` that is also a multiple of `angle_step` offset from `angle_min`.
- Angles are NOT cumulative across joints — each joint's angle is independent of the previous joint.
- The first segment starts at the arm base. Each subsequent segment starts where the previous one ends.
- No rod segment may intersect any obstacle rectangle.
- The level is solved iff the final bulb position is within `light_radius` of the target AND no rod intersects any obstacle.

## 7. SOLVING ADVICE
- Identify a coarse joint configuration that points the tip toward the target, then refine each angle independently.
- 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.
- The light radius can be tight (often 20–30 units), so even a 5° error on a single joint can miss the target.

## 8. OUTPUT SCHEMA
FINAL_JSON: {"actions":[{"joint":1,"angle":<int>},{"joint":2,"angle":<int>}, ...]}
- actions: list of length `segment_count`, joints `1..segment_count` each appearing exactly once.
- joint: integer in `1..segment_count`.
- angle: integer in `[angle_min, angle_max]`, multiple of `angle_step`.

## 9. FINAL INSTRUCTION
You may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.
Do not wrap FINAL_JSON in code fences and do not write anything after it.


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.

You 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).

You 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>

The 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.

If 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.

## 1. TASK
Choose one absolute angle for every joint of a fixed-base mechanical arm so that the bulb at the tip illuminates the target point.
The level is solved when the bulb's light radius covers the target AND no rod segment intersects any obstacle.

## 2. WORLD MODEL
- Arm base: the fixed mounting point of the arm. It does NOT move regardless of joint choices.
- Joint: a pivot point connecting consecutive arm segments. There is one joint per segment, indexed 1..segment_count.
- Segment / rod: a rigid white bar of fixed length attached to its joint.
- 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.
- Light radius: the radius around the bulb within which the target counts as illuminated.
- Target: the single point the bulb must illuminate.
- Obstacle: an axis-aligned rectangle (or set of rectangles) the rods must NOT intersect.

## 3. VISUAL LEGEND
- Orange diamond: arm base (fixed).
- White lines: arm segments (rods).
- Blue small circles: joints.
- Yellow circle: lamp bulb.
- Pale yellow translucent disc: the lamp's light coverage radius.
- Orange circle: target point.
- Amber rectangles with diagonal stripes: obstacles. Rods may not intersect them.
- Coordinate system: origin (0,0) marked on the grid; x increases to the right, y increases upward.

## 4. INPUT FIELDS
- sample_id: lamp-523
- segment_count: 4
- arm_base: (40.0, 40.0)
- target: (10.47, 274.15)
- light_radius: 24.0
- angle_min: -180
- angle_max: 180
- angle_step: 5
- segments:
- joint 1: length=70
- joint 2: length=90
- joint 3: length=90
- joint 4: length=110
- obstacles:
- wall_1: type=bar_horizontal, pattern=warning_stripes
  part 1: x=0, y=200, width=120, height=40

## 5. ACTION VOCABULARY
A complete answer is one list of `action` objects, exactly one per joint:
- action: {"joint": <int 1..segment_count>, "angle": <int degrees>}
- `joint` is 1-indexed and identifies which segment this angle controls.
- `angle` is the absolute angle of that segment measured counterclockwise from the positive x-axis. Positive values rotate counterclockwise; negative values rotate clockwise.

## 6. CONSTRAINTS
- The actions list must contain exactly `segment_count` items, one per joint, with no duplicates.
- Each `angle` is an integer in `[angle_min, angle_max]` that is also a multiple of `angle_step` offset from `angle_min`.
- Angles are NOT cumulative across joints — each joint's angle is independent of the previous joint.
- The first segment starts at the arm base. Each subsequent segment starts where the previous one ends.
- No rod segment may intersect any obstacle rectangle.
- The level is solved iff the final bulb position is within `light_radius` of the target AND no rod intersects any obstacle.

## 7. SOLVING ADVICE
- Identify a coarse joint configuration that points the tip toward the target, then refine each angle independently.
- 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.
- The light radius can be tight (often 20–30 units), so even a 5° error on a single joint can miss the target.

## 8. OUTPUT SCHEMA
FINAL_JSON: {"actions":[{"joint":1,"angle":<int>},{"joint":2,"angle":<int>}, ...]}
- actions: list of length `segment_count`, joints `1..segment_count` each appearing exactly once.
- joint: integer in `1..segment_count`.
- angle: integer in `[angle_min, angle_max]`, multiple of `angle_step`.

## 9. FINAL INSTRUCTION
You may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.
Do not wrap FINAL_JSON in code fences and do not write anything after it.


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.

You 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).

You 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>

The 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.

If 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.

## 1. TASK
Choose one absolute angle for every joint of a fixed-base mechanical arm so that the bulb at the tip illuminates the target point.
The level is solved when the bulb's light radius covers the target AND no rod segment intersects any obstacle.

## 2. WORLD MODEL
- Arm base: the fixed mounting point of the arm. It does NOT move regardless of joint choices.
- Joint: a pivot point connecting consecutive arm segments. There is one joint per segment, indexed 1..segment_count.
- Segment / rod: a rigid white bar of fixed length attached to its joint.
- 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.
- Light radius: the radius around the bulb within which the target counts as illuminated.
- Target: the single point the bulb must illuminate.
- Obstacle: an axis-aligned rectangle (or set of rectangles) the rods must NOT intersect.

## 3. VISUAL LEGEND
- Orange diamond: arm base (fixed).
- White lines: arm segments (rods).
- Blue small circles: joints.
- Yellow circle: lamp bulb.
- Pale yellow translucent disc: the lamp's light coverage radius.
- Orange circle: target point.
- Amber rectangles with diagonal stripes: obstacles. Rods may not intersect them.
- Coordinate system: origin (0,0) marked on the grid; x increases to the right, y increases upward.

## 4. INPUT FIELDS
- sample_id: lamp-524
- segment_count: 5
- arm_base: (120.0, 120.0)
- target: (18.4, 31.64)
- light_radius: 24.0
- angle_min: -180
- angle_max: 180
- angle_step: 5
- segments:
- joint 1: length=110
- joint 2: length=110
- joint 3: length=110
- joint 4: length=50
- joint 5: length=70
- obstacles:
- wall_1: type=bar_vertical, pattern=warning_stripes
  part 1: x=40, y=0, width=40, height=120

## 5. ACTION VOCABULARY
A complete answer is one list of `action` objects, exactly one per joint:
- action: {"joint": <int 1..segment_count>, "angle": <int degrees>}
- `joint` is 1-indexed and identifies which segment this angle controls.
- `angle` is the absolute angle of that segment measured counterclockwise from the positive x-axis. Positive values rotate counterclockwise; negative values rotate clockwise.

## 6. CONSTRAINTS
- The actions list must contain exactly `segment_count` items, one per joint, with no duplicates.
- Each `angle` is an integer in `[angle_min, angle_max]` that is also a multiple of `angle_step` offset from `angle_min`.
- Angles are NOT cumulative across joints — each joint's angle is independent of the previous joint.
- The first segment starts at the arm base. Each subsequent segment starts where the previous one ends.
- No rod segment may intersect any obstacle rectangle.
- The level is solved iff the final bulb position is within `light_radius` of the target AND no rod intersects any obstacle.

## 7. SOLVING ADVICE
- Identify a coarse joint configuration that points the tip toward the target, then refine each angle independently.
- 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.
- The light radius can be tight (often 20–30 units), so even a 5° error on a single joint can miss the target.

## 8. OUTPUT SCHEMA
FINAL_JSON: {"actions":[{"joint":1,"angle":<int>},{"joint":2,"angle":<int>}, ...]}
- actions: list of length `segment_count`, joints `1..segment_count` each appearing exactly once.
- joint: integer in `1..segment_count`.
- angle: integer in `[angle_min, angle_max]`, multiple of `angle_step`.

## 9. FINAL INSTRUCTION
You may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.
Do not wrap FINAL_JSON in code fences and do not write anything after it.


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.

You 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).

You 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>

The 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.

If 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.

## 1. TASK
Choose one absolute angle for every joint of a fixed-base mechanical arm so that the bulb at the tip illuminates the target point.
The level is solved when the bulb's light radius covers the target AND no rod segment intersects any obstacle.

## 2. WORLD MODEL
- Arm base: the fixed mounting point of the arm. It does NOT move regardless of joint choices.
- Joint: a pivot point connecting consecutive arm segments. There is one joint per segment, indexed 1..segment_count.
- Segment / rod: a rigid white bar of fixed length attached to its joint.
- 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.
- Light radius: the radius around the bulb within which the target counts as illuminated.
- Target: the single point the bulb must illuminate.
- Obstacle: an axis-aligned rectangle (or set of rectangles) the rods must NOT intersect.

## 3. VISUAL LEGEND
- Orange diamond: arm base (fixed).
- White lines: arm segments (rods).
- Blue small circles: joints.
- Yellow circle: lamp bulb.
- Pale yellow translucent disc: the lamp's light coverage radius.
- Orange circle: target point.
- Amber rectangles with diagonal stripes: obstacles. Rods may not intersect them.
- Coordinate system: origin (0,0) marked on the grid; x increases to the right, y increases upward.

## 4. INPUT FIELDS
- sample_id: lamp-525
- segment_count: 2
- arm_base: (-40.0, 40.0)
- target: (64.08, 48.2)
- light_radius: 24.0
- angle_min: -180
- angle_max: 180
- angle_step: 5
- segments:
- joint 1: length=70
- joint 2: length=50
- obstacles:
- wall_1: type=stair, pattern=warning_stripes
  part 1: x=0, y=80, width=80, height=40
  part 2: x=40, y=120, width=80, height=40
- wall_2: type=bar_horizontal, pattern=warning_stripes
  part 1: x=-40, y=-40, width=120, height=40

## 5. ACTION VOCABULARY
A complete answer is one list of `action` objects, exactly one per joint:
- action: {"joint": <int 1..segment_count>, "angle": <int degrees>}
- `joint` is 1-indexed and identifies which segment this angle controls.
- `angle` is the absolute angle of that segment measured counterclockwise from the positive x-axis. Positive values rotate counterclockwise; negative values rotate clockwise.

## 6. CONSTRAINTS
- The actions list must contain exactly `segment_count` items, one per joint, with no duplicates.
- Each `angle` is an integer in `[angle_min, angle_max]` that is also a multiple of `angle_step` offset from `angle_min`.
- Angles are NOT cumulative across joints — each joint's angle is independent of the previous joint.
- The first segment starts at the arm base. Each subsequent segment starts where the previous one ends.
- No rod segment may intersect any obstacle rectangle.
- The level is solved iff the final bulb position is within `light_radius` of the target AND no rod intersects any obstacle.

## 7. SOLVING ADVICE
- Identify a coarse joint configuration that points the tip toward the target, then refine each angle independently.
- 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.
- The light radius can be tight (often 20–30 units), so even a 5° error on a single joint can miss the target.

## 8. OUTPUT SCHEMA
FINAL_JSON: {"actions":[{"joint":1,"angle":<int>},{"joint":2,"angle":<int>}, ...]}
- actions: list of length `segment_count`, joints `1..segment_count` each appearing exactly once.
- joint: integer in `1..segment_count`.
- angle: integer in `[angle_min, angle_max]`, multiple of `angle_step`.

## 9. FINAL INSTRUCTION
You may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.
Do not wrap FINAL_JSON in code fences and do not write anything after it.


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.

You 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).

You 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>

The 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.

If 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.

## 1. TASK
Choose one absolute angle for every joint of a fixed-base mechanical arm so that the bulb at the tip illuminates the target point.
The level is solved when the bulb's light radius covers the target AND no rod segment intersects any obstacle.

## 2. WORLD MODEL
- Arm base: the fixed mounting point of the arm. It does NOT move regardless of joint choices.
- Joint: a pivot point connecting consecutive arm segments. There is one joint per segment, indexed 1..segment_count.
- Segment / rod: a rigid white bar of fixed length attached to its joint.
- 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.
- Light radius: the radius around the bulb within which the target counts as illuminated.
- Target: the single point the bulb must illuminate.
- Obstacle: an axis-aligned rectangle (or set of rectangles) the rods must NOT intersect.

## 3. VISUAL LEGEND
- Orange diamond: arm base (fixed).
- White lines: arm segments (rods).
- Blue small circles: joints.
- Yellow circle: lamp bulb.
- Pale yellow translucent disc: the lamp's light coverage radius.
- Orange circle: target point.
- Amber rectangles with diagonal stripes: obstacles. Rods may not intersect them.
- Coordinate system: origin (0,0) marked on the grid; x increases to the right, y increases upward.

## 4. INPUT FIELDS
- sample_id: lamp-526
- segment_count: 5
- arm_base: (0.0, 120.0)
- target: (262.65, 155.29)
- light_radius: 24.0
- angle_min: -180
- angle_max: 180
- angle_step: 5
- segments:
- joint 1: length=110
- joint 2: length=70
- joint 3: length=110
- joint 4: length=70
- joint 5: length=50
- obstacles:
- wall_1: type=bar_horizontal, pattern=warning_stripes
  part 1: x=80, y=160, width=120, height=40
- wall_2: type=l_corner, pattern=warning_stripes
  part 1: x=80, y=200, width=80, height=40
  part 2: x=80, y=200, width=40, height=120

## 5. ACTION VOCABULARY
A complete answer is one list of `action` objects, exactly one per joint:
- action: {"joint": <int 1..segment_count>, "angle": <int degrees>}
- `joint` is 1-indexed and identifies which segment this angle controls.
- `angle` is the absolute angle of that segment measured counterclockwise from the positive x-axis. Positive values rotate counterclockwise; negative values rotate clockwise.

## 6. CONSTRAINTS
- The actions list must contain exactly `segment_count` items, one per joint, with no duplicates.
- Each `angle` is an integer in `[angle_min, angle_max]` that is also a multiple of `angle_step` offset from `angle_min`.
- Angles are NOT cumulative across joints — each joint's angle is independent of the previous joint.
- The first segment starts at the arm base. Each subsequent segment starts where the previous one ends.
- No rod segment may intersect any obstacle rectangle.
- The level is solved iff the final bulb position is within `light_radius` of the target AND no rod intersects any obstacle.

## 7. SOLVING ADVICE
- Identify a coarse joint configuration that points the tip toward the target, then refine each angle independently.
- 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.
- The light radius can be tight (often 20–30 units), so even a 5° error on a single joint can miss the target.

## 8. OUTPUT SCHEMA
FINAL_JSON: {"actions":[{"joint":1,"angle":<int>},{"joint":2,"angle":<int>}, ...]}
- actions: list of length `segment_count`, joints `1..segment_count` each appearing exactly once.
- joint: integer in `1..segment_count`.
- angle: integer in `[angle_min, angle_max]`, multiple of `angle_step`.

## 9. FINAL INSTRUCTION
You may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.
Do not wrap FINAL_JSON in code fences and do not write anything after it.


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.

You 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).

You 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>

The 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.

If 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.

## 1. TASK
Choose one absolute angle for every joint of a fixed-base mechanical arm so that the bulb at the tip illuminates the target point.
The level is solved when the bulb's light radius covers the target AND no rod segment intersects any obstacle.

## 2. WORLD MODEL
- Arm base: the fixed mounting point of the arm. It does NOT move regardless of joint choices.
- Joint: a pivot point connecting consecutive arm segments. There is one joint per segment, indexed 1..segment_count.
- Segment / rod: a rigid white bar of fixed length attached to its joint.
- 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.
- Light radius: the radius around the bulb within which the target counts as illuminated.
- Target: the single point the bulb must illuminate.
- Obstacle: an axis-aligned rectangle (or set of rectangles) the rods must NOT intersect.

## 3. VISUAL LEGEND
- Orange diamond: arm base (fixed).
- White lines: arm segments (rods).
- Blue small circles: joints.
- Yellow circle: lamp bulb.
- Pale yellow translucent disc: the lamp's light coverage radius.
- Orange circle: target point.
- Amber rectangles with diagonal stripes: obstacles. Rods may not intersect them.
- Coordinate system: origin (0,0) marked on the grid; x increases to the right, y increases upward.

## 4. INPUT FIELDS
- sample_id: lamp-527
- segment_count: 2
- arm_base: (-80.0, 0.0)
- target: (-110.46, 57.52)
- light_radius: 24.0
- angle_min: -180
- angle_max: 180
- angle_step: 5
- segments:
- joint 1: length=50
- joint 2: length=90
- obstacles:
- wall_1: type=block, pattern=warning_stripes
  part 1: x=-80, y=40, width=80, height=80

## 5. ACTION VOCABULARY
A complete answer is one list of `action` objects, exactly one per joint:
- action: {"joint": <int 1..segment_count>, "angle": <int degrees>}
- `joint` is 1-indexed and identifies which segment this angle controls.
- `angle` is the absolute angle of that segment measured counterclockwise from the positive x-axis. Positive values rotate counterclockwise; negative values rotate clockwise.

## 6. CONSTRAINTS
- The actions list must contain exactly `segment_count` items, one per joint, with no duplicates.
- Each `angle` is an integer in `[angle_min, angle_max]` that is also a multiple of `angle_step` offset from `angle_min`.
- Angles are NOT cumulative across joints — each joint's angle is independent of the previous joint.
- The first segment starts at the arm base. Each subsequent segment starts where the previous one ends.
- No rod segment may intersect any obstacle rectangle.
- The level is solved iff the final bulb position is within `light_radius` of the target AND no rod intersects any obstacle.

## 7. SOLVING ADVICE
- Identify a coarse joint configuration that points the tip toward the target, then refine each angle independently.
- 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.
- The light radius can be tight (often 20–30 units), so even a 5° error on a single joint can miss the target.

## 8. OUTPUT SCHEMA
FINAL_JSON: {"actions":[{"joint":1,"angle":<int>},{"joint":2,"angle":<int>}, ...]}
- actions: list of length `segment_count`, joints `1..segment_count` each appearing exactly once.
- joint: integer in `1..segment_count`.
- angle: integer in `[angle_min, angle_max]`, multiple of `angle_step`.

## 9. FINAL INSTRUCTION
You may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.
Do not wrap FINAL_JSON in code fences and do not write anything after it.


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.

You 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).

You 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>

The 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.

If 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.

## 1. TASK
Choose one absolute angle for every joint of a fixed-base mechanical arm so that the bulb at the tip illuminates the target point.
The level is solved when the bulb's light radius covers the target AND no rod segment intersects any obstacle.

## 2. WORLD MODEL
- Arm base: the fixed mounting point of the arm. It does NOT move regardless of joint choices.
- Joint: a pivot point connecting consecutive arm segments. There is one joint per segment, indexed 1..segment_count.
- Segment / rod: a rigid white bar of fixed length attached to its joint.
- 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.
- Light radius: the radius around the bulb within which the target counts as illuminated.
- Target: the single point the bulb must illuminate.
- Obstacle: an axis-aligned rectangle (or set of rectangles) the rods must NOT intersect.

## 3. VISUAL LEGEND
- Orange diamond: arm base (fixed).
- White lines: arm segments (rods).
- Blue small circles: joints.
- Yellow circle: lamp bulb.
- Pale yellow translucent disc: the lamp's light coverage radius.
- Orange circle: target point.
- Amber rectangles with diagonal stripes: obstacles. Rods may not intersect them.
- Coordinate system: origin (0,0) marked on the grid; x increases to the right, y increases upward.

## 4. INPUT FIELDS
- sample_id: lamp-528
- segment_count: 3
- arm_base: (-80.0, 80.0)
- target: (-36.58, -19.48)
- light_radius: 24.0
- angle_min: -180
- angle_max: 180
- angle_step: 5
- segments:
- joint 1: length=50
- joint 2: length=50
- joint 3: length=110
- obstacles:
- wall_1: type=stair, pattern=warning_stripes
  part 1: x=-80, y=120, width=80, height=40
  part 2: x=-40, y=160, width=80, height=40
- wall_2: type=bar_horizontal, pattern=warning_stripes
  part 1: x=0, y=0, width=120, height=40

## 5. ACTION VOCABULARY
A complete answer is one list of `action` objects, exactly one per joint:
- action: {"joint": <int 1..segment_count>, "angle": <int degrees>}
- `joint` is 1-indexed and identifies which segment this angle controls.
- `angle` is the absolute angle of that segment measured counterclockwise from the positive x-axis. Positive values rotate counterclockwise; negative values rotate clockwise.

## 6. CONSTRAINTS
- The actions list must contain exactly `segment_count` items, one per joint, with no duplicates.
- Each `angle` is an integer in `[angle_min, angle_max]` that is also a multiple of `angle_step` offset from `angle_min`.
- Angles are NOT cumulative across joints — each joint's angle is independent of the previous joint.
- The first segment starts at the arm base. Each subsequent segment starts where the previous one ends.
- No rod segment may intersect any obstacle rectangle.
- The level is solved iff the final bulb position is within `light_radius` of the target AND no rod intersects any obstacle.

## 7. SOLVING ADVICE
- Identify a coarse joint configuration that points the tip toward the target, then refine each angle independently.
- 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.
- The light radius can be tight (often 20–30 units), so even a 5° error on a single joint can miss the target.

## 8. OUTPUT SCHEMA
FINAL_JSON: {"actions":[{"joint":1,"angle":<int>},{"joint":2,"angle":<int>}, ...]}
- actions: list of length `segment_count`, joints `1..segment_count` each appearing exactly once.
- joint: integer in `1..segment_count`.
- angle: integer in `[angle_min, angle_max]`, multiple of `angle_step`.

## 9. FINAL INSTRUCTION
You may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.
Do not wrap FINAL_JSON in code fences and do not write anything after it.


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.

You 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).

You 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>

The 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.

If 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.

## 1. TASK
Choose one absolute angle for every joint of a fixed-base mechanical arm so that the bulb at the tip illuminates the target point.
The level is solved when the bulb's light radius covers the target AND no rod segment intersects any obstacle.

## 2. WORLD MODEL
- Arm base: the fixed mounting point of the arm. It does NOT move regardless of joint choices.
- Joint: a pivot point connecting consecutive arm segments. There is one joint per segment, indexed 1..segment_count.
- Segment / rod: a rigid white bar of fixed length attached to its joint.
- 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.
- Light radius: the radius around the bulb within which the target counts as illuminated.
- Target: the single point the bulb must illuminate.
- Obstacle: an axis-aligned rectangle (or set of rectangles) the rods must NOT intersect.

## 3. VISUAL LEGEND
- Orange diamond: arm base (fixed).
- White lines: arm segments (rods).
- Blue small circles: joints.
- Yellow circle: lamp bulb.
- Pale yellow translucent disc: the lamp's light coverage radius.
- Orange circle: target point.
- Amber rectangles with diagonal stripes: obstacles. Rods may not intersect them.
- Coordinate system: origin (0,0) marked on the grid; x increases to the right, y increases upward.

## 4. INPUT FIELDS
- sample_id: lamp-529
- segment_count: 5
- arm_base: (120.0, 40.0)
- target: (7.58, 24.73)
- light_radius: 24.0
- angle_min: -180
- angle_max: 180
- angle_step: 5
- segments:
- joint 1: length=110
- joint 2: length=50
- joint 3: length=90
- joint 4: length=50
- joint 5: length=90
- obstacles:
- wall_1: type=bar_horizontal, pattern=warning_stripes
  part 1: x=0, y=80, width=120, height=40
- wall_2: type=l_corner, pattern=warning_stripes
  part 1: x=-40, y=40, width=80, height=40
  part 2: x=-40, y=40, width=40, height=120

## 5. ACTION VOCABULARY
A complete answer is one list of `action` objects, exactly one per joint:
- action: {"joint": <int 1..segment_count>, "angle": <int degrees>}
- `joint` is 1-indexed and identifies which segment this angle controls.
- `angle` is the absolute angle of that segment measured counterclockwise from the positive x-axis. Positive values rotate counterclockwise; negative values rotate clockwise.

## 6. CONSTRAINTS
- The actions list must contain exactly `segment_count` items, one per joint, with no duplicates.
- Each `angle` is an integer in `[angle_min, angle_max]` that is also a multiple of `angle_step` offset from `angle_min`.
- Angles are NOT cumulative across joints — each joint's angle is independent of the previous joint.
- The first segment starts at the arm base. Each subsequent segment starts where the previous one ends.
- No rod segment may intersect any obstacle rectangle.
- The level is solved iff the final bulb position is within `light_radius` of the target AND no rod intersects any obstacle.

## 7. SOLVING ADVICE
- Identify a coarse joint configuration that points the tip toward the target, then refine each angle independently.
- 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.
- The light radius can be tight (often 20–30 units), so even a 5° error on a single joint can miss the target.

## 8. OUTPUT SCHEMA
FINAL_JSON: {"actions":[{"joint":1,"angle":<int>},{"joint":2,"angle":<int>}, ...]}
- actions: list of length `segment_count`, joints `1..segment_count` each appearing exactly once.
- joint: integer in `1..segment_count`.
- angle: integer in `[angle_min, angle_max]`, multiple of `angle_step`.

## 9. FINAL INSTRUCTION
You may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.
Do not wrap FINAL_JSON in code fences and do not write anything after it.


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.

You 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).

You 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>

The 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.

If 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.

## 1. TASK
Choose one absolute angle for every joint of a fixed-base mechanical arm so that the bulb at the tip illuminates the target point.
The level is solved when the bulb's light radius covers the target AND no rod segment intersects any obstacle.

## 2. WORLD MODEL
- Arm base: the fixed mounting point of the arm. It does NOT move regardless of joint choices.
- Joint: a pivot point connecting consecutive arm segments. There is one joint per segment, indexed 1..segment_count.
- Segment / rod: a rigid white bar of fixed length attached to its joint.
- 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.
- Light radius: the radius around the bulb within which the target counts as illuminated.
- Target: the single point the bulb must illuminate.
- Obstacle: an axis-aligned rectangle (or set of rectangles) the rods must NOT intersect.

## 3. VISUAL LEGEND
- Orange diamond: arm base (fixed).
- White lines: arm segments (rods).
- Blue small circles: joints.
- Yellow circle: lamp bulb.
- Pale yellow translucent disc: the lamp's light coverage radius.
- Orange circle: target point.
- Amber rectangles with diagonal stripes: obstacles. Rods may not intersect them.
- Coordinate system: origin (0,0) marked on the grid; x increases to the right, y increases upward.

## 4. INPUT FIELDS
- sample_id: lamp-530
- segment_count: 4
- arm_base: (120.0, 40.0)
- target: (32.18, 282.4)
- light_radius: 24.0
- angle_min: -180
- angle_max: 180
- angle_step: 5
- segments:
- joint 1: length=50
- joint 2: length=70
- joint 3: length=90
- joint 4: length=110
- obstacles:
- wall_1: type=block, pattern=warning_stripes
  part 1: x=80, y=80, width=80, height=80
- wall_2: type=stair, pattern=warning_stripes
  part 1: x=40, y=240, width=80, height=40
  part 2: x=80, y=280, width=80, height=40

## 5. ACTION VOCABULARY
A complete answer is one list of `action` objects, exactly one per joint:
- action: {"joint": <int 1..segment_count>, "angle": <int degrees>}
- `joint` is 1-indexed and identifies which segment this angle controls.
- `angle` is the absolute angle of that segment measured counterclockwise from the positive x-axis. Positive values rotate counterclockwise; negative values rotate clockwise.

## 6. CONSTRAINTS
- The actions list must contain exactly `segment_count` items, one per joint, with no duplicates.
- Each `angle` is an integer in `[angle_min, angle_max]` that is also a multiple of `angle_step` offset from `angle_min`.
- Angles are NOT cumulative across joints — each joint's angle is independent of the previous joint.
- The first segment starts at the arm base. Each subsequent segment starts where the previous one ends.
- No rod segment may intersect any obstacle rectangle.
- The level is solved iff the final bulb position is within `light_radius` of the target AND no rod intersects any obstacle.

## 7. SOLVING ADVICE
- Identify a coarse joint configuration that points the tip toward the target, then refine each angle independently.
- 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.
- The light radius can be tight (often 20–30 units), so even a 5° error on a single joint can miss the target.

## 8. OUTPUT SCHEMA
FINAL_JSON: {"actions":[{"joint":1,"angle":<int>},{"joint":2,"angle":<int>}, ...]}
- actions: list of length `segment_count`, joints `1..segment_count` each appearing exactly once.
- joint: integer in `1..segment_count`.
- angle: integer in `[angle_min, angle_max]`, multiple of `angle_step`.

## 9. FINAL INSTRUCTION
You may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.
Do not wrap FINAL_JSON in code fences and do not write anything after it.


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.

You 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).

You 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>

The 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.

If 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.

## 1. TASK
Choose one absolute angle for every joint of a fixed-base mechanical arm so that the bulb at the tip illuminates the target point.
The level is solved when the bulb's light radius covers the target AND no rod segment intersects any obstacle.

## 2. WORLD MODEL
- Arm base: the fixed mounting point of the arm. It does NOT move regardless of joint choices.
- Joint: a pivot point connecting consecutive arm segments. There is one joint per segment, indexed 1..segment_count.
- Segment / rod: a rigid white bar of fixed length attached to its joint.
- 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.
- Light radius: the radius around the bulb within which the target counts as illuminated.
- Target: the single point the bulb must illuminate.
- Obstacle: an axis-aligned rectangle (or set of rectangles) the rods must NOT intersect.

## 3. VISUAL LEGEND
- Orange diamond: arm base (fixed).
- White lines: arm segments (rods).
- Blue small circles: joints.
- Yellow circle: lamp bulb.
- Pale yellow translucent disc: the lamp's light coverage radius.
- Orange circle: target point.
- Amber rectangles with diagonal stripes: obstacles. Rods may not intersect them.
- Coordinate system: origin (0,0) marked on the grid; x increases to the right, y increases upward.

## 4. INPUT FIELDS
- sample_id: lamp-531
- segment_count: 2
- arm_base: (0.0, 0.0)
- target: (57.84, 89.66)
- light_radius: 24.0
- angle_min: -180
- angle_max: 180
- angle_step: 5
- segments:
- joint 1: length=50
- joint 2: length=90
- obstacles:
- wall_1: type=l_corner, pattern=warning_stripes
  part 1: x=-40, y=40, width=80, height=40
  part 2: x=-40, y=40, width=40, height=120

## 5. ACTION VOCABULARY
A complete answer is one list of `action` objects, exactly one per joint:
- action: {"joint": <int 1..segment_count>, "angle": <int degrees>}
- `joint` is 1-indexed and identifies which segment this angle controls.
- `angle` is the absolute angle of that segment measured counterclockwise from the positive x-axis. Positive values rotate counterclockwise; negative values rotate clockwise.

## 6. CONSTRAINTS
- The actions list must contain exactly `segment_count` items, one per joint, with no duplicates.
- Each `angle` is an integer in `[angle_min, angle_max]` that is also a multiple of `angle_step` offset from `angle_min`.
- Angles are NOT cumulative across joints — each joint's angle is independent of the previous joint.
- The first segment starts at the arm base. Each subsequent segment starts where the previous one ends.
- No rod segment may intersect any obstacle rectangle.
- The level is solved iff the final bulb position is within `light_radius` of the target AND no rod intersects any obstacle.

## 7. SOLVING ADVICE
- Identify a coarse joint configuration that points the tip toward the target, then refine each angle independently.
- 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.
- The light radius can be tight (often 20–30 units), so even a 5° error on a single joint can miss the target.

## 8. OUTPUT SCHEMA
FINAL_JSON: {"actions":[{"joint":1,"angle":<int>},{"joint":2,"angle":<int>}, ...]}
- actions: list of length `segment_count`, joints `1..segment_count` each appearing exactly once.
- joint: integer in `1..segment_count`.
- angle: integer in `[angle_min, angle_max]`, multiple of `angle_step`.

## 9. FINAL INSTRUCTION
You may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.
Do not wrap FINAL_JSON in code fences and do not write anything after it.


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.

You 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).

You 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>

The 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.

If 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.

## 1. TASK
Choose one absolute angle for every joint of a fixed-base mechanical arm so that the bulb at the tip illuminates the target point.
The level is solved when the bulb's light radius covers the target AND no rod segment intersects any obstacle.

## 2. WORLD MODEL
- Arm base: the fixed mounting point of the arm. It does NOT move regardless of joint choices.
- Joint: a pivot point connecting consecutive arm segments. There is one joint per segment, indexed 1..segment_count.
- Segment / rod: a rigid white bar of fixed length attached to its joint.
- 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.
- Light radius: the radius around the bulb within which the target counts as illuminated.
- Target: the single point the bulb must illuminate.
- Obstacle: an axis-aligned rectangle (or set of rectangles) the rods must NOT intersect.

## 3. VISUAL LEGEND
- Orange diamond: arm base (fixed).
- White lines: arm segments (rods).
- Blue small circles: joints.
- Yellow circle: lamp bulb.
- Pale yellow translucent disc: the lamp's light coverage radius.
- Orange circle: target point.
- Amber rectangles with diagonal stripes: obstacles. Rods may not intersect them.
- Coordinate system: origin (0,0) marked on the grid; x increases to the right, y increases upward.

## 4. INPUT FIELDS
- sample_id: lamp-532
- segment_count: 4
- arm_base: (0.0, 80.0)
- target: (-6.88, 158.41)
- light_radius: 24.0
- angle_min: -180
- angle_max: 180
- angle_step: 5
- segments:
- joint 1: length=50
- joint 2: length=90
- joint 3: length=110
- joint 4: length=90
- obstacles:
- wall_1: type=l_corner, pattern=warning_stripes
  part 1: x=0, y=160, width=80, height=40
  part 2: x=0, y=160, width=40, height=120
- wall_2: type=bar_horizontal, pattern=warning_stripes
  part 1: x=0, y=120, width=120, height=40

## 5. ACTION VOCABULARY
A complete answer is one list of `action` objects, exactly one per joint:
- action: {"joint": <int 1..segment_count>, "angle": <int degrees>}
- `joint` is 1-indexed and identifies which segment this angle controls.
- `angle` is the absolute angle of that segment measured counterclockwise from the positive x-axis. Positive values rotate counterclockwise; negative values rotate clockwise.

## 6. CONSTRAINTS
- The actions list must contain exactly `segment_count` items, one per joint, with no duplicates.
- Each `angle` is an integer in `[angle_min, angle_max]` that is also a multiple of `angle_step` offset from `angle_min`.
- Angles are NOT cumulative across joints — each joint's angle is independent of the previous joint.
- The first segment starts at the arm base. Each subsequent segment starts where the previous one ends.
- No rod segment may intersect any obstacle rectangle.
- The level is solved iff the final bulb position is within `light_radius` of the target AND no rod intersects any obstacle.

## 7. SOLVING ADVICE
- Identify a coarse joint configuration that points the tip toward the target, then refine each angle independently.
- 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.
- The light radius can be tight (often 20–30 units), so even a 5° error on a single joint can miss the target.

## 8. OUTPUT SCHEMA
FINAL_JSON: {"actions":[{"joint":1,"angle":<int>},{"joint":2,"angle":<int>}, ...]}
- actions: list of length `segment_count`, joints `1..segment_count` each appearing exactly once.
- joint: integer in `1..segment_count`.
- angle: integer in `[angle_min, angle_max]`, multiple of `angle_step`.

## 9. FINAL INSTRUCTION
You may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.
Do not wrap FINAL_JSON in code fences and do not write anything after it.


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.

You 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).

You 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>

The 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.

If 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.

## 1. TASK
Choose one absolute angle for every joint of a fixed-base mechanical arm so that the bulb at the tip illuminates the target point.
The level is solved when the bulb's light radius covers the target AND no rod segment intersects any obstacle.

## 2. WORLD MODEL
- Arm base: the fixed mounting point of the arm. It does NOT move regardless of joint choices.
- Joint: a pivot point connecting consecutive arm segments. There is one joint per segment, indexed 1..segment_count.
- Segment / rod: a rigid white bar of fixed length attached to its joint.
- 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.
- Light radius: the radius around the bulb within which the target counts as illuminated.
- Target: the single point the bulb must illuminate.
- Obstacle: an axis-aligned rectangle (or set of rectangles) the rods must NOT intersect.

## 3. VISUAL LEGEND
- Orange diamond: arm base (fixed).
- White lines: arm segments (rods).
- Blue small circles: joints.
- Yellow circle: lamp bulb.
- Pale yellow translucent disc: the lamp's light coverage radius.
- Orange circle: target point.
- Amber rectangles with diagonal stripes: obstacles. Rods may not intersect them.
- Coordinate system: origin (0,0) marked on the grid; x increases to the right, y increases upward.

## 4. INPUT FIELDS
- sample_id: lamp-533
- segment_count: 5
- arm_base: (120.0, 80.0)
- target: (124.43, 160.16)
- light_radius: 24.0
- angle_min: -180
- angle_max: 180
- angle_step: 5
- segments:
- joint 1: length=50
- joint 2: length=70
- joint 3: length=70
- joint 4: length=110
- joint 5: length=70
- obstacles:
- wall_1: type=l_corner, pattern=warning_stripes
  part 1: x=80, y=120, width=80, height=40
  part 2: x=80, y=120, width=40, height=120

## 5. ACTION VOCABULARY
A complete answer is one list of `action` objects, exactly one per joint:
- action: {"joint": <int 1..segment_count>, "angle": <int degrees>}
- `joint` is 1-indexed and identifies which segment this angle controls.
- `angle` is the absolute angle of that segment measured counterclockwise from the positive x-axis. Positive values rotate counterclockwise; negative values rotate clockwise.

## 6. CONSTRAINTS
- The actions list must contain exactly `segment_count` items, one per joint, with no duplicates.
- Each `angle` is an integer in `[angle_min, angle_max]` that is also a multiple of `angle_step` offset from `angle_min`.
- Angles are NOT cumulative across joints — each joint's angle is independent of the previous joint.
- The first segment starts at the arm base. Each subsequent segment starts where the previous one ends.
- No rod segment may intersect any obstacle rectangle.
- The level is solved iff the final bulb position is within `light_radius` of the target AND no rod intersects any obstacle.

## 7. SOLVING ADVICE
- Identify a coarse joint configuration that points the tip toward the target, then refine each angle independently.
- 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.
- The light radius can be tight (often 20–30 units), so even a 5° error on a single joint can miss the target.

## 8. OUTPUT SCHEMA
FINAL_JSON: {"actions":[{"joint":1,"angle":<int>},{"joint":2,"angle":<int>}, ...]}
- actions: list of length `segment_count`, joints `1..segment_count` each appearing exactly once.
- joint: integer in `1..segment_count`.
- angle: integer in `[angle_min, angle_max]`, multiple of `angle_step`.

## 9. FINAL INSTRUCTION
You may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.
Do not wrap FINAL_JSON in code fences and do not write anything after it.